enable-ssh-admin.sh only works with default plan name (overcloud)

Bug #1896505 reported by Emilien Macchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Emilien Macchi

Bug Description

Environment: TripleO Train, deployed servers, overcloud with customized stack/plan name.

The following workflow will fail to run:
tripleo.access.v1.enable_ssh_admin

Waiting for the workflow execution to finish (id e862c392-1470-4367-a0d1-50a1b43c6bd8).Workflow e862c392-1470-4367-a0d1-50a1b43c6bd8 finished with error. Check mistral logs.

2020-09-19 00:11:37.526 7 INFO workflow_trace [-] Workflow 'tripleo.access.v1.enable_ssh_admin' [RUNNING -> ERROR, msg=Failure caused by error in tasks: get_blacklisted_ip_addresses

  get_blacklisted_ip_addresses [task_ex_id=59545a70-4b97-433d-98e8-736f6de5328c] -> The action raised an exception [action_ex_id=5b0babb9-b9c9-430a-ae26-48fd1e197960, msg='HeatAction.stacks.output_show failed: ERROR: The Stack (overcloud) could not be found.
Traceback (most recent call last):

  File "/usr/lib/python3.6/site-packages/heat/common/context.py", line 423, in wrapped
    return func(self, ctx, *args, **kwargs)

  File "/usr/lib/python3.6/site-packages/heat/engine/service.py", line 498, in identify_stack
    raise exception.EntityNotFound(entity='Stack', name=stack_name)

heat.common.exception.EntityNotFound: The Stack (overcloud) could not be found.
', action_cls='<class 'mistral.actions.action_factory.HeatAction'>', attributes='{'client_method_name': 'stacks.output_show'}', params='{'stack_id': 'overcloud', 'output_key': 'BlacklistedIpAddresses'}']
    [action_ex_id=5b0babb9-b9c9-430a-ae26-48fd1e197960, idx=0]: The action raised an exception [action_ex_id=5b0babb9-b9c9-430a-ae26-48fd1e197960, msg='HeatAction.stacks.output_show failed: ERROR: The Stack (overcloud) could not be found.
Traceback (most recent call last):

  File "/usr/lib/python3.6/site-packages/heat/common/context.py", line 423, in wrapped
    return func(self, ctx, *args, **kwargs)

  File "/usr/lib/python3.6/site-packages/heat/engine/service.py", line 498, in identify_stack
    raise exception.EntityNotFound(entity='Stack', name=stack_name)

heat.common.exception.EntityNotFound: The Stack (overcloud) could not be found.

It's because THT/deployed-server/scripts/enable-ssh-admin.sh does not override the default plan_name for the workflow task, so it tries to get infos from "overcloud" plan, which doesn't exist if when we use a custom stack name.

Changed in tripleo:
status: New → Triaged
importance: Undecided → High
milestone: none → victoria-3
assignee: nobody → Emilien Macchi (emilienm)
tags: added: train-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.opendev.org/753095

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-common (stable/train)

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/753224

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-common (stable/train)

Reviewed: https://review.opendev.org/753224
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=23e7980581533a63ea31993c8221007647dfd7ce
Submitter: Zuul
Branch: stable/train

commit 23e7980581533a63ea31993c8221007647dfd7ce
Author: Rabi Mishra <email address hidden>
Date: Tue Sep 22 11:00:28 2020 +0530

    [Train] Check for existence of stack

    In a predeployed environment only check for blacklisted
    list if the stack exists.

    This has to be fixed in cli-enable-ssh-admin.yaml for ussuri
    and later.

    Related-Bug: #1896505
    Change-Id: Ib01b09c0e38099d08b17e4c5d56fb7da801fbf5e

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.opendev.org/753095
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=bb2351a48d4a4acf7ed933094298e27d3b91c315
Submitter: Zuul
Branch: master

commit bb2351a48d4a4acf7ed933094298e27d3b91c315
Author: Emilien Macchi <email address hidden>
Date: Mon Sep 21 13:35:27 2020 -0400

    enable-ssh-admin: allow to override plan name

    By default, the overcloud plan name is "overcloud" but it can be renamed
    if the stack is named directly. Allowing the operator to override it so
    they can run that script on a deployment where the stack is named
    differently than the default.

    Change-Id: I05029d30447592d4e16d85acc490cda69b101e9c
    Closes-Bug: #1896505

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/754379

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/754380

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/ussuri)

Reviewed: https://review.opendev.org/754379
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=fdb9a3954cf76777919fd9a15d4a285700cc5ae9
Submitter: Zuul
Branch: stable/ussuri

commit fdb9a3954cf76777919fd9a15d4a285700cc5ae9
Author: Emilien Macchi <email address hidden>
Date: Mon Sep 21 13:35:27 2020 -0400

    enable-ssh-admin: allow to override plan name

    By default, the overcloud plan name is "overcloud" but it can be renamed
    if the stack is named directly. Allowing the operator to override it so
    they can run that script on a deployment where the stack is named
    differently than the default.

    Change-Id: I05029d30447592d4e16d85acc490cda69b101e9c
    Closes-Bug: #1896505
    (cherry picked from commit bb2351a48d4a4acf7ed933094298e27d3b91c315)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/train)

Reviewed: https://review.opendev.org/754380
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=ef3a39c27f43f93f890d4990627a6f8f56b5769e
Submitter: Zuul
Branch: stable/train

commit ef3a39c27f43f93f890d4990627a6f8f56b5769e
Author: Emilien Macchi <email address hidden>
Date: Mon Sep 21 13:35:27 2020 -0400

    enable-ssh-admin: allow to override plan name

    By default, the overcloud plan name is "overcloud" but it can be renamed
    if the stack is named directly. Allowing the operator to override it so
    they can run that script on a deployment where the stack is named
    differently than the default.

    Change-Id: I05029d30447592d4e16d85acc490cda69b101e9c
    Closes-Bug: #1896505
    (cherry picked from commit bb2351a48d4a4acf7ed933094298e27d3b91c315)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 11.4.0

This issue was fixed in the openstack/tripleo-heat-templates 11.4.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.