Bug 821345

Summary: Promotions changeset of system template does not solve dependency of product
Product: Red Hat Satellite Reporter: james labocki <jlabocki>
Component: Content ManagementAssignee: Dmitri Dolguikh <ddolguik>
Status: CLOSED ERRATA QA Contact: Hayk Hovsepyan <hhovsepy>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: achan, asettle, bkearney, dmacpher, dmitri, jrist, lzap, mmccune, omaciel
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
changeset promotions did not add required products if only system templates were added to a changeset. This update adds an error message in this situation: "Please add %s products to the changeset '%s' if you wish to promote the repository with it."
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 19:45:37 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 james labocki 2012-05-14 08:06:48 UTC
Description of problem:
If only a system template is added to a changeset and a promotion is started it will fail to automatically add the required products.

Error: "Failed to promote: Cannot promote the  changeset '<mychangeset>' because the repo 'RHEL6" does not belong  to any promoted product"


Version-Release number of selected component (if applicable):
System Engine beta6, will verify today with RC

Comment 1 james labocki 2012-05-15 18:45:50 UTC
Verified that this is still and issue on RC1

Comment 2 Jason E. Rist 2012-05-23 15:23:36 UTC
Is this a documentation issue? Is the error appropriate? Only repos/packages can be added to a system template.  Should we automatically promote the product or perhaps prompt them or force the user?

Comment 3 Mike McCune 2012-08-03 16:34:12 UTC
Lets change the error messaging to state something to the effect of:

"Failed to promote: Please add the RHEL6 product to the changeset if you wish to promote this with the system template"

or something similar

Comment 4 Lukas Zapletal 2012-09-03 10:53:34 UTC
https://github.com/Katello/katello/pull/565

Comment 6 Hayk Hovsepyan 2012-09-19 10:26:08 UTC
Tested on revision:

katello-cli-1.1.8-4.el6cf.noarch
katello-certs-tools-1.1.8-1.el6cf.noarch
candlepin-selinux-0.7.8-1.el6cf.noarch
qpid-cpp-server-ssl-0.14-14.el6_2.x86_64
pulp-selinux-server-1.1.12-1.el6cf.noarch
katello-glue-pulp-1.1.12-7.el6cf.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-common-1.1.8-4.el6cf.noarch
candlepin-0.7.8-1.el6cf.noarch
qpid-cpp-client-ssl-0.14-14.el6_2.x86_64
katello-configure-1.1.9-3.el6cf.noarch
katello-glue-candlepin-1.1.12-7.el6cf.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
candlepin-tomcat6-0.7.8-1.el6cf.noarch
pulp-common-1.1.12-1.el6cf.noarch
qpid-cpp-server-0.14-14.el6_2.x86_64
katello-selinux-1.1.1-1.el6cf.noarch
katello-all-1.1.12-7.el6cf.noarch
python-qpid-0.14-7.el6_2.noarch
python-isodate-0.4.4-4.pulp.el6.noarch
qpid-cpp-client-0.14-14.el6_2.x86_64
pulp-1.1.12-1.el6cf.noarch
katello-common-1.1.12-7.el6cf.noarch
katello-1.1.12-7.el6cf.noarch
katello-qpid-client-key-pair-1.0-1.noarch
m2crypto-0.21.1.pulp-7.el6.x86_64
python-oauth2-1.5.170-2.pulp.el6.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64

Message is changed, but it shows '#' instead of name of product. So it shows like this:
"Please add '#' product to the changeset 'chzoo' if you wish to promote repository 'zoo' with it"

Maybe this is because in promotion_changeset.rb code:
"raise _("Please add '%s' product to the changeset '%s' if you wish to promote repository '%s' with it.") %
      [repo.product, self.name, repo.name]"
it should be "repo.product.name" instead of "repo.product" in message param value.

Comment 7 Lukas Zapletal 2012-09-21 13:40:26 UTC
Reassigning to Dmitri. This is oneliner ^ :-)

Comment 8 Dmitri Dolguikh 2012-09-21 17:20:54 UTC
fixed in ea80c52

Comment 11 Hayk Hovsepyan 2012-10-04 14:19:53 UTC
Verified on revision:
katello-glue-candlepin-1.1.12-12.el6cf.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-1.1.8-6.el6cf.noarch
katello-configure-1.1.9-6.el6cf.noarch
katello-1.1.12-12.el6cf.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-certs-tools-1.1.8-1.el6cf.noarch
katello-glue-pulp-1.1.12-12.el6cf.noarch
katello-selinux-1.1.1-1.el6cf.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-common-1.1.8-6.el6cf.noarch
katello-common-1.1.12-12.el6cf.noarch
katello-agent-1.1.2-1.el6cf.noarch

Now it shows correct message with name of product.

Comment 13 errata-xmlrpc 2012-12-04 19:45:37 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.

http://rhn.redhat.com/errata/RHSA-2012-1543.html

Comment 14 Mike McCune 2013-08-16 18:15:52 UTC
getting rid of 6.0.0 version since that doesn't exist