Description of problem: While discussing bug#798706, it seems unnecessary to initiate a repository metadata sync (createrepo) when promoting a changeset that includes *only* distributions. This bug is intended to track making the 'changset promote' command not initiate a genpkgmetadata.py command. 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 inprogress ... but shouldn't be needed as "distribution" only involves boot images for a product (not packages). $ 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:
Distro = repository in Pulp. If you want to promote a distro, you are actually promoting a repository. You need to do createrepo. It is not possible to promote a distro without promoting a repositorory. It simply does not make sense. Katello should never gets into state when repository was promoted, but distro not. This is not possible in Pulp. If you have such a state, it's a bug. Changeset containing a distro without its "own" repository should not be valid and promotable.
What about situations where the repo did not have a distro but now it does? Katello would be in just a situation. There is also the situation where the distribution associated with a repo will change in library, such as 6Server. When a new 6.Y is released, the distribution in the 6Server repo will change from 6.Y-1 to 6.Y.
We currently do not allow promoting of distros without repos in the CLI: Validation failed: Repository of the distribution 'ks-Test Family-TestVariant-16-x86_64' has not been promoted into the target environment!
(In reply to comment #3) > We currently do not allow promoting of distros without repos in the CLI: I believe I did that on the command-line (see steps to reproduce in comment#0). Am I misunderstanding?
lzap that error simply states that the repo is not already promoted, not that the repo must be promoted with the distro.
All subcontent (packages, errata, distros) must have the repo promoted before promoting them. This does not mean they cannot be promoted by themselves. As james said, the cli does support promoting distros, the repo just has to have already been promoted at some point.
Justin I understand when .treeinfo changes we would need to repromote distro only. But again - this is not possible in Pulp. Distributions do not live on their own there. Promotion = repo clone in Pulp. And repo cloning is the only way of getting Distribution object (what we see in Katello) promoted. Now, correct me if I am wrong, but I say: It is not possible to promote a distribution without generating metadata. Because to promote a distribution you need to promote whole repository (e.g. distributions, packages, everything there).
Lukas, what you say is true only for first promotion. Second time and on the actual repo is already cloned in Pulp and you can update the distribution alone.
We had a discussion in irc but to clarify: (In reply to comment #10) > Justin I understand when .treeinfo changes we would need to repromote distro > only. > > But again - this is not possible in Pulp. Distributions do not live on their > own there. > > Promotion = repo clone in Pulp. And repo cloning is the only way of getting > Distribution object (what we see in Katello) promoted. Not exactly. A promotion could result in a repo clone, but that's only in the case of repo or product promotion. Package, errata, or distribution promotion does not result in a repo clone. > Now, correct me if I am wrong, but I say: It is not possible to promote a > distribution without generating metadata. Because to promote a distribution you > need to promote whole repository (e.g. distributions, packages, everything > there). It is possible. Pulp has an add_distribution api call that we are using. I am presuming this functions as we intend.
Ok I think I understand where the problem is now. Ok this is 1.1 one.
getting rid of 6.0.0 version since that doesn't exist
Closing old bugs which are not relevant based on new UI and CLI