Hide Forgot
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
Created new BZ for correct handling of failed synchronizations: https://bugzilla.redhat.com/show_bug.cgi?id=800078
*** Bug 800078 has been marked as a duplicate of this bug. ***
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.
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.
Checking on synchronization of http://inecas.fedorapeople.org/fakerepos/ks_invalid/, that has wrong checksums in img files
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
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
getting rid of 6.0.0 version since that doesn't exist