Comment 4 for bug 1291991

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

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

commit a6146ed69159bef7eec917f5efa71bc6dcbc7f7c
Author: Dan Prince <email address hidden>
Date: Thu Mar 13 16:52:19 2014 -0400

    Run ipmi power status less aggressively

    Ironic runs IPMI 'power status' in a loop until the desired state is
    reached. Running repeated IPMI commands in a tight loop (1 second sleep)
    seems to occasionally cause 'insufficient resources' errors with some
    hardware types.

    In this commit we update the IPMI retry timer to use a
    DynamicLoopingCall which can wait longer for each retry of the power
    status command. We increase the wait time exponentially
    between each call, until the total time would exceed the max retry time
    on the next iteration.

    This patch also removes the spurious initial 'power status' call which
    preceeded the 'power on' or 'power off' call without any gap. Since
    Ironic has a periodic task to sync the power state, it is safe to assume
    that the hardware's current power state is already known and does not
    need to be verified inside the set_power_state method.

    As part of this change we also increase the default IPMI retry_timeout
    config to 60 seconds.

    Co-authored-by: Dan Prince <email address hidden>

    Change-Id: Ie0e29239592bb64c7a10ecedae299df2c5053359
    Closes-bug: #1291991