** Description changed:

  [Impact]
  MAAS fails to start/stop virtual nodes when using virsh. This is because MAAS 
lacks permissions to run virsh.
  
  [Solution]
  The solution is to run virsh with sudo, as well as allowing the 'maas' user 
to run 'virsh' in the sudoers file.
  
  [Test Case]
  To reproduce do the following:
  
  1. install MAAS and configure local KVM nodes with it.
  2. Confiugure the power pameters in MAAS.
  3. Deploy a node.
  
  Without the fix the node will be never turned on/off and
  /var/log/maas/maas.log will show:
  
+ [Regression Potential]
+ Minimal. This has been tested in our labs. And this actually fixes something 
that is currently broken and won't work out of the box. The MAAS team and 
Server team are dedicated to perform any corrective actions in the events of a 
regression.
+ 
  [2013-04-23 11:20:21,482: ERROR/MainProcess] Task 
provisioningserver.tasks.power_off[926784f3-d90d-4277-bbfc-0471b2c82e80] raised 
exception: UnpickleableExceptionWrapper('provisioningserver.power.poweraction', 
'PowerActionFail', (), 'PowerActionFail()')
  Traceback (most recent call last):
-   File "/usr/lib/python2.7/dist-packages/celery/execute/trace.py", line 181, 
in trace_task
-     R = retval = fun(*args, **kwargs)
-   File "/usr/lib/python2.7/dist-packages/provisioningserver/tasks.py", line 
146, in power_off
-     issue_power_action(power_type, 'off', **kwargs)
-   File "/usr/lib/python2.7/dist-packages/provisioningserver/tasks.py", line 
126, in issue_power_action
-     pa.execute(**kwargs)
-   File 
"/usr/lib/python2.7/dist-packages/provisioningserver/power/poweraction.py", 
line 138, in execute
-     self.run_shell(rendered)
-   File 
"/usr/lib/python2.7/dist-packages/provisioningserver/power/poweraction.py", 
line 126, in run_shell
-     raise PowerActionFail(self, e)
+   File "/usr/lib/python2.7/dist-packages/celery/execute/trace.py", line 181, 
in trace_task
+     R = retval = fun(*args, **kwargs)
+   File "/usr/lib/python2.7/dist-packages/provisioningserver/tasks.py", line 
146, in power_off
+     issue_power_action(power_type, 'off', **kwargs)
+   File "/usr/lib/python2.7/dist-packages/provisioningserver/tasks.py", line 
126, in issue_power_action
+     pa.execute(**kwargs)
+   File 
"/usr/lib/python2.7/dist-packages/provisioningserver/power/poweraction.py", 
line 138, in execute
+     self.run_shell(rendered)
+   File 
"/usr/lib/python2.7/dist-packages/provisioningserver/power/poweraction.py", 
line 126, in run_shell
+     raise PowerActionFail(self, e)
  PowerActionFail: PowerActionFail()
  
  With the fix, nodes will be turned on/off successfully.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to maas in Ubuntu.
https://bugs.launchpad.net/bugs/1171988

Title:
  MAAS fails to use virsh when managing virtual nodes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/maas/+bug/1171988/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to