Here is my cluster
$nova host-list
+---------------+-------------+----------+
| host_name | service | zone |
+---------------+-------------+----------+
| ic4-ctl01-*** | cert | internal |
| ic4-ctl01-*** | consoleauth | internal |
| ic4-ctl01-*** | conductor | internal |
| ic4-ctl01-*** | scheduler | internal |
| ic4-cpu15-*** | compute | nova |
| ic4-cpu07-*** | compute | nova |
| ic4-cpu03-*** | compute | nova |
| ic4-cpu01-*** | compute | nova |
| ic4-cpu04-*** | compute | nova |
| ic4-cpu08-*** | compute | nova |
| ic4-cpu02-*** | compute | nova |
| ic4-cpu06-*** | compute | nova |
+---------------+-------------+----------+
and rally scenario returns this error
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/rally/task/runner.py", line 72, in _run_scenario_once
getattr(scenario_inst, method_name)(**scenario_kwargs)
File "/usr/local/lib/python2.7/dist-packages/rally/plugins/openstack/scenarios/nova/hosts.py", line 60, in run
self._get_host(host.host_name, atomic_action=False)
File "/usr/local/lib/python2.7/dist-packages/rally/task/atomic.py", line 115, in func_atomic_actions
f = func(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/rally/plugins/openstack/scenarios/nova/utils.py", line 1063, in _get_host
return self.admin_clients("nova").hosts.get(host_name)
File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/hosts.py", line 65, in get
return self._list("/os-hosts/%s" % host, "host")
File "/usr/local/lib/python2.7/dist-packages/novaclient/base.py", line 254, in _list
resp, body = self.api.client.get(url)
File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 223, in get
return self.request(url, 'GET', **kwargs)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 80, in request
raise exceptions.from_response(resp, body, url, method)
NotFound: Compute host ic4-ctl01-*** could not be found. (HTTP 404) (Request-ID: req-553c16ff-73a7-4610-8011-a66cd8570b80)
Did update to the code to make it work
rally/rally/plugins/openstack/scenarios/nova/hosts.py
The current version:
def run(self, zone=None):
...
hosts = self._list_hosts(zone)
with atomic.ActionTimer(self, "nova.get_%s_hosts" % len(hosts)):
for host in hosts: self._get_host(host.host_name, atomic_action=False)
Added:
if host.service == "compute":
self._get_host(host.host_name, atomic_action=False)
Here is my cluster ------- --+---- ------- --+---- ------+ ------- --+---- ------- --+---- ------+ ------- --+---- ------- --+---- ------+
$nova host-list
+------
| host_name | service | zone |
+------
| ic4-ctl01-*** | cert | internal |
| ic4-ctl01-*** | consoleauth | internal |
| ic4-ctl01-*** | conductor | internal |
| ic4-ctl01-*** | scheduler | internal |
| ic4-cpu15-*** | compute | nova |
| ic4-cpu07-*** | compute | nova |
| ic4-cpu03-*** | compute | nova |
| ic4-cpu01-*** | compute | nova |
| ic4-cpu04-*** | compute | nova |
| ic4-cpu08-*** | compute | nova |
| ic4-cpu02-*** | compute | nova |
| ic4-cpu06-*** | compute | nova |
+------
and rally scenario returns this error lib/python2. 7/dist- packages/ rally/task/ runner. py", line 72, in _run_scenario_once scenario_ inst, method_ name)(* *scenario_ kwargs) lib/python2. 7/dist- packages/ rally/plugins/ openstack/ scenarios/ nova/hosts. py", line 60, in run _get_host( host.host_ name, atomic_ action= False) lib/python2. 7/dist- packages/ rally/task/ atomic. py", line 115, in func_atomic_actions lib/python2. 7/dist- packages/ rally/plugins/ openstack/ scenarios/ nova/utils. py", line 1063, in _get_host clients( "nova") .hosts. get(host_ name) lib/python2. 7/dist- packages/ novaclient/ v2/hosts. py", line 65, in get "/os-hosts/ %s" % host, "host") lib/python2. 7/dist- packages/ novaclient/ base.py" , line 254, in _list client. get(url) lib/python2. 7/dist- packages/ keystoneauth1/ adapter. py", line 223, in get lib/python2. 7/dist- packages/ novaclient/ client. py", line 80, in request from_response( resp, body, url, method) 73a7-4610- 8011-a66cd8570b 80)
Traceback (most recent call last):
File "/usr/local/
getattr(
File "/usr/local/
self.
File "/usr/local/
f = func(self, *args, **kwargs)
File "/usr/local/
return self.admin_
File "/usr/local/
return self._list(
File "/usr/local/
resp, body = self.api.
File "/usr/local/
return self.request(url, 'GET', **kwargs)
File "/usr/local/
raise exceptions.
NotFound: Compute host ic4-ctl01-*** could not be found. (HTTP 404) (Request-ID: req-553c16ff-
Did update to the code to make it work
rally/rally/ plugins/ openstack/ scenarios/ nova/hosts. py hosts(zone) ActionTimer( self, "nova.get_%s_hosts" % len(hosts)):
self. _get_host( host.host_ name, atomic_ action= False)
The current version:
def run(self, zone=None):
...
hosts = self._list_
with atomic.
for host in hosts:
Added:
if host.service == "compute": _get_host( host.host_ name, atomic_ action= False)
self.
And this fixed issue