yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #22334
[Bug 1373671] [NEW] SSH driver does not work with non-english locale
Public bug reported:
The SSH driver's "vmware" and "virsh" command sets contain a grep clause
which depends upon localized strings, causing this driver to be unusable
on systems with a non-english locale setting.
For vmware:
136 'list_running': (
137 "vmsvc/power.getstate {_NodeName_} | "
138 "grep 'Powered on' >/dev/null && "
139 "echo '\"{_NodeName_}\"' || true"),
For virsh:
159 'list_running': ("list --all|grep running | "
160 "awk -v qc='\"' -F\" \" '{print qc$2qc}'"),
Below is the output when the system locale is changed to "de_DE". The translation of the unexpected error is "Error: Domain is already active". However, any attempt to turn the node off is a no-op, because the SSH driver does not believe the node is running.
2014-09-24 16:55:14.587 DEBUG ironic.drivers.modules.ssh [-] Checking Node: baremetalbrbm_2's Mac address. from (pid=19417) _get_hosts_name_for_node /opt/stack/ironic/ironic/drivers/modules/ssh.py:404
2014-09-24 16:55:14.684 DEBUG ironic.drivers.modules.ssh [-] Found Mac address: 52:54:00:de:30:e3 from (pid=19417) _get_hosts_name_for_node /opt/stack/ironic/ironic/drivers/modules/ssh.py:417
2014-09-24 16:55:14.782 DEBUG ironic.drivers.modules.ssh [-] Cannot execute SSH cmd /usr/bin/virsh --connect qemu:///system start baremetalbrbm_2. Reason: Unexpected error while running command.
Command: /usr/bin/virsh --connect qemu:///system start baremetalbrbm_2
Exit code: 1
Stdout: '\n'
Stderr: 'Fehler: Domain ist bereits aktiv\n'. from (pid=19417) _ssh_execute /opt/stack/ironic/ironic/drivers/modules/ssh.py:277
2014-09-24 16:55:14.794 WARNING ironic.conductor.manager [-] Error in deploy of node 20770fde-b719-413d-9170-b257a76064a7: Failed to execute command via SSH: /usr/bin/virsh --connect qemu:///system start baremetalbrbm_2.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 455, in fire_timers
timer()
File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 58, in __call__
cb(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 212, in main
result = function(*args, **kwargs)
File "/opt/stack/ironic/ironic/conductor/manager.py", line 504, in _do_node_deploy
node.target_provision_state = states.NOSTATE
File "/usr/local/lib/python2.7/dist-packages/oslo/utils/excutils.py", line 82, in __exit__
six.reraise(self.type_, self.value, self.tb)
File "/opt/stack/ironic/ironic/conductor/manager.py", line 497, in _do_node_deploy
new_state = task.driver.deploy.deploy(task)
File "/opt/stack/ironic/ironic/conductor/task_manager.py", line 116, in wrapper
return f(*args, **kwargs)
File "/opt/stack/ironic/ironic/drivers/modules/pxe.py", line 344, in deploy
manager_utils.node_power_action(task, states.REBOOT)
File "/opt/stack/ironic/ironic/conductor/task_manager.py", line 116, in wrapper
return f(*args, **kwargs)
File "/opt/stack/ironic/ironic/conductor/utils.py", line 118, in node_power_action
'target': new_state, 'error': e}
File "/usr/local/lib/python2.7/dist-packages/oslo/utils/excutils.py", line 82, in __exit__
six.reraise(self.type_, self.value, self.tb)
File "/opt/stack/ironic/ironic/conductor/utils.py", line 112, in node_power_action
task.driver.power.reboot(task)
File "/opt/stack/ironic/ironic/conductor/task_manager.py", line 116, in wrapper
return f(*args, **kwargs)
File "/opt/stack/ironic/ironic/drivers/modules/ssh.py", line 586, in reboot
state = _power_on(ssh_obj, driver_info)
File "/opt/stack/ironic/ironic/drivers/modules/ssh.py", line 446, in _power_on
_ssh_execute(ssh_obj, cmd_to_power_on)
File "/opt/stack/ironic/ironic/drivers/modules/ssh.py", line 278, in _ssh_execute
raise exception.SSHCommandFailed(cmd=cmd_to_exec)
SSHCommandFailed: Failed to execute command via SSH: /usr/bin/virsh --connect qemu:///system start baremetalbrbm_2.
** Affects: ironic
Importance: High
Status: Confirmed
** Project changed: nova => ironic
** Changed in: ironic
Status: New => Confirmed
** Changed in: ironic
Importance: Undecided => High
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1373671
Title:
SSH driver does not work with non-english locale
Status in OpenStack Bare Metal Provisioning Service (Ironic):
Confirmed
Bug description:
The SSH driver's "vmware" and "virsh" command sets contain a grep
clause which depends upon localized strings, causing this driver to be
unusable on systems with a non-english locale setting.
For vmware:
136 'list_running': (
137 "vmsvc/power.getstate {_NodeName_} | "
138 "grep 'Powered on' >/dev/null && "
139 "echo '\"{_NodeName_}\"' || true"),
For virsh:
159 'list_running': ("list --all|grep running | "
160 "awk -v qc='\"' -F\" \" '{print qc$2qc}'"),
Below is the output when the system locale is changed to "de_DE". The translation of the unexpected error is "Error: Domain is already active". However, any attempt to turn the node off is a no-op, because the SSH driver does not believe the node is running.
2014-09-24 16:55:14.587 DEBUG ironic.drivers.modules.ssh [-] Checking Node: baremetalbrbm_2's Mac address. from (pid=19417) _get_hosts_name_for_node /opt/stack/ironic/ironic/drivers/modules/ssh.py:404
2014-09-24 16:55:14.684 DEBUG ironic.drivers.modules.ssh [-] Found Mac address: 52:54:00:de:30:e3 from (pid=19417) _get_hosts_name_for_node /opt/stack/ironic/ironic/drivers/modules/ssh.py:417
2014-09-24 16:55:14.782 DEBUG ironic.drivers.modules.ssh [-] Cannot execute SSH cmd /usr/bin/virsh --connect qemu:///system start baremetalbrbm_2. Reason: Unexpected error while running command.
Command: /usr/bin/virsh --connect qemu:///system start baremetalbrbm_2
Exit code: 1
Stdout: '\n'
Stderr: 'Fehler: Domain ist bereits aktiv\n'. from (pid=19417) _ssh_execute /opt/stack/ironic/ironic/drivers/modules/ssh.py:277
2014-09-24 16:55:14.794 WARNING ironic.conductor.manager [-] Error in deploy of node 20770fde-b719-413d-9170-b257a76064a7: Failed to execute command via SSH: /usr/bin/virsh --connect qemu:///system start baremetalbrbm_2.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 455, in fire_timers
timer()
File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 58, in __call__
cb(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 212, in main
result = function(*args, **kwargs)
File "/opt/stack/ironic/ironic/conductor/manager.py", line 504, in _do_node_deploy
node.target_provision_state = states.NOSTATE
File "/usr/local/lib/python2.7/dist-packages/oslo/utils/excutils.py", line 82, in __exit__
six.reraise(self.type_, self.value, self.tb)
File "/opt/stack/ironic/ironic/conductor/manager.py", line 497, in _do_node_deploy
new_state = task.driver.deploy.deploy(task)
File "/opt/stack/ironic/ironic/conductor/task_manager.py", line 116, in wrapper
return f(*args, **kwargs)
File "/opt/stack/ironic/ironic/drivers/modules/pxe.py", line 344, in deploy
manager_utils.node_power_action(task, states.REBOOT)
File "/opt/stack/ironic/ironic/conductor/task_manager.py", line 116, in wrapper
return f(*args, **kwargs)
File "/opt/stack/ironic/ironic/conductor/utils.py", line 118, in node_power_action
'target': new_state, 'error': e}
File "/usr/local/lib/python2.7/dist-packages/oslo/utils/excutils.py", line 82, in __exit__
six.reraise(self.type_, self.value, self.tb)
File "/opt/stack/ironic/ironic/conductor/utils.py", line 112, in node_power_action
task.driver.power.reboot(task)
File "/opt/stack/ironic/ironic/conductor/task_manager.py", line 116, in wrapper
return f(*args, **kwargs)
File "/opt/stack/ironic/ironic/drivers/modules/ssh.py", line 586, in reboot
state = _power_on(ssh_obj, driver_info)
File "/opt/stack/ironic/ironic/drivers/modules/ssh.py", line 446, in _power_on
_ssh_execute(ssh_obj, cmd_to_power_on)
File "/opt/stack/ironic/ironic/drivers/modules/ssh.py", line 278, in _ssh_execute
raise exception.SSHCommandFailed(cmd=cmd_to_exec)
SSHCommandFailed: Failed to execute command via SSH: /usr/bin/virsh --connect qemu:///system start baremetalbrbm_2.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ironic/+bug/1373671/+subscriptions
Follow ups
References