Bug 805002 - Unable to --add_distribution to a changeset, repository of the distribution '<REPO>' has not been promoted into the target environment
Unable to --add_distribution to a changeset, repository of the distribution '...
Status: CLOSED WONTFIX
Product: Red Hat Satellite 6
Classification: Red Hat
Component: katello-agent (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Katello Bug Bin
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-20 08:25 EDT by James Laska
Modified: 2014-06-16 16:33 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-16 16:33:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Laska 2012-03-20 08:25:43 EDT
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 16:57:16 EDT
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 16:33:41 EDT
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.