Bug 1477369

Summary: python-openstackclient: We're forced to run 'openstack overcloud container image prepare" twice with different namespace for generating --env-file and --images-file..
Product: Red Hat OpenStack Reporter: Alexander Chuzhoy <sasha>
Component: openstack-tripleo-commonAssignee: Steve Baker <sbaker>
Status: CLOSED ERRATA QA Contact: Omri Hochman <ohochman>
Severity: low Docs Contact:
Priority: low    
Version: 13.0 (Queens)CC: agurenko, apevec, dprince, emacchi, hbrock, jjoyce, jslagle, lhh, mburns, ohochman, rhel-osp-director-maint, sbaker, sclewis, slinaber, srevivo
Target Milestone: betaKeywords: Triaged
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-common-8.5.1-0.20180326153322.91f52e9.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-27 13:33: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:

Description Alexander Chuzhoy 2017-08-01 22:19:16 UTC
python-openstackclient: We're forced to run 'openstack overcloud container image prepare" twice with different namespace for generating --env-file and --images-file.

Environment:
instack-undercloud-7.1.1-0.20170714211622.el7ost.noarch
openstack-puppet-modules-10.0.0-0.20170315222135.0333c73.el7.1.noarch
openstack-tripleo-heat-templates-7.0.0-0.20170721174554.el7ost.noarch
python-openstackclient-3.11.0-0.20170613232431.c69304e.el7ost.noarch



To create an env-file we run:
openstack overcloud container image prepare --namespace=<FQDN:PORT/namespace> --env-file <filename> ...<args>


To create --images-file we run:
openstack overcloud container image prepare --namespace <namespace>   --images-file <filename>  --pull-source <FQDN:PORT>



1) 
Providing a different namespace is confusing.

2)
Can we make it possible generating both files in a single run.

Comment 1 Steve Baker 2017-08-02 21:58:41 UTC
To be clear, I think that when deploying from a local registry I think it is correct to run prepare twice, because you're preparing for two different tasks against two different registries.

However I do want to fix the consistency issue of
--namespace=<FQDN:PORT/namespace>
vs
--namespace <namespace>

I've raised a bug upstream so that --pull-source is deprecated and --namespace=<FQDN:PORT/namespace> is used consistently.

Comment 2 Steve Baker 2017-10-02 20:39:03 UTC
In Queens the following commands will be replaced with a single command backed by a mistral workflow. This workflow will also be invoked from the UI:

  overcloud container image prepare
  overcloud container image tag discover
  overcloud container image upload

Comment 7 Steve Baker 2018-03-26 23:02:49 UTC
This is now ready for testing.

If the local undercloud is being used, only a single prepare call is needed. Only the first prepare call is required, which needs to:

- specify both output files --output-images-file and --output-env-file
- specify a --push-destination argument with the <undercloud ip>:8787

This will result in an --output-env-file with appropriate undercloud registry image references

Comment 14 Omri Hochman 2018-06-06 14:56:38 UTC
Verified OSP13 RC -  prepare command need to be executed only once.

Comment 16 errata-xmlrpc 2018-06-27 13:33: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-2018:2086