Can't add service mapping from user environment

Bug #1817539 reported by Rabi Mishra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Rabi Mishra

Bug Description

It seems we can't add a service resource mapping from an user environment file. This is possible a regression after https://github.com/openstack/tripleo-common/commit/5798748cb5f0e182f8f3066e70f7989555f06742

Steps to reproduce:

dummy_env.yaml

resource_registry:
  OS::TripleO::Services::Dummy: OS::Heat::None

Change roles_data to add this service to a role.

Overcloud deploy fails with:

#openstack overcloud deploy --templates /usr/share/openstack-tripleo-heat-templates -e /home/stack/virt/dummy.yaml -r /home/stack/virt/roles_with_dummy.yaml

    Started Mistral Workflow tripleo.validations.v1.check_pre_deployment_validations. Execution ID: 9cd932b8-9872-404e-8a59-9668c88f70d6
    Waiting for messages on queue 'tripleo' with no timeout.
    Creating Swift container to store the plan
    Creating plan from template files in: /tmp/tripleoclient-5Qxt2G/tripleo-heat-templates
    Started Mistral Workflow tripleo.plan_management.v1.create_deployment_plan. Execution ID: a17d8b4f-4f84-4e28-94e8-617797dfeb96
    Error validating environment for plan overcloud: ERROR: The Resource Type (OS::TripleO::Services::Dummy) could not be found.
    Exception creating plan: Error validating environment for plan overcloud: ERROR: The Resource Type (OS::TripleO::Services::Dummy) could not be found.

Rabi Mishra (rabi)
Changed in tripleo:
assignee: nobody → Rabi Mishra (rabi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

Fix proposed to branch: master
Review: https://review.openstack.org/639072

Changed in tripleo:
status: New → In Progress
Rabi Mishra (rabi)
Changed in tripleo:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/639073

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/639080

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-tripleoclient (stable/queens)

Change abandoned by Rabi Mishra (<email address hidden>) on branch: stable/queens
Review: https://review.openstack.org/639073
Reason: By mistake pushed to stable/queens first :D

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/639072
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=762bf8c9e7bcfbbc4b6682e5f7c6347e213ad622
Submitter: Zuul
Branch: master

commit 762bf8c9e7bcfbbc4b6682e5f7c6347e213ad622
Author: Rabi Mishra <email address hidden>
Date: Thu Feb 21 17:34:17 2019 +0530

    Don't always validate heat stack when adding parameters

    There are certain cases we add parameters to plan environment
    when creating and updating a plan. As part of that action we
    aslo try to validate the stack/template. However, validation
    would fail, if we've resource mappings in user-environment that
    are not merged/added to the plan yet.

    This adds new input flag to plan create and update workflows which
    can then be changed in python-tripleoclient, so as not to imapct the
    UI workflows.

    Change-Id: I9c54379925339eaaa9a0ee61cb823bddc95737c7
    Partial-Bug: #1817539

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/639080
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=eae703d52d1fcacd3aa3e253dd2cb74a3abd0ca1
Submitter: Zuul
Branch: master

commit eae703d52d1fcacd3aa3e253dd2cb74a3abd0ca1
Author: Rabi Mishra <email address hidden>
Date: Mon Feb 25 17:04:46 2019 +0530

    Don't validate stack when creating/updating plan

    There may be resource mappings in user_environment.

    Change-Id: Ia2299698dfb5d7afb374e9ac2d7908c7cc6bbc22
    Closes-Bug: #1817539
    Depends-On: https://review.openstack.org/639072

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

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/641190

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/641191

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

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/641192

Changed in tripleo:
milestone: none → stein-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/rocky)

Reviewed: https://review.openstack.org/641190
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=5ae6367d033cd9b435f9326a41a9ffa12adaa1ac
Submitter: Zuul
Branch: stable/rocky

commit 5ae6367d033cd9b435f9326a41a9ffa12adaa1ac
Author: Rabi Mishra <email address hidden>
Date: Thu Feb 21 17:34:17 2019 +0530

    Don't always validate heat stack when adding parameters

    There are certain cases we add parameters to plan environment
    when creating and updating a plan. As part of that action we
    aslo try to validate the stack/template. However, validation
    would fail, if we've resource mappings in user-environment that
    are not merged/added to the plan yet.

    This adds new input flag to plan create and update workflows which
    can then be changed in python-tripleoclient, so as not to imapct the
    UI workflows.

    Also includes I56258428d7a9461af64055a5605f3227bfadda2f that fixes
    some issues with this patch on master.

    Change-Id: I9c54379925339eaaa9a0ee61cb823bddc95737c7
    Partial-Bug: #1817539
    (cherry picked from commit 762bf8c9e7bcfbbc4b6682e5f7c6347e213ad622)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 11.3.0

This issue was fixed in the openstack/python-tripleoclient 11.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/rocky)

Reviewed: https://review.openstack.org/641191
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=4b01ede2b632db7666246a685e7a9d8c017a0c17
Submitter: Zuul
Branch: stable/rocky

commit 4b01ede2b632db7666246a685e7a9d8c017a0c17
Author: Rabi Mishra <email address hidden>
Date: Mon Feb 25 17:04:46 2019 +0530

    Don't validate stack when creating/updating plan

    There may be resource mappings in user_environment.

    Change-Id: Ia2299698dfb5d7afb374e9ac2d7908c7cc6bbc22
    Closes-Bug: #1817539
    Depends-On: https://review.openstack.org/641190
    (cherry picked from commit eae703d52d1fcacd3aa3e253dd2cb74a3abd0ca1)

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

