Bug 805002 - Unable to --add_distribution to a changeset, repository of the distribution '<REPO>' has not been promoted into the target environment
Summary: Unable to --add_distribution to a changeset, repository of the distribution '...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: katello-agent
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Katello Bug Bin
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-20 12:25 UTC by James Laska
Modified: 2014-06-16 20:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-16 20:33:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description James Laska 2012-03-20 12:25:43 UTC
Description of problem:

While retesting bug#799486, it seems it's not possible to --add_distributions to a changeset when promoting content for the first time.  For example, if you've never promoted a product before, and you attempt to create a changeset that includes (1) the product, (2) any distributions included in that product ... the changeset update will fail because the repositories associated with (2) are not in the target environment yet.  This seems unusual since this is the first time promoting the product+distribution(s).

Perhaps 'changeset update --add_distributions' should check whether the repositories associated with the distribution are already included in the changeset.  If so, no failure should be reported.  If not, the error message could be adjusted accordingly.

Version-Release number of selected component (if applicable):
 * candlepin-0.5.26-1.el6.src.rpm
 * katello-0.1.304-1.el6.src.rpm
 * katello-candlepin-cert-key-pair-1.0-1.src.rpm
 * katello-certs-tools-1.0.4-1.el6.src.rpm
 * katello-cli-0.1.104-1.el6.src.rpm
 * katello-configure-0.1.104-1.el6.src.rpm
 * katello-qpid-broker-key-pair-1.0-1.src.rpm
 * katello-qpid-client-key-pair-1.0-1.src.rpm
 * katello-selinux-0.1.8-1.el6.src.rpm
 * pulp-1.0.0-4.el6.src.rpm

How reproducible:
 * easy

Steps to Reproduce:
 1. Create a new changeset

> katello -u admin -p admin changeset create --name "02 - rht repos"
> Successfully created changeset [ 02 - rht repos ] for environment [ Stage ]

 2. Add a product(s) to the changeset

> katello -u admin -p admin changeset update --name "02 - rht repos" --add_product "Red Hat Enterprise Linux Server"
> Successfully updated changeset [ 02 - rht repos ]

> katello -u admin -p admin changeset update --name "02 - rht repos" --add_product "Red Hat CloudForms"
> Successfully updated changeset [ 02 - rht repos ]

 3. Attempt to add a distribution

> katello -u admin -p admin changeset update --name "02 - rht repos" --from_product "Red Hat Enterprise Linux Server" --add_distribution "ks-Red Hat Enterprise Linux-Server-6.2-i386"
> Validation failed: Repository of the distribution 'ks-Red Hat Enterprise Linux-Server-6.2-i386' has not been promoted into the target environment!

> katello -u admin -p admin changeset update --name "02 - rht repos" --from_product "Red Hat Enterprise Linux Server" --add_distribution "ks-Red Hat Enterprise Linux-Server-6.2-x86_64"
> Validation failed: Repository of the distribution 'ks-Red Hat Enterprise Linux-Server-6.2-x86_64' has not been promoted into the target environment!

> katello -u admin -p admin changeset update --name "02 - rht repos" --from_product "Red Hat Enterprise Linux Server" --add_distribution "ks-Red Hat Enterprise Linux Server-None-5.8-i386"
> Validation failed: Repository of the distribution 'ks-Red Hat Enterprise Linux Server-None-5.8-i386' has not been promoted into the target environment!

> katello -u admin -p admin changeset update --name "02 - rht repos" --from_product "Red Hat Enterprise Linux Server" --add_distribution "ks-Red Hat Enterprise Linux Server-None-5.8-x86_64"
> Validation failed: Repository of the distribution 'ks-Red Hat Enterprise Linux Server-None-5.8-x86_64' has not been promoted into the target environment!


Actual results:

> Validation failed: Repository of the distribution 'ks-Red Hat Enterprise Linux-Server-6.2-i386' has not been promoted into the target environment

Expected results:

 1. In the case where the required repositories *are* already included in the changeset, and *not* already promoted:

> Successfully updated changeset [ 02 - rht repos ]
exit code = 0

 2. In the case where the required repositories are *not* included in the changeset, and *not* already promoted.
Additional info:

> Validation failed: Repository '<REPO>' of the distribution 'ks-Red Hat Enterprise Linux-Server-6.2-i386' has not been promoted into the target environment
exit code = 1

Comment 1 Mike McCune 2012-03-26 20:57:16 UTC
Promoting the product for the 1st time promotes *ALL* content contained within the product, every repo, package, errata and distribution, that is why it fails to let you add them individually.

this is confusing to the user for sure and we should re-work how this 'first time is special' case seems to effect Katello.

Comment 4 Bryan Kearney 2014-06-16 20:33:41 UTC
Changesets have been deprecating. I am closing this out. If you feel it is an issue, please open back up.


Note You need to log in before you can comment on or make changes to this bug.