WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] Some more Questions and Bug Report

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] Some more Questions and Bug Report
From: "Hans Mayer" <loki84@xxxxxxxxx>
Date: Mon, 10 Dec 2007 16:56:06 +0100
Delivery-date: Mon, 10 Dec 2007 07:56:30 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=S8U6aN+8zMUByTb+fktXWKMDCi0zPzzUW16OSeOxkBM=; b=besqOSUdd1MzfIgMvQch09tTsyAzZvyqXboUeTxtIArnUc21rWXQu6soiwhCEeevmhwdCiVEZJJ6TkLwUVhr3Kn5ABB75aRZqbWcnItGaap1lUGpctW2AJ/xgpmct6l1Hsii0Oei6p7GiweswNqNlxLUwKfCD6FDIV5AgUuE2Do=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=UOuwuGBMPCxeGOoIsfykmiZfqd6gdqXDuIj5ScSS6HNYPhbkq7o74gBnKWUqtfAu7X0ozlVNgkqY9reonImrzho346iLgghro2a0J6Z5VpjdZu5PevYcWroVaPZrZDjOu4nOpLQ2BfFQ1tFzd/6uB6LPx+fgRflpotYfo0zh5Ro=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Hello again

Qur project group had a meeting and we discovered that the virtualisation project is not usefull because we can't read the VMGuestMetrics.

The next is that we can't use any of the set functions and any of the do something (reeboot, shutdown, ...) because they are bad copied from the get something functions (its in all classes the same problem). The return in the if (succsess) statemant is missing so the functions always throw a BadServerResponse.

Class VM:
public void setNameLabel(String label) throws Types.BadServerResponse, ConnectionHelper.NoConnectionOnThisThreadException , XmlRpcException {
    String method_call = "VM.set_name_label";
    String session = ConnectionHelper.instance().getSession();
    Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC (this.ref), Marshalling.toXMLRPC(label)};
    Map response = ConnectionHelper.instance().dispatch(
        method_call, method_params);
    if(response.get("Status").equals("Success")) {
        Object result = response.get("Value");
        // here should be something like an "return;" :)
    } else if(response.get("Status").equals("Failure")) {
        Object[] error = (Object[]) response.get("ErrorDescription");
    }
    throw new Types.BadServerResponse(response);
}


The last thing we found is that the getAllRecords (in all classes) always throws a nullpointerException because the Xen server gives for some properties null back. In the Types class there are some casts but they don't check the object reference. If the reference is null the cast throws a Exception. There sould be something like if (object == null) {return null;} or anything else

Class Types
public static Map<VMMetrics, VMMetrics.Record> toMapOfVMMetricsVMMetricsRecord(Object object) {
    Map map = (Map) object;  // this is the problem when the object null is
    Map<VMMetrics, VMMetrics.Record> result = new HashMap<VMMetrics,VMMetrics.Record>();
    Set<Map.Entry> entries = map.entrySet();
    for(Map.Entry entry: entries) {
        VMMetrics key = toVMMetrics(entry.getKey ());
        VMMetrics.Record value = toVMMetricsRecord(entry.getValue());
        result.put(key, value);
    }
    return result;
}

Are there any plans to fix this bugs and implement VMMetrics in the near future?

Do you know how many time is needed for this changes and how long it takes for implementation in xen server and xen api?

Best regards
Frank
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] Some more Questions and Bug Report, Hans Mayer <=