config/puppet-manifests/src/modules/platform/lib/facter/is_standalone_controller.rb
Ovidiu Poncea 19a756882b puppet: Fix AIO SX cinder disk replacement
Cinder's DRBD is left in "Inconsistent" state when a disk
replacement is attempted on AIO SX.

The fix enables DRBD cinder volumes reconfiguration in two cases:
1) At initial configuration,
2) When disk is replaced.

A disk replacement is triggered from sysinv by removing
the checkpoint file behind is_node_cinder_lvm.

On SX we have to wait for disk wipe confirmation before
updating DB otherwise user may unlock host without wipe
and operation won't be retried leading to major, possibly
unrecoverable, problems with cinder-volumes disk.
If DB was not updated, operation will be retried on reboot
ensuring that the disk is indeed wiped.

Change-Id: Ia3391b2437d309c71bb525b8167ac55d727b3ab2
2018-06-28 22:07:38 -04:00

9 lines
235 B
Ruby

# Returns true is this is the only configured controller in the system else
# return false if both controllers are configured.
Facter.add("is_standalone_controller") do
setcode do
File.exist?('/etc/platform/simplex')
end
end