From be98d7f2a12c4818aed6554b4ab3fc96cfbdb26a Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 6 Mar 2018 11:57:23 +0000 Subject: [PATCH] Deprecate the action parameter for fencing generation. We can no longer pass the action parameter to Pacemaker due to deprecation in recent releases, nor should we ever have offered the parameter in the first place. Change-Id: I6a9de20114df7f6779fa0759528ec25c343786d6 Depends-On: https://review.openstack.org/550028 Closes-Bug: #1753728 (cherry picked from commit 7eaee1b2aa71ef9c6b834746d79b6d521dfdf096) --- .../noop-fencing-action-parameter-6ca390e9ebf43796.yaml | 7 +++++++ tripleoclient/tests/v1/test_overcloud_parameters.py | 1 - tripleoclient/v1/overcloud_parameters.py | 6 +----- 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/noop-fencing-action-parameter-6ca390e9ebf43796.yaml diff --git a/releasenotes/notes/noop-fencing-action-parameter-6ca390e9ebf43796.yaml b/releasenotes/notes/noop-fencing-action-parameter-6ca390e9ebf43796.yaml new file mode 100644 index 000000000..740e1ef4f --- /dev/null +++ b/releasenotes/notes/noop-fencing-action-parameter-6ca390e9ebf43796.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + The ```action``` parameter for overcloud fencing generation is now ignored. + This is because recent versions of the underlying fencing agents now + produce an error if the action parameter is used. Previously the use of the + parameter was discouraged. diff --git a/tripleoclient/tests/v1/test_overcloud_parameters.py b/tripleoclient/tests/v1/test_overcloud_parameters.py index fc459107a..b02fe6f1e 100644 --- a/tripleoclient/tests/v1/test_overcloud_parameters.py +++ b/tripleoclient/tests/v1/test_overcloud_parameters.py @@ -145,7 +145,6 @@ class TestGenerateFencingParameters(utils.TestCommand): self.workflow.action_executions.create.assert_called_once_with( 'tripleo.parameters.generate_fencing', { - 'fence_action': None, 'nodes_json': [ { u'mac': [u'00:11:22:33:44:55'], diff --git a/tripleoclient/v1/overcloud_parameters.py b/tripleoclient/v1/overcloud_parameters.py index ee99563bb..ea95a1d5d 100644 --- a/tripleoclient/v1/overcloud_parameters.py +++ b/tripleoclient/v1/overcloud_parameters.py @@ -75,10 +75,7 @@ class GenerateFencingParameters(command.Command): def get_parser(self, prog_name): parser = super(GenerateFencingParameters, self).get_parser(prog_name) parser.add_argument('-a', '--action', dest='fence_action', - help=_('Operation to perform. Valid operations: ' - 'on, off, reboot, status, list, diag, ' - 'monitor or metadata. You should generally ' - 'not use this option.')) + help=_('DEPRECATED: This option is ignored.')) parser.add_argument('--delay', type=int, help=_('Wait DELAY seconds before fencing is ' 'started')) @@ -124,7 +121,6 @@ class GenerateFencingParameters(command.Command): workflow_input = { 'nodes_json': nodes_config, 'os_auth': os_auth, - 'fence_action': parsed_args.fence_action, 'delay': parsed_args.delay, 'ipmi_level': parsed_args.ipmi_level, 'ipmi_cipher': parsed_args.ipmi_cipher,