diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2015-04-13 14:16:22 -0500 |
---|---|---|
committer | Chris Dearborn <Christopher_Dearborn@dell.com> | 2015-05-21 10:21:01 -0400 |
commit | 1edf56dbbfef63eb7bc4d25c83f2c88fd1d99833 (patch) | |
tree | e72c777c4a739b5b11e190a3a6eaef179dcaa44d /ironic/drivers | |
parent | fc26d6ccdee192b8fdaff11d29245526bea7eee2 (diff) | |
download | ironic-1edf56dbbfef63eb7bc4d25c83f2c88fd1d99833.tar.gz |
Fix drac implementation of set_boot_device
The drac implementation of set_boot_device was not recognizing when
it did not actually need to change the boot order, which caused it to
try running a config job when there was nothing to do.
This adds a check for that condition, and exits early if there is
nothing to do.
Closes-Bug: 1454259
Change-Id: I48971c79ba3d745056ff3d3157fde08b3d566f94
Diffstat (limited to 'ironic/drivers')
-rw-r--r-- | ironic/drivers/modules/drac/management.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ironic/drivers/modules/drac/management.py b/ironic/drivers/modules/drac/management.py index 3451147d2..51c27adce 100644 --- a/ironic/drivers/modules/drac/management.py +++ b/ironic/drivers/modules/drac/management.py @@ -224,6 +224,13 @@ class DracManagement(base.ManagementInterface): :raises: DracPendingConfigJobExists on an error when creating the job. """ + + # If we are already booting from the right device, do nothing. + if self.get_boot_device(task) == {'boot_device': device, + 'persistent': persistent}: + LOG.debug('DRAC already set to boot from %s', device) + return + # Check for an existing configuration job _check_for_config_job(task.node) |