Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 769267

Summary: Promotion of template containing only packages fails without error
Product: Red Hat Satellite Reporter: Brad Buckingham <bbuckingham>
Component: APIAssignee: Tomas Strachota <tstrachota>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: cwelton
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-0.1.171-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 18:15:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 747354    

Description Brad Buckingham 2011-12-20 12:11:53 UTC
Description of problem:

If the user creates a system template containing a few packages and then attempts to promote that template to the next environment, the promotion fails without error to the user.

Note: in the scenario, nothing has been promoted to the next env prior to attempting to promote the template.

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

How reproducible:
always

Steps to Reproduce:
1. Create a Provider/Product/Repo
2. Sync a Repo
3. Create a System Template containing a couple of packages (e.g. xterm, zip)
4. Create a Changeset and add the System Template to it
5. Attempt to promote the Changeset to the next environment 
   (Note: in the above, nothing has been promoted to the next env, yet).

  
Actual results:

katello jobs shows the error below; however, the UI continues to indicate "Promoting...".

[Worker(host:dhcp231-222.rdu.redhat.com pid:11191)] Starting job worker
[Worker(host:dhcp231-222.rdu.redhat.com pid:11191)] Changeset#promote_content failed with ActiveRecord::StatementInvalid: PGError: ERROR:  operator does not exist: character varying = integer
LINE 1: ...ROM "repositories" WHERE "repositories"."pulp_id" = 1 LIMIT ...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT  "repositories".* FROM "repositories" WHERE "repositories"."pulp_id" = 1 LIMIT 1 - 0 failed attempts
[Worker(host:dhcp231-222.rdu.redhat.com pid:11191)] PERMANENTLY removing Changeset#promote_content because of 1 consecutive failures.
[Worker(host:dhcp231-222.rdu.redhat.com pid:11191)] 1 jobs processed at 0.4514 j/s, 1 failed ...


Expected results:

Should the promotion succeed in the above case?  e.g. Promoting package, repo and product?

Or should it fail and give the user a meaningful error?


Additional info:

Comment 1 Tomas Strachota 2012-01-09 13:18:03 UTC
We most likely forgot to change this part of code after Repo AR was introduced. AR repo id was used there to search by pulp's repo id.

Products the packages belong to are promoted automatically in situations such as described in comment 1. This is how promotion of packages in templates differs from promotion of packages stored directly in a changeset.

Comment 3 Corey Welton 2012-02-13 15:58:09 UTC
QA Verified, was able to promote a system template containing only packages.