Ovirt skip fencing gluster (#52580)

* add fencing options for ovirt cluster

* add version_added to ovirt_cluster module

* add description of fencing options
This commit is contained in:
Martin Nečas 2019-02-26 11:47:23 +01:00 committed by ansibot
parent 0b1cfa52e6
commit 73e7a12c4f

View file

@ -114,6 +114,19 @@ options:
- "If I(True) enables fencing on the cluster." - "If I(True) enables fencing on the cluster."
- "Fencing is enabled by default." - "Fencing is enabled by default."
type: bool type: bool
fence_skip_if_gluster_bricks_up:
description:
- "A flag indicating if fencing should be skipped if Gluster bricks are up and running in the host being fenced."
- "This flag is optional, and the default value is `false`."
type: bool
version_added: "2.8"
fence_skip_if_gluster_quorum_not_met:
description:
- "A flag indicating if fencing should be skipped if Gluster bricks are up and running and Gluster quorum will not
be met without those bricks."
- "This flag is optional, and the default value is `false`."
type: bool
version_added: "2.8"
fence_skip_if_sd_active: fence_skip_if_sd_active:
description: description:
- "If I(True) any hosts in the cluster that are Non Responsive - "If I(True) any hosts in the cluster that are Non Responsive
@ -458,6 +471,8 @@ class ClustersModule(BaseModule):
) if self.param('resilience_policy') else None, ) if self.param('resilience_policy') else None,
fencing_policy=otypes.FencingPolicy( fencing_policy=otypes.FencingPolicy(
enabled=self.param('fence_enabled'), enabled=self.param('fence_enabled'),
skip_if_gluster_bricks_up=self.param('fence_skip_if_gluster_bricks_up'),
skip_if_gluster_quorum_not_met=self.param('fence_skip_if_gluster_quorum_not_met'),
skip_if_connectivity_broken=otypes.SkipIfConnectivityBroken( skip_if_connectivity_broken=otypes.SkipIfConnectivityBroken(
enabled=self.param('fence_skip_if_connectivity_broken'), enabled=self.param('fence_skip_if_connectivity_broken'),
threshold=self.param('fence_connectivity_threshold'), threshold=self.param('fence_connectivity_threshold'),
@ -472,6 +487,8 @@ class ClustersModule(BaseModule):
self.param('fence_enabled') is not None or self.param('fence_enabled') is not None or
self.param('fence_skip_if_sd_active') is not None or self.param('fence_skip_if_sd_active') is not None or
self.param('fence_skip_if_connectivity_broken') is not None or self.param('fence_skip_if_connectivity_broken') is not None or
self.param('fence_skip_if_gluster_bricks_up') is not None or
self.param('fence_skip_if_gluster_quorum_not_met') is not None or
self.param('fence_connectivity_threshold') is not None self.param('fence_connectivity_threshold') is not None
) else None, ) else None,
display=otypes.Display( display=otypes.Display(
@ -584,6 +601,8 @@ class ClustersModule(BaseModule):
equal(self.param('vm_reason'), entity.optional_reason) and equal(self.param('vm_reason'), entity.optional_reason) and
equal(self.param('spice_proxy'), getattr(entity.display, 'proxy', None)) and equal(self.param('spice_proxy'), getattr(entity.display, 'proxy', None)) and
equal(self.param('fence_enabled'), entity.fencing_policy.enabled) and equal(self.param('fence_enabled'), entity.fencing_policy.enabled) and
equal(self.param('fence_skip_if_gluster_bricks_up'), entity.fencing_policy.skip_if_gluster_bricks_up) and
equal(self.param('fence_skip_if_gluster_quorum_not_met'), entity.fencing_policy.skip_if_gluster_quorum_not_met) and
equal(self.param('fence_skip_if_sd_active'), entity.fencing_policy.skip_if_sd_active.enabled) and equal(self.param('fence_skip_if_sd_active'), entity.fencing_policy.skip_if_sd_active.enabled) and
equal(self.param('fence_skip_if_connectivity_broken'), entity.fencing_policy.skip_if_connectivity_broken.enabled) and equal(self.param('fence_skip_if_connectivity_broken'), entity.fencing_policy.skip_if_connectivity_broken.enabled) and
equal(self.param('fence_connectivity_threshold'), entity.fencing_policy.skip_if_connectivity_broken.threshold) and equal(self.param('fence_connectivity_threshold'), entity.fencing_policy.skip_if_connectivity_broken.threshold) and
@ -638,6 +657,8 @@ def main():
rng_sources=dict(default=None, type='list'), rng_sources=dict(default=None, type='list'),
spice_proxy=dict(default=None), spice_proxy=dict(default=None),
fence_enabled=dict(default=None, type='bool'), fence_enabled=dict(default=None, type='bool'),
fence_skip_if_gluster_bricks_up=dict(default=None, type='bool'),
fence_skip_if_gluster_quorum_not_met=dict(default=None, type='bool'),
fence_skip_if_sd_active=dict(default=None, type='bool'), fence_skip_if_sd_active=dict(default=None, type='bool'),
fence_skip_if_connectivity_broken=dict(default=None, type='bool'), fence_skip_if_connectivity_broken=dict(default=None, type='bool'),
fence_connectivity_threshold=dict(default=None, type='int'), fence_connectivity_threshold=dict(default=None, type='int'),