Remove update abort

The update abort is not reliable, and could mess up a TripleO stack
beyond repair. Since this has a potential for data loss, I would
suggest this be removed without a deprecation period.

Change-Id: Ieec4f01e38768eafb3df1f06340bdd3e220d30bd
Related-Bug: #1668269
(cherry picked from commit 1d3231de5a)
This commit is contained in:
Brad P. Crochet 2017-03-23 13:18:04 -04:00
parent 5372231390
commit 879d73c5a4
4 changed files with 8 additions and 48 deletions

View 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.

View File

@ -79,7 +79,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

View File

@ -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"""

View File

@ -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:
message = ws.wait_for_message(execution.id)
assert message['status'] == "SUCCESS", pprint.pformat(message)
def clear_breakpoints(clients, **workflow_input):
workflow_client = clients.workflow_engine
tripleoclients = clients.tripleoclient