Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1651159

Summary: The GUI doesn't pass the user-supplied environment files in the end
Product: Red Hat OpenStack Reporter: Udi Kalifon <ukalifon>
Component: openstack-tripleo-commonAssignee: Jiri Tomasek <jtomasek>
Status: CLOSED ERRATA QA Contact: Udi Kalifon <ukalifon>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 14.0 (Rocky)CC: augol, beth.white, jjoyce, jschluet, jtomasek, mbarnett, mburns, pgrist, slinaber, tvignaud
Target Milestone: rcKeywords: Triaged
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-common-9.4.1-0.20181012010885.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-11 11:54:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1512800    

Description Udi Kalifon 2018-11-19 10:35:00 UTC
Description of problem:
I supplied a custon network-environment.yaml file and enabled it in the deployment. When I looked in plan-environment.yaml the order of the environments was such that my customizations came before network-isolation.yaml:

environments:
- path: overcloud-resource-registry-puppet.yaml
- path: environments/docker.yaml
- path: environments/docker-ha.yaml
- path: environments/network-environment.yaml
- path: environments/network-isolation.yaml
- path: environments/containers-prepare-parameter.yaml
- path: environments/ceph-ansible/ceph-ansible.yaml


Version-Release number of selected component (if applicable):
openstack-tripleo-common-container-base-9.4.1-0.20181012010875.67bab16.el7ost.noarch
openstack-tripleo-ui-9.3.1-0.20180921180342.df30b55.el7ost.noarch


How reproducible:
might be a bit random


Steps to Reproduce:
1. Upload a custom network-environmnt.yaml:
openstack object create overcloud network-environment.yaml --name environments/network-environment.yaml
2. In the GUI, open the deployment configuration dialog and enable the networ-isolation as well as the custom network-envronment.yaml which you will find under the "Other" category
3. Save the plan configuration
4. See the created plan-environment.yaml:
openstack object save overcloud plan-environment.yaml && vi plan-environment.yaml


Actual results:
The order of environment files is opposite


Expected results:
All custom environment files should come after all vendor-provided environment files (which are known via the capabilities-map file)


Additional info:
This seems to be blocking deployments.

Comment 1 Udi Kalifon 2018-11-23 15:04:43 UTC
You can also see the problem when you run the network configuration validator, on a plan with custom-supplied nic-configs. The validator fails and points to different nic-configs than the ones you supplied.

Comment 2 Jiri Tomasek 2018-11-30 08:33:36 UTC
The problem is as stated in the title - environments sorting algorithm does not apply the environments which are not included in capabilities-map.yaml at the end of the sorted list, it just skips them. The environments not included in capabilities-map.yaml should be appended to the list of sorted environments.

Comment 3 Jiri Tomasek 2018-11-30 08:34:53 UTC
Code reference of the problem: https://github.com/openstack/tripleo-common/blob/master/tripleo_common/utils/plan.py#L197

Comment 4 Jiri Tomasek 2018-12-03 09:44:17 UTC
Upstream master tripleo-common patch https://review.openstack.org/621122

Comment 5 Jiri Tomasek 2018-12-13 11:46:07 UTC
[tripleo-common, downstream backport] https://code.engineering.redhat.com/gerrit/158536

Comment 22 Udi Kalifon 2019-01-02 12:43:38 UTC
Verified: openstack-tripleo-common-9.4.1-0.20181012010886.el7ost.noarch

Unfortunately there is still randomness in the order of the environment files, and dependent files don't always come after their prerequisite files (for example docker-ha.yaml appeared before docker.yaml). A separate bug will be opened.

Comment 26 errata-xmlrpc 2019-01-11 11:54:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:0045