fyafighter / pysphere

Automatically exported from code.google.com/p/pysphere
0 stars 0 forks source link

Error calling vm.is_powered_on() "AttributeError: 'DynamicData_Holder' object has no attribute '_propSet'" #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
(intermittent issue)
1. Create a linked clone
2. Disconnect VIServer session
3. Use linked clone for a while
4. Reconnect VIServer session to VCenter host
5. Call linked_clone_vm.is_powered_on()

What is the expected output? What do you see instead?
Expect to get "powered on" state. Instead, I get an exception.

What version of the product are you using? On what operating system?
pysphere-0.1.8-py2.7 on Ubuntu 12.04

Please provide any additional information below.

Here's the stack trace:

  File "/var/lib/jenkins/workspace/dev_builds/arch/amd64/systemtest/src/meta/systemtest/build_tasks.py", line 353, in create_snapshot
    if vm.is_powered_on():
  File "/var/lib/jenkins/workspace/dev_builds/arch/amd64/eggs/pysphere-0.1.8-py2.7.egg/pysphere/vi_virtual_machine.py", line 331, in is_powered_on
    return self.get_status() == VMPowerState.POWERED_ON
  File "/var/lib/jenkins/workspace/dev_builds/arch/amd64/eggs/pysphere-0.1.8-py2.7.egg/pysphere/vi_virtual_machine.py", line 218, in get_status
    properties = oc_vm_status_msg.PropSet
  File "/var/lib/jenkins/workspace/dev_builds/arch/amd64/eggs/pysphere-0.1.8-py2.7.egg/pysphere/ZSI/generate/pyclass.py", line 160, in get
    return getattr(self, what().aname)
AttributeError: 'DynamicData_Holder' object has no attribute '_propSet'

I'm happy to collect further diags if you would find it useful. Any suggestions 
for a workaround?

Cheers.

Original issue reported on code.google.com by paultipl...@gmail.com on 29 May 2014 at 5:04

GoogleCodeExporter commented 9 years ago
Actually, in recent repros the issue is manifesting after this sequence of 
calls:

if vm.is_powered_on():
  run('sudo halt')
  time.sleep(30)
  vm.power_off()

vm.delete_named_snapshot('name')
vm.create_snapshot('newname')
vm.power_on()

wait_for_vm()

...
<do some work on VM>
...
Repeat above, fail on 
if vm.is_powered_on()

Original comment by paultipl...@gmail.com on 29 May 2014 at 5:15