Avoid persistent storage modification by request
Ironic driver support "check and live as is" partitioning operation. It is used to in "redeploy" node after hardware failure. Ususally some files are changes since time when node was deployed. And usually we need to keep this files "as is" too. The problem appers in "do_install_os" deployment step. It revert all files to state stored into deploing image. This update disable "do_install_os" when "check and live as is" partitioning operation is requested. Change-Id: I978059ec28444389e5a1b18ae0a20af0e1a71a45
This commit is contained in:
parent
8ebb6bdfea
commit
8504a657ac
|
@ -25,6 +25,7 @@ import six
|
|||
|
||||
from bareon.actions import configdrive
|
||||
from bareon.actions import partitioning
|
||||
from bareon.drivers.data import generic as generic_data_driver
|
||||
from bareon.drivers.deploy.base import BaseDeployDriver
|
||||
from bareon.drivers.deploy import mixins
|
||||
from bareon import errors
|
||||
|
@ -82,7 +83,14 @@ class GenericDeployDriver(BaseDeployDriver, mixins.MountableMixin):
|
|||
LOG.debug('--- Provisioning (do_provisioning) ---')
|
||||
self.do_partitioning()
|
||||
self.do_configdrive()
|
||||
map(self.do_install_os, self.driver.get_os_ids())
|
||||
|
||||
avoid_storage_modification = False
|
||||
if isinstance(self.driver, generic_data_driver.GenericDataDriver):
|
||||
if self.driver.partitions_policy == 'verify':
|
||||
avoid_storage_modification = True
|
||||
if not avoid_storage_modification:
|
||||
map(self.do_install_os, self.driver.get_os_ids())
|
||||
|
||||
if self.driver.is_multiboot:
|
||||
self.do_multiboot_bootloader()
|
||||
LOG.debug('--- Provisioning END (do_provisioning) ---')
|
||||
|
|
Loading…
Reference in New Issue