Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Jan 17, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

@eplaut
Copy link

eplaut commented Mar 23, 2016

I'm getting same issue after ~1 hour of using a machine

this peace of code (from get_status()):

        oc_vm_status_msg = self._server._get_object_properties(
                      self._mor,
                      property_names=['runtime.question', 'runtime.powerState']
                      )

returns:

In [69]: oc_vm_status_msg
Out[69]: <pysphere.resources.VimService_services_types.DynamicData_Holder at 0x7fe867422d10>

In [70]: oc_vm_status_msg.__dict__
Out[70]: 
{'_dynamicProperty': [],
 '_dynamicType': None,
 '_missingSet': [<pysphere.resources.VimService_services_types.DynamicData_Holder at 0x7fe8673c4b90>,
  <pysphere.resources.VimService_services_types.DynamicData_Holder at 0x7fe8673c4bd0>],
 '_obj': 'vm-217455'}

instead of (using new vm object):

In [71]: oc_vm_status_msg2.__dict__
Out[71]: 
{'_dynamicProperty': [],
 '_dynamicType': None,
 '_obj': 'vm-217455',
 '_propSet': [<pysphere.resources.VimService_services_types.DynamicProperty_Holder at 0x7fe8674956d0>]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants