Description of problem: When promoting a changeset that included *only* distributions, it seems that the CLI command returns, even when a createrepo is still underway. As a user, this was slightly confusing when my system was stressed after the promotion completed (due to createrepo processes pegging the CPU). This bug is intended to track making the 'changset promote' command only return after createrepo has finished. 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 Steps to Reproduce: 1. katello> changeset create --name '02 - rht distros' --environment Stage 2. katello> changeset update --name "02 - rht distros" --from_product "Red Hat Enterprise Linux Server" --add_distribution "ks-Red Hat Enterprise Linux-Server-6.2-i386" 3. katello> changeset update --name "02 - rht distros" --from_product "Red Hat Enterprise Linux Server" --add_distribution "ks-Red Hat Enterprise Linux-Server-6.2-x86_64" 4. katello> changeset promote --name '02 - rht distros' Actual results: # The command returns success Changeset [ 02 - rht distros ] promoted # However, createrepo is still working ... $ ps -wef | grep createrepo apache 5913 29319 8 05:07 ? 00:03:10 /usr/bin/python -t /usr/share/createrepo/genpkgmetadata.py --database --checksum sha -g /var/lib/pulp//repos/redhat/Stage/content/dist/rhel/server/6/6Server/x86_64/os/repodata/comps.xml --update /var/lib/pulp//repos/redhat/Stage/content/dist/rhel/server/6/6Server/x86_64/os apache 5922 29319 6 05:07 ? 00:02:14 /usr/bin/python -t /usr/share/createrepo/genpkgmetadata.py --database --checksum sha -g /var/lib/pulp//repos/redhat/Stage/content/dist/rhel/server/6/6Server/i386/os/repodata/comps.xml --update /var/lib/pulp//repos/redhat/Stage/content/dist/rhel/server/6/6Server/i386/os Expected results: Changeset [ 02 - rht distros ] promoted $ ps -wef | grep createrepo # createrepo is not running Additional info:
As described here - promoting only distributions should not be possible. https://bugzilla.redhat.com/show_bug.cgi?id=798709 I guess we need this BZ: Promoting a distribution without it's repo should not be possible.
The real heart of this bugzilla is that when we manually regenerate the package metadata during promotion, we do not block. As a result the promotion completes before the metadata is finished promoting. The same situation occurs with adding a package or errata to a changeset and promoting it. I'll update the title accordingly.
code: def promote_content SNIP generate_metadata from_env, to_env SNIP end generate_metadata does not block like the other items in promote content which use PulpTaskStatus::wait_for_tasks to block until the tasks are complete.
Errr actually this isn't really an RFE. The promotion is saying it is complete when its not. IMHO.
Understand, will fix this.
Taking...
changed promotion to block on task returned from metadata generation 93dcbb74f253e7c0d3a72bb4d93e3d6d39bf212a
mass move ON_QA after brewing
Validated: * candlepin-0.5.24-1.el6.noarch * candlepin-tomcat6-0.5.24-1.el6.noarch * katello-0.1.303-1.el6.noarch * katello-all-0.1.303-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.102-1.el6.noarch * katello-cli-common-0.1.102-1.el6.noarch * katello-common-0.1.303-1.el6.noarch * katello-configure-0.1.104-1.el6.noarch * katello-glue-candlepin-0.1.303-1.el6.noarch * katello-glue-foreman-0.1.303-1.el6.noarch * katello-glue-pulp-0.1.303-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.8-1.el6.noarch * pulp-1.0.0-4.el6.noarch * pulp-common-1.0.0-4.el6.noarch * pulp-selinux-server-1.0.0-4.el6.noarch