Bug 798683 - Promoting a product from CLI doesn't promote all product distributions
Promoting a product from CLI doesn't promote all product distributions
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: katello-agent (Show other bugs)
6.0.1
Unspecified Unspecified
medium Severity high (vote)
: Unspecified
: --
Assigned To: Ivan Necas
Og Maciel
: Triaged
: 800078 (view as bug list)
Depends On: 798376
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-29 10:04 EST by James Laska
Modified: 2014-09-18 11:32 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-15 14:54:14 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)
katello-debug-20120229043828.tar.gz (1.33 MB, application/x-gzip)
2012-02-29 10:04 EST, James Laska
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:0665 normal SHIPPED_LIVE new packages: katello 2012-05-15 18:27:22 EDT

  None (edit)
Description James Laska 2012-02-29 10:04:51 EST
Created attachment 566566 [details]
katello-debug-20120229043828.tar.gz

Description of problem:

Promoting a product ("Red Hat Enterprise Linux Server") from the CLI doesn't seem to promote all distributions associated with the product.

After promoting the product, an attempt to promote a system template that uses distribution 'ks-Red Hat Enterprise Linux-Server-6.2-i386' fails because ...

Changeset [ 03 - template rhel-i386-server-6-cf-tools ] promotion failed: Validation failed: Distribution 'ks-Red Hat Enterprise Linux-Server-6.2-i386' not found in the 'Stage' environment

Version-Release number of selected component (if applicable):
 * candlepin-0.5.22-1.el6.src.rpm
 * katello-0.1.300-1.el6.src.rpm
 * katello-certs-tools-1.0.2-2.el6.src.rpm
 * katello-cli-0.1.100-2.el6.src.rpm
 * katello-configure-0.1.100-7.el6.src.rpm
 * katello-httpd-ssl-key-pair-1.0-1.src.rpm
 * katello-qpid-broker-key-pair-1.0-1.src.rpm
 * katello-selinux-0.1.7-1.el6.src.rpm
 * katello-trusted-ssl-cert-1.0-1.src.rpm
 * pulp-0.0.267-2.el6.src.rpm

How reproducible:
 * 2 out of 2 attempts failed


Steps to Reproduce:
 1. Sync and promote RHEL and CloudForms products

> alias ks='katello -u admin -p admin'
> ks provider synchronize --name "Red Hat"
> ks changeset create --name "02 - rht repos"
> ks changeset update --name "02 - rht repos" --add_product "Red Hat Enterprise Linux Server"
> ks changeset update --name "02 - rht repos" --add_product "Red Hat CloudForms"
> ks changeset promote --name "02 - rht repos"

 2. Create and promote a system template referencing a distribution from the promoted product

> ks changeset create --name "03 - template rhel-i386-server-6-cf-tools"
> ks changeset update --name "03 - template rhel-i386-server-6-cf-tools" --add_template rhel-i386-server-6-cf-tools
> ks changeset promote --name "03 - template rhel-i386-server-6-cf-tools"

Actual results:

> Changeset [ 03 - template rhel-i386-server-6-cf-tools ] promotion failed: Validation failed: Distribution 'ks-Red Hat Enterprise Linux-Server-6.2-i386' not found in the 'Stage' environment

Expected results:

> Changeset [ 03 - template rhel-i386-server-6-cf-tools ] promotion successful

Additional info:

 * The following command shows that the distributions do exist in 'Library' ...

> #
> # Library
> #
>  
> # ks product list -v --environment Library | grep "^Name:" | sed -e 's|Name:[ \t]*||' | sort | while read PRODUCT ; do echo "[product] $PRODUCT"; ks repo list -v --environment Library --product "$PRODUCT" | grep "^Name:" | sed -e 's|Name:[ \t]*||' | sort | while read REPO ; do echo "   [repo] $REPO" ; ks distribution list -v --environment Library --product "$PRODUCT" --repo "$REPO" | grep "^Id:"| sed -e 's|^Id:[ \t]*||' | sort |while read DISTRO ; do echo "       [distro] $DISTRO" ; done ; done ; done
> [product] Red Hat CloudForms
>    [repo] Red Hat CloudForms Cloud Engine Beta RPMs x86_64 6Server
>    [repo] Red Hat CloudForms Cloud Engine RPMs x86_64 6Server
>    [repo] Red Hat CloudForms System Engine Beta RPMs x86_64 6Server
>    [repo] Red Hat CloudForms System Engine RPMs x86_64 6Server
> [product] Red Hat Employee Subscription
> [product] Red Hat Enterprise Linux High Availability for RHEL Server
> [product] Red Hat Enterprise Linux Load Balancer for RHEL Server
> [product] Red Hat Enterprise Linux Resilient Storage for RHEL Server
> [product] Red Hat Enterprise Linux Scalable File System for RHEL Server
> [product] Red Hat Enterprise Linux Server
>    [repo] Red Hat CloudForms Tools for RHEL 5 Beta RPMs i386 5Server
>    [repo] Red Hat CloudForms Tools for RHEL 5 Beta RPMs x86_64 5Server
>    [repo] Red Hat CloudForms Tools for RHEL 5 RPMs i386 5Server
>    [repo] Red Hat CloudForms Tools for RHEL 5 RPMs x86_64 5Server
>    [repo] Red Hat CloudForms Tools for RHEL 6 Beta RPMs i386 6Server
>    [repo] Red Hat CloudForms Tools for RHEL 6 Beta RPMs x86_64 6Server
>    [repo] Red Hat CloudForms Tools for RHEL 6 RPMs i386 6Server
>    [repo] Red Hat CloudForms Tools for RHEL 6 RPMs x86_64 6Server
>    [repo] Red Hat Enterprise Linux 5 Server RPMs i386 5Server
>        [distro] ks-Red Hat Enterprise Linux Server-None-5.8-i386
>    [repo] Red Hat Enterprise Linux 5 Server RPMs x86_64 5Server
>        [distro] ks-Red Hat Enterprise Linux Server-None-5.8-x86_64
>    [repo] Red Hat Enterprise Linux 6 Server RPMs i386 6Server
>        [distro] ks-Red Hat Enterprise Linux-Server-6.2-i386
>    [repo] Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server
>        [distro] ks-Red Hat Enterprise Linux-Server-6.2-x86_64
> [product] Red Hat Enterprise Linux Server Self-support 1-2 sockets Up to 1 guest
> [product] Red Hat Enterprise Linux Workstation

 * ... but not in 'Stage' ...

