Drivers that make use of temp files like the ipmitool driver should validate that a temp file can be created at startup to avoid errors like this:
2015-02-27 18:34:12.224 3119 WARNING ironic.drivers.modules.ipmitool [-] IPMI power status failed for node a8cb6624-0d9f-c882-affc-046ebb96ec01 with error: Failed to create the password file. Unexpected error while running command.
Command: ipmitool -I lanplus -H 192.168.122.1 -L ADMINISTRATOR -U root -R 12 -N 5 -f /tmp/tmpLNe1uk power status
Exit code: 1
Stdout: u''
Stderr: u'Error: Unable to establish IPMI v2 / RMCP+ session\nError: Unable to establish IPMI v2 / RMCP+ session\nError: Unable to establish IPMI v2 / RMCP+ session\nUnable to get Chassis Power Status\n'.
2015-02-27 18:34:12.225 3119 WARNING ironic.conductor.manager [-] During sync_power_state, could not get power state for node a8cb6624-0d9f-c882-affc-046ebb96ec01. Error: IPMI call failed: power status..
2015-02-27 18:34:12.231 3119 ERROR ironic.conductor.manager [-] During sync_power_state, max retries exceeded for node a8cb6624-0d9f-c882-affc-046ebb96ec01, node state None does not match expected state 'None'. Updating DB state to 'None' Switching node to maintenance mode.
I think this bug is partially because of a try block which is too big. I have submitted a patch for that here: /review. openstack. org/#/c/ 161803/
https:/
Because of that the error message is misleading with:
error: Failed to create the password file. Unexpected error while running command.
I don't believe actually failed to create the password file. What happened was the call to ipmitool returned 1 and raised an exception which was then caught by the try block in the make_password_file function