Bug 840531

Summary: Attempting to promote an individual package via a changeset or system template with more than 1 dash in the name fails
Product: Red Hat Satellite Reporter: Eric Helms <ehelms>
Component: Content ManagementAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Og Maciel <omaciel>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.1CC: cpelland, dmacpher, ftaylor, gkhachik, hhovsepy, juwu, mmccune, omaciel
Target Milestone: UnspecifiedKeywords: Triaged, ZStream
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Pulp incorrectly parsed package names with more than one dash. This caused the following error for a changeset promotion: "Package '[this-package-name]' not found in the Library environment." This fix removes the option to add a package to a system template by NVRE, which allows successful promotion of changesets.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-20 13:03:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Helms 2012-07-16 14:37:05 UTC
Description of problem:
Whenever a user adds an individual package with more than a single dash in the name to a changeset or system template and attempts to promote, an error is thrown indicating the package could not be found in the previous environment.

Version-Release number of selected component (if applicable):


How reproducible:
Always.

Steps to Reproduce:
1. Add and sync a repository containing the 'aeolus-audrey-agent' package.
2. Create a system template and add the 'aeolus-audrey-agent' package.
3. Create a changeset that contains the previously mentioned system template.
4. Review and promote the changeset.
  
Actual results:
An error is thrown:

[ERROR: 2012-07-12 13:54:54 #10321] base: Package 'aeolus-audrey-agent' not found in the Library environment 

Expected results:
The changeset containing the aeolus-audrey-agent is promoted without error.

Additional info:
This issue is related to how a package is looked up in pulp by attempting to parse the name to determine if it is an NVRE or an actual package name.  Package names with more than a single dash in them incorrectly pass the NVRE regex check and fail to be found in Pulp failing the entire promotion.

Comment 1 Mike McCune 2012-07-16 16:17:08 UTC
similar and related to:

https://bugzilla.redhat.com/show_bug.cgi?id=818370

Comment 2 Mike McCune 2012-07-23 19:40:49 UTC
We have a pull request to fix this here:

https://github.com/Katello/katello/pull/335

Comment 3 Eric Helms 2012-07-25 12:40:25 UTC
*** Bug 842903 has been marked as a duplicate of this bug. ***

Comment 4 Eric Helms 2012-07-25 13:33:55 UTC
The following commit addresses the above issues with multiple dashes in a package name during promotion in either a Changeset or System Template.

https://github.com/Katello/katello/commit/afa584619f52fa568efd0eaf82a7b95ab40af20a

Comment 6 Og Maciel 2012-08-13 22:29:27 UTC
Upgraded existing 1.0.1 system to repository with fix and performed the steps mentioned in the issue with success. Versions used:


* candlepin-tomcat6-0.6.5-1.el6_2.noarch
* katello-0.1.319-1.el6cf.noarch
* katello-all-0.1.319-1.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.0.7-1.el6_3.noarch
* katello-cli-0.1.112-1.el6cf.noarch
* katello-cli-common-0.1.112-1.el6cf.noarch
* katello-common-0.1.319-1.el6cf.noarch
* katello-configure-0.1.111-1.el6cf.noarch
* katello-glue-candlepin-0.1.319-1.el6cf.noarch
* katello-glue-foreman-0.1.319-1.el6cf.noarch
* katello-glue-pulp-0.1.319-1.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-0.1.10-1.el6.noarch
* pulp-1.0.4-1.el6.noarch
* pulp-common-1.0.4-1.el6.noarch
* pulp-selinux-server-1.0.4-1.el6.noarch

Comment 8 Og Maciel 2012-08-14 18:06:18 UTC
VERIFIED as per previous comment.

Comment 9 Julie 2012-08-16 04:11:03 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Pulp incorrectly parsed packages name with more than one dash. This caused the following error for a changeset promotion that contains aeolus-audrey-agent: "Package 'aeolus-audrey-agent' not found in the Library environment." This fix removes the option to add a package to a system template by NVRE, which allows successful promotion of changesets containing aeolus-audrey-agent.

Comment 10 Julie 2012-08-16 04:13:22 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Pulp incorrectly parsed packages name with more than one dash. This caused the following error for a changeset promotion that contains aeolus-audrey-agent: "Package 'aeolus-audrey-agent' not found in the Library environment." This fix removes the option to add a package to a system template by NVRE, which allows successful promotion of changesets containing aeolus-audrey-agent.+Pulp incorrectly parsed packages name with more than one dash. This caused the following error for a changeset promotion: "Package '[this-package-name]' not found in the Library environment." This fix removes the option to add a package to a system template by NVRE, which allows successful promotion of changesets.

Comment 11 Dan Macpherson 2012-08-16 04:34:37 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Pulp incorrectly parsed packages name with more than one dash. This caused the following error for a changeset promotion: "Package '[this-package-name]' not found in the Library environment." This fix removes the option to add a package to a system template by NVRE, which allows successful promotion of changesets.+Pulp incorrectly parsed package names with more than one dash. This caused the following error for a changeset promotion: "Package '[this-package-name]' not found in the Library environment." This fix removes the option to add a package to a system template by NVRE, which allows successful promotion of changesets.

Comment 13 errata-xmlrpc 2012-08-20 13:03:20 UTC
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/RHBA-2012-1179.html

Comment 15 Hayk Hovsepyan 2012-12-05 11:04:00 UTC
Automated in class: "com.redhat.qe.katello.tests.e2e.PromotePackageWithDashes"

Comment 16 Mike McCune 2013-08-16 17:54:01 UTC
getting rid of 6.0.0 version since that doesn't exist