SSH driver does not work with non-english locale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Fix Released
|
High
|
Lucas Alvares Gomes |
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/
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.
2014-09-24 16:55:14.684 DEBUG ironic.
2014-09-24 16:55:14.782 DEBUG ironic.
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/
2014-09-24 16:55:14.794 WARNING ironic.
Traceback (most recent call last):
File "/usr/local/
timer()
File "/usr/local/
cb(*args, **kw)
File "/usr/local/
result = function(*args, **kwargs)
File "/opt/stack/
node.
File "/usr/local/
six.
File "/opt/stack/
new_state = task.driver.
File "/opt/stack/
return f(*args, **kwargs)
File "/opt/stack/
manager_
File "/opt/stack/
return f(*args, **kwargs)
File "/opt/stack/
'target': new_state, 'error': e}
File "/usr/local/
six.
File "/opt/stack/
task.
File "/opt/stack/
return f(*args, **kwargs)
File "/opt/stack/
state = _power_on(ssh_obj, driver_info)
File "/opt/stack/
_ssh_
File "/opt/stack/
raise exception.
SSHCommandFailed: Failed to execute command via SSH: /usr/bin/virsh --connect qemu:///system start baremetalbrbm_2.
affects: | nova → ironic |
Changed in ironic: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in ironic: | |
assignee: | nobody → Lucas Alvares Gomes (lucasagomes) |
Changed in ironic: | |
milestone: | none → juno-rc1 |
Changed in ironic: | |
status: | Fix Committed → Fix Released |
Changed in ironic: | |
milestone: | juno-rc1 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/124061
Review: https:/