Address comments on virtual media device label commit

This commit address last comments on
I5e8a706989bad13051eb47db0b1e762e6c672318. It adds
the date for a comment was added and removes redundant
wait period for initialization.

Change-Id: Idff38835969c094175f68be78c407ae975473b57
This commit is contained in:
Ramakrishnan G 2015-04-29 13:38:04 +00:00
parent 1540e753dc
commit acc604c490

View File

@ -24,15 +24,14 @@ function configure_vmedia_dir() {
wait_for 5 1 "ls $VMEDIA_DEVICE_BY_LABEL" wait_for 5 1 "ls $VMEDIA_DEVICE_BY_LABEL"
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
# TODO(rameshg87): This block of code is there only for backward # TODO(rameshg87) - 04/29/15 : This block of code is there only
# compatibility to older versions of Ironic. Remove this after 2 # for backward compatibility to older versions of Ironic. Remove this
# releases. Ironic will now assign labels to Virtual Media devices. # after 2 releases. Ironic will now assign labels to Virtual Media
# devices.
SYSFS_DEVICE_MODELS="/sys/class/block/*/device/model" SYSFS_DEVICE_MODELS="/sys/class/block/*/device/model"
SYSFS_VMEDIA_DEVICE_MODEL="virtual media" SYSFS_VMEDIA_DEVICE_MODEL="virtual media"
# Wait for some seconds for kernel to finish initializing the grep -q -i "$SYSFS_VMEDIA_DEVICE_MODEL" $SYSFS_DEVICE_MODELS
# virtual media devices.
wait_for 5 1 "grep -q -i \"$SYSFS_VMEDIA_DEVICE_MODEL\" $SYSFS_DEVICE_MODELS"
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
echo "Error finding the virtual floppy device on the node." echo "Error finding the virtual floppy device on the node."
troubleshoot troubleshoot