Failed to create the password file during sync power state

Bug #1416298 reported by Li Shang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Erhan Ekici

Bug Description

* Detailed description of the problem and step-by-step instruction on how to reproduce it.
       I have setup an all-in-one stable/juno devstack environment on Ubuntu 14.04.1 LTS, the new added ironic node sync IPMI power status failed with error: Failed to create the password file. expected a character buffer object, and oslo.messaging with 1.5.1 will report debug log every second in Ironic conductor log like https://bugs.launchpad.net/ironic/+bug/1399257 described, upgrade oslo.messaging version to the latest 1.6.0 the issue also occurred, the oslo.messaging reported log will disappear after downgraded to 1.4.1, but the ironic node still sync IPMI power status failed.
       The command line ipmitool can check and control power status of the bare metal node successfully.

* Version: ironic stable/juno with Devstack all-in-one installation

* Output of utilities run:

     Ironic conductor logs for sync power status failed:
2015-01-29 08:54:38.443 DEBUG oslo.messaging._drivers.impl_rabbit [-] Timed out waiting for RPC response: timed out from (pid=76084) _raise_timeout_if_deadline_is_reached /usr/local/lib/python2.7/dist-packages/oslo/messaging/_drivers/impl_rabbit.py:676
2015-01-29 08:54:38.443 DEBUG oslo.messaging._drivers.impl_rabbit [-] Timed out waiting for RPC response: timed out from (pid=76084) _raise_timeout_if_deadline_is_reached /usr/local/lib/python2.7/dist-packages/oslo/messaging/_drivers/impl_rabbit.py:676

2015-01-29 08:13:26.232 WARNING ironic.drivers.modules.ipmitool [-] IPMI power status failed for node 364b9f16-70dd-449a-b405-bae03ffc4ff2 with error: Failed to create the password file. expected a character buffer object.
2015-01-29 08:13:26.232 WARNING ironic.conductor.manager [-] During sync_power_state, could not get power state for node 364b9f16-70dd-449a-b405-bae03ffc4ff2. Error: IPMI call failed: power status..

     The command line ipmitool control power status:
$ ipmitool -I lanplus -H 10.100.2.121 -U admin -P 12345678 chassis power status
Chassis Power is off
$ ipmitool -I lanplus -H 10.100.2.121 -U admin -P 12345678 chassis power on
Chassis Power Control: Up/On
$ ipmitool -I lanplus -H 10.100.2.121 -U admin -P 12345678 chassis power status
Chassis Power is on

Tags: ipmi
Revision history for this message
Erhan Ekici (erhan-ekici) wrote :

Can you change ipmi admin password from numeric value (12345678) to a string and try again?

"expected a character buffer object" error message is a python error and if it works with new password (string not a numeric value), it means that we may need "password" casting to string and then pass to write()?
---- ipmitool.py ---
f.write(password) -> f.write(str(password))
----

Revision history for this message
Li Shang (li-shang) wrote :

Changed the ipmi admin password from numeric value to a string, and retest with pxe_ipmitool driver the issue has disappeared.

Changed in ironic:
assignee: nobody → Erhan Ekici (erhan-ekici)
status: New → Confirmed
tags: added: ipmi
Changed in ironic:
status: Confirmed → In Progress
Changed in ironic:
assignee: Erhan Ekici (erhan-ekici) → Ramakrishnan G (rameshg87)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/152702
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=32437956ccfee78fbff84853f23ef468132f0734
Submitter: Jenkins
Branch: master

commit 32437956ccfee78fbff84853f23ef468132f0734
Author: Erhan Ekici <email address hidden>
Date: Wed Feb 4 00:32:10 2015 +0200

    ipmitool drivers fail with integer passwords

    ironic.drivers.modules.ipmitool gives "Failed to create the password file.
    expected a character buffer object" WARNING message and it causes "Error:
    IPMI call failed: power status..". "expected a character buffer object" is
    a python error message and raised when write() function expected string as
    input type but gets something else (i.e. int / numeric) if ipmi password
    is set just using numbers(i.e 12345678)

    This simple bug fix solves the issue by casting "password" to string.

    Change-Id: Id9645e06eb707ef21a7cb99c420309f54a95aa9b
    Closes-Bug: 1416298

Changed in ironic:
status: In Progress → Fix Committed
Dmitry Tantsur (divius)
Changed in ironic:
importance: Undecided → Medium
Ruby Loo (rloo)
Changed in ironic:
assignee: Ramakrishnan G (rameshg87) → Erhan Ekici (erhan-ekici)
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: kilo-3 → 2015.1.0
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.