multiple methods for generating openrc files

Bug #1719369 reported by Alex Schultz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
chandan kumar

Bug Description

We currently have multiple methods[0][1][2] for generating openrc files for both the undercloud and overcloud. This leads to issues when we update api versions because we then need to fix 2 (or 3) different places. For example we recently moved to v3 on the undercloud but missed the stackrc[3] that gets generated using the containerized undercloud method.

We need to reduce the number of places that we do this for the undercloud and overcloud install so that we when we update the contents of the file that we do so in a consistent fashion. Ideally we should share the same method for overcloud and undercloud installs.

[0] https://github.com/openstack/instack-undercloud/blob/master/elements/undercloud-install/os-apply-config/root/stackrc
[1] https://github.com/openstack/tripleo-common/blob/master/tripleo_common/utils/overcloudrc.py#L76
[2] https://github.com/openstack/tripleo-heat-templates/blob/master/extraconfig/post_deploy/undercloud_post.sh#L12
[3] https://review.openstack.org/#/c/506745/

Tags: tech-debt
Changed in tripleo:
milestone: queens-3 → queens-rc1
Changed in tripleo:
milestone: queens-rc1 → rocky-1
Changed in tripleo:
milestone: rocky-1 → rocky-2
Changed in tripleo:
milestone: rocky-2 → rocky-3
Changed in tripleo:
milestone: rocky-3 → rocky-rc1
Changed in tripleo:
milestone: rocky-rc1 → stein-1
Changed in tripleo:
milestone: stein-1 → stein-2
Changed in tripleo:
milestone: stein-2 → stein-3
Revision history for this message
Juan Antonio Osorio Robles (juan-osorio-robles) wrote :

is this still an issue?

Revision history for this message
Alex Schultz (alex-schultz) wrote :

yea we do it several different places

Changed in tripleo:
milestone: stein-3 → stein-rc1
Changed in tripleo:
milestone: stein-rc1 → train-1
Revision history for this message
chandan kumar (chkumar246) wrote :
Download full text (6.0 KiB)

copying the discussion from irc tripleo meeting:
0:02:49 chandankumar ╡ If there is no any other topic in queue I want to discuss about this blueprint
                        ╡ https://blueprints.launchpad.net/tripleo/+spec/os-client-config-switch
0:03:16 +mwhahaha ╡ meh
0:03:39 ▬▬▶ ╡ rascasoft (~rascasoft@2.229.194.155) has joined #tripleo
0:03:42 +mwhahaha ╡ so we already partially implemented that for standalone
0:03:47 ℹ ╡ marios_|ruck is now known as marios|ruck|call
0:03:48 chandankumar ╡ since we have added support for clouds.yaml for standalone and undercloud
0:03:54 +mwhahaha ╡ we'd need to create a workflow for generating that for the overcloud
0:03:59 chandankumar ╡ I am about to start working on overcloud
0:04:07 +mwhahaha ╡ I would just generate both for now
0:04:15 ⤷ ╡ and we can remove the *rc files in a later release
0:04:30 chandankumar ╡ but the question is https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/extraconfig/post_deploy
                        ╡ current code and tht stuff resides here
0:04:51 ⤷ ╡ can we move the same
                        ╡ https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/extraconfig/post_deploy/clouds_yaml.py script to
                        ╡ python-tripleoclient
0:05:02 +mwhahaha ╡ it wouldn't be tripleoclient
0:05:05 ⤷ ╡ it would be in tripleo-common
0:05:09 ⤷ ╡ and tripleoclient
20:05:22 chandankumar ╡ and generate the clouds.yaml for stdanlone overcloud and undercloud │
20:05:25 +mwhahaha ╡ you'll want to find the existing stackrc generation and either modify it or duplicate it │
20:05:41 ⤷ ╡ the underclo...

Read more...

Changed in tripleo:
milestone: train-1 → train-2
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/664568

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

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

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

Reviewed: https://review.opendev.org/664568
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=3c4cb58d8162fadded40076a2e3b40a510a6e9d7
Submitter: Zuul
Branch: master

commit 3c4cb58d8162fadded40076a2e3b40a510a6e9d7
Author: Chandan Kumar (raukadah) <email address hidden>
Date: Tue Jun 11 17:45:05 2019 +0530

    Added support of overcloud os_cloud

    It includes:
    * mistral action for generating clouds.yaml once
      overcloud deployment finishes.
    * clouds_yaml.py library for generating clouds.yaml
    * Moved global vars to tripleo-common constants.

    https://review.opendev.org/#/c/664586/ adds the review in
    python-tripleoclient to create the clouds.yaml for
    overcloud by calling the above mistral actions.

    Related-Bug: #1719369

    Change-Id: Ie9004222ca5f77031795eaa4b4a757da8b409d05
    Signed-off-by: Chandan Kumar (raukadah) <email address hidden>

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

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

commit 41d9901ef282bda16f6784be53dd1287442f671c
Author: Chandan Kumar (raukadah) <email address hidden>
Date: Mon Jun 17 13:41:52 2019 +0530

    Reuse clouds_yaml.py from tripleo-common in tht

    clouds_yaml.py script is used to generate clouds.yaml
    for undercloud and standalone. It is now refactored and moved
    to tripleo-common module[1] and can be reused here.

    [1.]https://review.opendev.org/#/c/664586/

    Related-Bug: #1719369
    Depends-On: https://review.opendev.org/#/c/664586/

    Change-Id: I50b37df1a87472a16e2d5d2c588c728d2a7a5c76
    Signed-off-by: Chandan Kumar (raukadah) <email address hidden>

Changed in tripleo:
milestone: train-2 → train-3
Changed in tripleo:
milestone: train-3 → ussuri-1
Luke Short (ekultails)
Changed in tripleo:
assignee: nobody → chandankumar (chandankumar-093047)
status: Triaged → Fix Released
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.