ppc64_cpu check is not suitable on ppc64le VM

Bug #1628055 reported by huhaoran
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Nova Compute Charm
Triaged
Medium
Unassigned
nova-compute (Juju Charms Collection)
Invalid
Medium
Unassigned

Bug Description

on ppc64le VM, when run "sudo ppc64_cpu --smt=off" may have error code 255

root@juju-7d5138-11:/var/log/juju# sudo ppc64_cpu --smt=off
Machine is not SMT capable
root@juju-7d5138-11:/var/log/juju# echo $?
255

log snapshot:
2016-09-27 06:33:47 INFO juju-log CPU architecture: ppc64le
2016-09-27 06:33:47 INFO config-changed Machine is not SMT capable
2016-09-27 06:33:47 INFO config-changed Traceback (most recent call last):
2016-09-27 06:33:47 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 500, in <module>
2016-09-27 06:33:47 INFO config-changed main()
2016-09-27 06:33:47 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 493, in main
2016-09-27 06:33:47 INFO config-changed hooks.execute(sys.argv)
2016-09-27 06:33:47 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/core/hookenv.py", line 715, in execute
2016-09-27 06:33:47 INFO config-changed self._hooks[hook_name]()
2016-09-27 06:33:47 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1810, in wrapped_f
2016-09-27 06:33:47 INFO config-changed restart_functions)
2016-09-27 06:33:47 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/core/host.py", line 526, in restart_on_change_helper
2016-09-27 06:33:47 INFO config-changed r = lambda_f()
2016-09-27 06:33:47 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1809, in <lambda>
2016-09-27 06:33:47 INFO config-changed (lambda: f(*args, **kwargs)), restart_map, stopstart,
2016-09-27 06:33:47 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 79, in _harden_inner2
2016-09-27 06:33:47 INFO config-changed return f(*args, **kwargs)
2016-09-27 06:33:47 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 193, in config_changed
2016-09-27 06:33:47 INFO config-changed set_ppc64_cpu_smt_state('off')
2016-09-27 06:33:47 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/nova_compute_utils.py", line 491, in set_ppc64_cpu_smt_state
2016-09-27 06:33:47 INFO config-changed current_smt_state = check_output(['ppc64_cpu', '--smt'])
2016-09-27 06:33:47 INFO config-changed File "/usr/lib/python2.7/subprocess.py", line 574, in check_output

There may be an improvement on nova_compute_utils.py

Tags: ppc64le vm
huhaoran (vennie1988)
tags: added: ppc64le
huhaoran (vennie1988)
tags: added: vm
Revision history for this message
huhaoran (vennie1988) wrote :

If this charm is installed in a bare mental ppc64el machine, this charm do not have this issue. This charm has issues in ppc64le vm.

James Page (james-page)
Changed in nova-compute (Juju Charms Collection):
status: New → Triaged
importance: Undecided → Medium
huhaoran (vennie1988)
Changed in nova-compute (Juju Charms Collection):
assignee: nobody → huhaoran (vennie1988)
status: Triaged → In Progress
James Page (james-page)
Changed in charm-nova-compute:
assignee: nobody → huhaoran (vennie1988)
importance: Undecided → Medium
status: New → In Progress
Changed in nova-compute (Juju Charms Collection):
status: In Progress → Invalid
huhaoran (vennie1988)
Changed in charm-nova-compute:
assignee: huhaoran (vennie1988) → nobody
Changed in nova-compute (Juju Charms Collection):
assignee: huhaoran (vennie1988) → nobody
Changed in charm-nova-compute:
status: In Progress → New
James Page (james-page)
Changed in charm-nova-compute:
status: New → Triaged
Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :
Download full text (3.2 KiB)

This just hit me when trying to deploy openstack-on-lxd ( https://github.com/openstack-charmers/openstack-on-lxd/blob/master/bundle-bionic-queens.yaml ) on a ppc64el metal machine.

```
nova-compute/0* error idle 20 10.106.108.10 hook failed: "config-changed"
```

```
2019-11-29 22:05:21 WARNING juju-log Failed to set ppc64_cpu smt state: off
2019-11-29 22:05:21 DEBUG config-changed Traceback (most recent call last):
2019-11-29 22:05:21 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 761, in <module>
2019-11-29 22:05:21 DEBUG config-changed main()
2019-11-29 22:05:21 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 754, in main
2019-11-29 22:05:21 DEBUG config-changed hooks.execute(sys.argv)
2019-11-29 22:05:21 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/core/hookenv.py", line 914, in execute
2019-11-29 22:05:21 DEBUG config-changed self._hooks[hook_name]()
2019-11-29 22:05:21 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1568, in wrapped_f
2019-11-29 22:05:21 DEBUG config-changed stopstart, restart_functions)
2019-11-29 22:05:21 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/core/host.py", line 741, in restart_on_change_helper
2019-11-29 22:05:21 DEBUG config-changed r = lambda_f()
2019-11-29 22:05:21 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1567, in <lambda>
2019-11-29 22:05:21 DEBUG config-changed (lambda: f(*args, **kwargs)), __restart_map_cache['cache'],
2019-11-29 22:05:21 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 93, in _harden_inner2
2019-11-29 22:05:21 DEBUG config-changed return f(*args, **kwargs)
2019-11-29 22:05:21 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 251, in config_changed
2019-11-29 22:05:21 DEBUG config-changed set_ppc64_cpu_smt_state('off')
2019-11-29 22:05:21 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/nova_compute_utils.py", line 595, in set_ppc64_cpu_smt_state
2019-11-29 22:05:21 DEBUG config-changed raise e
2019-11-29 22:05:21 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/nova_compute_utils.py", line 589, in set_ppc64_cpu_smt_state
2019-11-29 22:05:21 DEBUG config-changed check_output(cmd)
2019-11-29 22:05:21 DEBUG config-changed File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
2019-11-29 22:05:21 DEBUG config-changed **kwargs).stdout
2019-11-29 22:05:21 DEBUG config-changed File "/usr/lib/python3.6/subprocess.py", line 438, in run
2019-11-29 22:05:21 DEBUG config-changed output=stdout, stderr=stderr)
2019-11-29 22:05:21 DEBUG config-changed subprocess.CalledProcessError: Command '['ppc64_cpu', '--smt=off']' returned non-zero exit st...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.