> # ks product list -v --environment Stage | grep "^Name:" | sed -e 's|Name:[ \t]*||' | sort | while read PRODUCT ; do echo "[product] $PRODUCT"; ks repo list -v --environment Stage --product "$PRODUCT" | grep "^Name:" | sed -e 's|Name:[ \t]*||' | sort | while read REPO ; do echo "   [repo] $REPO" ; ks distribution list -v --environment Stage --product "$PRODUCT" --repo "$REPO" | grep "^Id:"| sed -e 's|^Id:[ \t]*||' | sort |while read DISTRO ; do echo "       [distro] $DISTRO" ; done ; done ; done
> [product] Red Hat CloudForms
>    [repo] Red Hat CloudForms Cloud Engine Beta RPMs x86_64 6Server
>    [repo] Red Hat CloudForms Cloud Engine RPMs x86_64 6Server
>    [repo] Red Hat CloudForms System Engine Beta RPMs x86_64 6Server
>    [repo] Red Hat CloudForms System Engine RPMs x86_64 6Server
> [product] Red Hat Enterprise Linux Server
>    [repo] Red Hat CloudForms Tools for RHEL 5 Beta RPMs i386 5Server
>    [repo] Red Hat CloudForms Tools for RHEL 5 Beta RPMs x86_64 5Server
>    [repo] Red Hat CloudForms Tools for RHEL 5 RPMs i386 5Server
>    [repo] Red Hat CloudForms Tools for RHEL 5 RPMs x86_64 5Server
>    [repo] Red Hat CloudForms Tools for RHEL 6 Beta RPMs i386 6Server
>    [repo] Red Hat CloudForms Tools for RHEL 6 Beta RPMs x86_64 6Server
>    [repo] Red Hat CloudForms Tools for RHEL 6 RPMs i386 6Server
>    [repo] Red Hat CloudForms Tools for RHEL 6 RPMs x86_64 6Server
>    [repo] Red Hat Enterprise Linux 5 Server RPMs i386 5Server
>        [distro] ks-Red Hat Enterprise Linux Server-None-5.8-i386
>    [repo] Red Hat Enterprise Linux 5 Server RPMs x86_64 5Server
>        [distro] ks-Red Hat Enterprise Linux Server-None-5.8-x86_64
>    [repo] Red Hat Enterprise Linux 6 Server RPMs i386 6Server
>    [repo] Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server

 * See attached katello-debug log
Comment 2 Ivan Necas 2012-03-05 12:29:37 EST
Created new BZ for correct handling of failed synchronizations: https://bugzilla.redhat.com/show_bug.cgi?id=800078
Comment 3 Ivan Necas 2012-03-06 03:57:49 EST
*** Bug 800078 has been marked as a duplicate of this bug. ***
Comment 4 Ivan Necas 2012-03-06 09:37:54 EST
I've closed the bug#800078, because we can solve it here. It also relates to bug#798376. Once 798376 is solved it will be much easier to correct the behavior to show errors when synchronization of some files fails.
Comment 5 Ivan Necas 2012-03-13 14:00:50 EDT
Commit 7422b59e5b5a5777b891597bb90347968d7aef00 contains fix, that handles errors on synchronization and it should properly display details in user notification details, CLI messages and log of delayed_jobs.
Comment 6 Ivan Necas 2012-03-13 14:04:27 EDT
Checking on synchronization of http://inecas.fedorapeople.org/fakerepos/ks_invalid/, that has wrong checksums in img files
Comment 9 Og Maciel 2012-03-16 17:13:17 EDT
Verified:
* candlepin-0.5.26-1.el6.noarch
* candlepin-tomcat6-0.5.26-1.el6.noarch
* katello-0.1.304-1.el6.noarch
* katello-all-0.1.304-1.el6.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.0.4-1.el6.noarch
* katello-cli-0.1.105-1.el6.noarch
* katello-cli-common-0.1.105-1.el6.noarch
* katello-common-0.1.304-1.el6.noarch
* katello-configure-0.1.106-1.el6.noarch
* katello-glue-candlepin-0.1.304-1.el6.noarch
* katello-glue-foreman-0.1.304-1.el6.noarch
* katello-glue-pulp-0.1.304-1.el6.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-0.1.9-1.el6.noarch
* pulp-1.0.0-5.el6.noarch
* pulp-common-1.0.0-5.el6.noarch
* pulp-selinux-server-1.0.0-5.el6.noarch
Comment 10 errata-xmlrpc 2012-05-15 14:54:14 EDT
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/RHEA-2012-0665.html
Comment 11 Mike McCune 2013-08-16 14:24:03 EDT
getting rid of 6.0.0 version since that doesn't exist

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