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

Reading the power_type parameter is broken #24

Open
ebhorvath opened this issue Mar 2, 2018 · 3 comments
Open

Reading the power_type parameter is broken #24

ebhorvath opened this issue Mar 2, 2018 · 3 comments

Comments

@ebhorvath
Copy link

I've tried to use the value 'virsh' for the power_type parameter.

When executing the command
salt-call maas.process_machines -l debug
I get the following error:

[INFO ] machine hostname=cmp001 power_type=ipmi mac_addresses=52:54:01:00:00:01 power_parameters_power_address=qemu+ssh://[email protected]/system architecture=amd64/generic power_parameters_power_id=cmp001
[ERROR ] Failed for object cmp001 reason {"power_parameters": ["Unknown parameter(s): power_id."]}

In the file https://github.com/salt-formulas/salt-formula-maas/blob/master/_modules/maas.py in the line
'power_type': machine_data.get('power_type', 'ipmi'),
power_type will always get the value 'ipmi', as there's no 'power_type' key in the first level of the machine_data dictionary hierarchy.

@nbritton
Copy link

I'm getting this error too.

root@cfg01:/srv/salt/reclass/classes/cluster/vlab/infra# salt-call maas.process_machines [WARNING ] Old machine-describe detected! Please read documentation for 'salt-formulas/maas' for migration! [INFO ] machine hostname=kvm02 power_type=ipmi mac_addresses=52:54:00:94:59:54 power_parameters_power_address=qemu+ssh://[email protected]/system power_parameters_power_pass=*** architecture=amd64/generic power_parameters_power_id=kvm02 [ERROR ] Failed for object kvm02 reason {"power_parameters": ["Unknown parameter(s): power_id."]} [ERROR ] An un-handled exception was caught by salt's global exception handler: Exception: {'updated': [], 'errors': {'kvm02': '{"power_parameters": ["Unknown parameter(s): power_id."]}'}, 'success': []} Traceback (most recent call last): File "/usr/bin/salt-call", line 11, in <module> salt_call() File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 372, in salt_call client.run() File "/usr/lib/python2.7/dist-packages/salt/cli/call.py", line 58, in run caller.run() File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 134, in run ret = self.call() File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 197, in call ret['return'] = func(*args, **kwargs) File "/var/cache/salt/minion/extmods/modules/maas.py", line 913, in process_machines return Machine().process(*args) File "/var/cache/salt/minion/extmods/modules/maas.py", line 179, in process raise Exception(ret) Exception: {'updated': [], 'errors': {'kvm02': '{"power_parameters": ["Unknown parameter(s): power_id."]}'}, 'success': []}

@alexandruavadanii
Copy link
Contributor

I think this was fixed by e95cdb6.

ebhorvath referenced this issue May 15, 2018
Change-Id: Iaa71d87c6627cada4a0a85d7eb087b57dc25d3bc
@jmichealson
Copy link

I'm seeing something similar today with a fresh 2.3.5 install. @nbritton did you resolve this issue somehow? In my case it doesn't seem to matter if I use virsh or vmware, both fail with a python crash in the log.

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

No branches or pull requests

4 participants