[Libvirt-cim] [PATCH] [TEST] Modify CSI test to support modified and deleted indications
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Fri Aug 1 18:18:37 UTC 2008
> >
> > This may fail on KVM with the following error message:
> > "CIM_ERR_FAILED: Invalid state transition." Will follow up on this
> issue.
>
> Yup, I run it on KVM, and below is the detail error message:
>
> ComputerSystemIndication - 01_created_indication.py: FAIL
> ERROR - Exception: (1, u'CIM_ERR_FAILED: Invalid state transition')
> ERROR - Failed to start domain: domU
> InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Invalid state
> transition
>
This is a bug in libvirt. I spoke to the libvirt folks this morning,
and this should be fixed in CVS soon.
> > +
> > + sub = CIMIndicationSubscription(sub_name, ind_name,
> > + dict['default_ns'],
> > + dict['default_print_ind'],
> > + dict['default_sysname'],
> > + port)
> > + sub.subscribe(dict['default_url'], dict['default_auth'])
> > + logger.info("Watching for %s" % iname)
> > + ind_names[ind] = ind_name
> > + sub_list[ind] = sub
> > +
> > + return sub_list, ind_names, dict
> > +
> > +def gen_ind(test_dom, ip, vtype, ind):
> > + if ind == "define":
> > + return create_using_definesystem(test_dom, ip, virt=vtype)
>
> Do you have to check the return status of create_using_definesystem()
> function here?
>
The status gets checked in the main function (see below). If this is
confusing, I can change it.
> > + try:
> > + status = gen_ind(test_dom, options.ip,
> options.virt, ind)
> > + if status != PASS:
> > + os.kill(pid, signal.SIGKILL)
> > + return FAIL
> >
> > - status = FAIL
> > - for i in range(0,100):
> > - pw = os.waitpid(pid, os.WNOHANG)
> > + status = poll_for_ind(pid)
> > + except Exception, details:
> > + logger.error("Exception: %s" % details)
> > + os.kill(pid, signal.SIGKILL)
> > + return FAIL
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list