Reviewed: https://review.openstack.org/641192
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=e5207aedee1b44aae4a1c0ad635ad1b3184968d7
Submitter: Zuul
Branch: stable/queens

commit e5207aedee1b44aae4a1c0ad635ad1b3184968d7
Author: Rabi Mishra <email address hidden>
Date: Thu Feb 21 17:34:17 2019 +0530

    Don't always validate heat stack when adding parameters

    There are certain cases we add parameters to plan environment
    when creating and updating a plan. As part of that action we
    aslo try to validate the stack/template. However, validation
    would fail, if we've resource mappings in user-environment that
    are not merged/added to the plan yet.

    This adds new input flag to plan create and update workflows which
    can then be changed in python-tripleoclient, so as not to imapct the
    UI workflows.

    Also includes I56258428d7a9461af64055a5605f3227bfadda2f that fixes
    some issues with this patch on master.

    Conflicts:
     workbooks/plan_management.yaml
     workbooks/swift_backup.yaml

    Change-Id: I9c54379925339eaaa9a0ee61cb823bddc95737c7
    Partial-Bug: #1817539
    (cherry picked from commit 762bf8c9e7bcfbbc4b6682e5f7c6347e213ad622)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/queens)

Reviewed: https://review.openstack.org/639073
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=0d6a687ed1c1b0d9a71ba20e0eda25ac13660100
Submitter: Zuul
Branch: stable/queens

commit 0d6a687ed1c1b0d9a71ba20e0eda25ac13660100
Author: Rabi Mishra <email address hidden>
Date: Mon Feb 25 17:04:46 2019 +0530

    Don't validate stack when creating/updating plan

    There may be resource mappings in user_environment.

    Change-Id: Ia2299698dfb5d7afb374e9ac2d7908c7cc6bbc22
    Closes-Bug: #1817539
    Depends-On: https://review.openstack.org/641192
    (cherry picked from commit eae703d52d1fcacd3aa3e253dd2cb74a3abd0ca1)

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

Related fix proposed to branch: stable/rocky
Review: https://review.opendev.org/665852

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-common (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/666211

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

Reviewed: https://review.opendev.org/665852
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=b41d18c5f83a33ef37c3579b5c84b02db3ddf82a
Submitter: Zuul
Branch: stable/rocky

commit b41d18c5f83a33ef37c3579b5c84b02db3ddf82a
Author: Thomas Herve <email address hidden>
Date: Thu Dec 6 12:17:56 2018 +0100

    Only update parameters once in backup workflow

    In the swift backup workflow we create 2 parameters for temp URLs, but
    we don't need to call parameters.update twice, just once with the two
    new parameters.

    It also includes fix for 'create_ceph_ansible_fetch_directory_backup_plan'
    task to pass the 'validate_stack' input.

    Change-Id: I75b64dca102a62c06c56327cf425451ae804e3b9
    Related-Bug: #1817539
    (cherry picked from commit e07dc79693ef1300a8b4cb900effe95314f18fac)

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

Related fix proposed to branch: stable/queens
Review: https://review.opendev.org/666490

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

Reviewed: https://review.opendev.org/666490
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=8a9409d5a4c6779f8587bb309b3804adb458394a
Submitter: Zuul
Branch: stable/queens

commit 8a9409d5a4c6779f8587bb309b3804adb458394a
Author: Rabi Mishra <email address hidden>
Date: Thu Jun 20 10:56:45 2019 +0530

    Only update parameters once in backup workflow

    In the swift backup workflow we create 2 parameters for temp URLs, but
    we don't need to call parameters.update twice, just once with the two
    new parameters.

    Change-Id: I75b64dca102a62c06c56327cf425451ae804e3b9
    Related-Bug: #1817539
    (cherry picked from commit e07dc79693ef1300a8b4cb900effe95314f18fac)
    (cherry picked from commit b41d18c5f83a33ef37c3579b5c84b02db3ddf82a)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 10.7.0

This issue was fixed in the openstack/python-tripleoclient 10.7.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 9.3.0

This issue was fixed in the openstack/python-tripleoclient 9.3.0 release.

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

Reviewed: https://review.opendev.org/666211
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=0f8d76303cc642865d314162bf0227b4a78c3b27
Submitter: Zuul
Branch: master

commit 0f8d76303cc642865d314162bf0227b4a78c3b27
Author: Rabi Mishra <email address hidden>
Date: Wed Jun 19 09:20:24 2019 +0530

    Don't validate stack in task for backup ceph fetch dir

    We don't have user environment available yet to validate
    the stack properly.

    Change-Id: I0bccc7f00e4ff471b8dea3b92895145b50609500
    Related-Bug: #1817539

Revision history for this message
Shyam (shyam.biradar) wrote :

Hi,

Have we covered cloud update scenario here?

I am facing this exact issue on stein with cloud update.
1. Deploy overcloud
2. Now, register new heat resources through environment file
3. Update cloud. It's failing at stack validate step.

Revision history for this message
Shyam (shyam.biradar) wrote :

I am using following tripleoclient version.
(undercloud) [stack@undercloudstein redhat-director-scripts]$ rpm -qa | grep tripleoclient
python3-tripleoclient-11.5.1-0.20190829110437.9b9b5aa.el8ost.noarch

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.