[Engine-devel] Problem with detachment of host interface using ovirt-sdk

Juan Hernandez jhernand at redhat.com
Wed Apr 11 09:25:01 UTC 2012


Itzik, can you provide the complete python script that is generating
that fault? I will try to reproduce it in my environment.

It will be also helpful to know the exact version of ovirt-engine-sdk
that you are using. If you cloned the git repository just tell me what
is the commit.

On 04/02/2012 09:45 AM, Itzik Brown wrote:
> Hi,
> 
> I tried using ovirt-sdk against  ovirt-engine-3.0.0_0001-1.6.
> I still get the same result:
> 
> 10:29:26,554 WARN  [org.jboss.resteasy.core.SynchronousDispatcher] (http--0.0.0.0-8080-4) failed to execute: org.ovirt.engine.api.restapi.resource.BaseBackendResource$WebFaultException
>         at org.ovirt.engine.api.restapi.resource.BaseBackendResource.handleError(BaseBackendResource.java:207) [restapi-jaxrs-3.0.0-0001.jar:]
>         at org.ovirt.engine.api.restapi.resource.BaseBackendResource.handleError(BaseBackendResource.java:183) [restapi-jaxrs-3.0.0-0001.jar:]
>         at org.ovirt.engine.api.restapi.resource.BackendHostNicsResource.lookupNetwork(BackendHostNicsResource.java:242) [restapi-jaxrs-3.0.0-0001.jar:]
>         at org.ovirt.engine.api.restapi.resource.BackendHostNicResource.doAttachAction(BackendHostNicResource.java:56) [restapi-jaxrs-3.0.0-0001.jar:]
>         at org.ovirt.engine.api.restapi.resource.BackendHostNicResource.detach(BackendHostNicResource.java:75) [restapi-jaxrs-3.0.0-0001.jar:]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.6.0_24]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_24]
>         at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_24]
> 
> Please advise,
> Itzik
> 
> ________________________________
> From: engine-devel-bounces at ovirt.org [engine-devel-bounces at ovirt.org] on behalf of Roy Golan [rgolan at redhat.com]
> Sent: Sunday, March 25, 2012 8:51 AM
> To: engine-devel at ovirt.org
> Subject: Re: [Engine-devel] Problem with detachment of host interface using ovirt-sdk
> 
> On 03/22/2012 10:43 AM, Itzik Brown wrote:
> Hi,
> 
> I'm using ovirt-sdk to attach and detach a network to a host's Interface.
> Once the network is attached to the interface I try to detach the network from the interface using the following steps:
> 
> 1.Detach the network from the cluster through the GUI.
> 2.Remove the network from the datacenter through the GUI.
> 3.Detach the network from the host's interface using the SDK:
> 
> nic = api.hosts.get(name=host).nics.get(name=if_name)
> net = params.Network(name=net_name)
> act = params.Action(network=net)
> nic.detach(act)
> api.hosts.get(name=host).commitnetconfig()
> 
> Then I get the error:
> http://pastebin.com/3Md07huE
> 
> The same flow using the GUI works fine.
> 
> Network removal from the Datacenter is a trigger for me to run the detachment operation therefore I use this flow.
> 
> I use the following components:
> 
> rhevm-3.0.2_0001-2
> ovirt-sdk (Using the latest from git repository)
> 
> Please advise how to proceed.
> 
> Thanks,
> Itzik
> 
> 
> 
> This body part will be downloaded on demand.
> 
> Ovirt-sdk and rhevm don't comply (ovirt-sdk is based on the upstream version of rhevm)
> 
> Use the REST api instead:
> 
> curl -X POST user at domain:password -H "Content-Type: application/xml" -d@/path/to/file.xml https://rhevm:8843/api/hosts/{host-id}/nics/{nic-id}/detach
> 
> file.xml:
> 
> <action>
>   <host_nic>
>     <name>eth0</name>
>   </host_nic>
> </action>
> 
> 
> 
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel


-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.



More information about the Engine-devel mailing list