the [keystone_authtoken] in ironic.conf define
[keystone_authtoken]
password = secretservice
username = ironic
for example
http://logs.openstack.org/09/153109/2/check/check-tempest-dsvm-ironic-pxe_ssh/79080a0/logs/etc/ironic/ironic.conf.txt.gz
but in ironic/common/keystone.py that is
if token:
return client.Client(token=token, auth_url=auth_url)
else:
return client.Client(username=CONF.keystone_authtoken.admin_user,
password=CONF.keystone_authtoken.admin_password,
tenant_name=CONF.keystone_authtoken.admin_tenant_name,
region_name=CONF.keystone.region_name,
auth_url=auth_url)
https://github.com/openstack/ironic/blob/master/ironic/common/keystone.py#L67
so when the token is out of time , ironic deploy will failed as the error of authorize in Keystone
2015-02-05 00:48:18.532 DEBUG ironic.common.states [-] Exiting old state 'deploying' in response to event 'fail' from (pid=19884) on_exit /opt/stack/ironic/ironic/common/states.py:128
2015-02-05 00:48:18.533 DEBUG ironic.common.states [-] Entering new state 'deploy failed' in response to event 'fail' from (pid=19884) on_enter /opt/stack/ironic/ironic/common/states.py:134
2015-02-05 00:48:18.589 WARNING ironic.conductor.manager [-] Error in deploy of node 08a45b46-f123-4f19-a10d-faff54c8342b: Could not authorize in Keystone: A username and password or token is required.
2015-02-05 00:48:18.631 DEBUG ironic.conductor.task_manager [-] Attempting to reserve node 2 from (pid=19884) reserve_node /opt/stack/ironic/ironic/conductor/task_manager.py:193
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 457, 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 214, in main
result = function(*args, **kwargs)
File "/opt/stack/ironic/ironic/conductor/manager.py", line 1458, in do_node_deploy
_("Failed to deploy. Error: %s"))
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 1453, in do_node_deploy
new_state = task.driver.deploy.deploy(task)
File "/opt/stack/ironic/ironic/conductor/task_manager.py", line 128, in wrapper
return f(*args, **kwargs)
File "/opt/stack/ironic/ironic/drivers/modules/pxe.py", line 329, in deploy
_create_token_file(task)
File "/opt/stack/ironic/ironic/drivers/modules/pxe.py", line 258, in _create_token_file
token = keystone.get_admin_auth_token()
File "/opt/stack/ironic/ironic/common/keystone.py", line 129, in get_admin_auth_token
ksclient = _get_ksclient()
File "/opt/stack/ironic/ironic/common/keystone.py", line 76, in _get_ksclient
' %s') % err)
Hello chenglch.
this is not problem . because the following configuration is invalid. authtoken]
>[keystone_
>password = secretservice
>username = ironic
the correct configuration is bellow. authtoken]
>[keystone_
>admin_password = secretservice
>admin_user = ironic
>admin_tenant_name = service
But if the invalid configuration file is created by devstack , Please display your version of devstack.
At least I have confirmed that current master branch of devstack is working well.