Merge "Remove update abort"
This commit is contained in:
commit
e8b0a54a30
8
releasenotes/notes/remove-abort-9aa90d73d09507c9.yaml
Normal file
8
releasenotes/notes/remove-abort-9aa90d73d09507c9.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
fixes:
|
||||
- The update abort command was introduced many releases ago. However, it is
|
||||
not a safe operation in the context of TripleO. The TripleO Heat stack
|
||||
could become irrepairably damage should a rollback be attempted. As such,
|
||||
it is best to remove this functionality without a deprecation period.
|
||||
The workaround for this command is to wait until the stack times out or
|
||||
completes the update.
|
@ -81,7 +81,6 @@ openstack.tripleoclient.v1 =
|
||||
overcloud_profiles_match = tripleoclient.v1.overcloud_profiles:MatchProfiles
|
||||
overcloud_profiles_list = tripleoclient.v1.overcloud_profiles:ListProfiles
|
||||
overcloud_raid_create = tripleoclient.v1.overcloud_raid:CreateRAID
|
||||
overcloud_update_abort = tripleoclient.v1.overcloud_update:AbortUpdateOvercloud
|
||||
overcloud_update_clear_breakpoints = tripleoclient.v1.overcloud_update:ClearBreakpointsOvercloud
|
||||
overcloud_update_stack = tripleoclient.v1.overcloud_update:UpdateOvercloud
|
||||
overcloud_execute = tripleoclient.v1.overcloud_execute:RemoteExecute
|
||||
|
@ -47,10 +47,6 @@ class UpdateOvercloud(command.Command):
|
||||
)
|
||||
parser.add_argument('-i', '--interactive', dest='interactive',
|
||||
action='store_true')
|
||||
parser.add_argument('-a', '--abort', dest='abort_update',
|
||||
action='store_true',
|
||||
help=_('DEPRECATED. Please use the command'
|
||||
'"openstack overcloud update abort"'))
|
||||
parser.add_argument(
|
||||
'-e', '--environment-file', metavar='<HEAT ENVIRONMENT FILE>',
|
||||
action='append', dest='environment_files',
|
||||
@ -92,31 +88,6 @@ class UpdateOvercloud(command.Command):
|
||||
parsed_args.stack))
|
||||
|
||||
|
||||
class AbortUpdateOvercloud(command.Command):
|
||||
"""Aborts a package update on overcloud nodes"""
|
||||
|
||||
log = logging.getLogger(__name__ + ".AbortUpdateOvercloud")
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
parser = super(AbortUpdateOvercloud, self).get_parser(prog_name)
|
||||
parser.add_argument('stack', nargs='?',
|
||||
help=_('Name or ID of heat stack to abort a '
|
||||
'running update '
|
||||
'(default=Env: OVERCLOUD_STACK_NAME)'),
|
||||
default=utils.env('OVERCLOUD_STACK_NAME'))
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
clients = self.app.client_manager
|
||||
|
||||
heat = clients.orchestration
|
||||
|
||||
stack = oooutils.get_stack(heat, parsed_args.stack)
|
||||
|
||||
package_update.abort_update(clients, stack_id=stack.id)
|
||||
|
||||
|
||||
class ClearBreakpointsOvercloud(command.Command):
|
||||
"""Clears a set of breakpoints on a currently updating overcloud"""
|
||||
|
||||
|
@ -67,24 +67,6 @@ def update_and_wait(log, clients, stack, plan_name, verbose_level,
|
||||
return stack.status
|
||||
|
||||
|
||||
def abort_update(clients, **workflow_input):
|
||||
|
||||
workflow_client = clients.workflow_engine
|
||||
tripleoclients = clients.tripleoclient
|
||||
workflow_input['queue_name'] = str(uuid.uuid4())
|
||||
queue_name = workflow_input['queue_name']
|
||||
|
||||
execution = base.start_workflow(
|
||||
workflow_client,
|
||||
'tripleo.package_update.v1.cancel_stack_update',
|
||||
workflow_input=workflow_input
|
||||
)
|
||||
|
||||
with tripleoclients.messaging_websocket(queue_name) as ws:
|
||||
for payload in base.wait_for_messages(workflow_client, ws, execution):
|
||||
assert payload['status'] == "SUCCESS", pprint.pformat(payload)
|
||||
|
||||
|
||||
def clear_breakpoints(clients, **workflow_input):
|
||||
workflow_client = clients.workflow_engine
|
||||
tripleoclients = clients.tripleoclient
|
||||
|
Loading…
x
Reference in New Issue
Block a user