Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Retry ipmitool lan set if it fails the first time (#152)
* Add drac.ipv4 to the stage1 kernel arguments. * Install ipmitool in the stage1_minimal image. * WIP: add logic to configure DRAC only if not previously configured. * Add '-y' to apt-get install. * Add sleep 60 to stage1's rc.local. * Fix typo and change awk to not use the --posix option (unsupported). * Fix syntax. * Move DRAC configuration to a separate function. * Actually configure DRAC. * Add debug strings. * Fix variable name. * Add debug sleep. * Move code under the setup_drac function and add more debugging stuff. * Add set -o pipefail. * Fix a few things. * Remove debug stuff. * Fix formatting. * Add logrun() function to avoid echoing commands. * Retry ipmitool lan set if it fails the first time. On R640s/DRAC9, changing the IP address takes a long time and ipmitool has a shorter timeout, thus it assumes the configuration failed and returns a non-zero exit code. To make this script a bit more robust, we wait 30 seconds and try again. Should it fail again, there are two possible cases: 1. Setting the IP address on this DRAC takes a *very* long time, but it eventually works 2. Setting the IP address on this DRAC does not work, for reasons we do not know. In both cases, there isn't anything else we can do during stage1.
- Loading branch information