Bug 799036 - Promoting template with repo that is not already in target environment fails
Promoting template with repo that is not already in target environment fails
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: --
Assigned To: Katello Bug Bin
Sachin Ghai
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-03-01 11:09 EST by Ivan Necas
Modified: 2014-09-18 11:32 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-05-15 14:55:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Script for reproducing the error (1.31 KB, application/x-shellscript)
2012-03-01 11:09 EST, Ivan Necas
no flags Details
Stack trace of the error (9.93 KB, text/plain)
2012-03-01 11:10 EST, Ivan Necas
no flags Details

  None (edit)
Description Ivan Necas 2012-03-01 11:09:30 EST
Created attachment 566876 [details]
Script for reproducing the error

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

How reproducible:

Steps to Reproduce (see also attached script):
1. create org, env, product, repo
2. promote product to the env
3. create another repo for the product
4. create template
5. add newly created repo to the template
6. promote template to the env
Actual results:
[ERROR: 2012-03-01 16:44:36 #11526] wrong number of arguments (1 for 2)
the whole stack trace in attachment
Expected results:
Successful promotion
Comment 1 Ivan Necas 2012-03-01 11:10:09 EST
Created attachment 566877 [details]
Stack trace of the error
Comment 2 Martin Bacovsky 2012-03-07 07:30:29 EST
This issue was fixed in commit ccf50f and should be included in katello>=0.2.9
Comment 6 Sachin Ghai 2012-03-19 05:44:03 EDT
verified with following CFSE build.

[root@perceptor ~]# rpm -qa | grep -ie katello-0 -ie katello-cli

Now I can successfully promote the system template including the repo which is not in the target env.

[root@perceptor ~]# katello -u admin -p admin shell
katello> org create --name sghai
Successfully created org [ sghai ]
katello> environment create --name test --org sghai --prior Library
Successfully created environment [ test ]
katello> provider create --name custom --org sghai
Successfully created provider [ custom ]
katello> product create --name pulp --provider custom --org sghai
Successfully created product [ pulp ]

Created a repo and promoted to next env:
katello> repo create --name pulp_64 --product pulp --org sghai --url http://repos.fedorapeople.org/repos/pulp/pulp/v1/stable/6Server/x86_64/
Successfully created repository [ pulp_64 ]
katello> changeset create --name pulp1 --org sghai --env test 
Successfully created changeset [ pulp1 ] for environment [ test ]
katello> changeset update --name pulp1 --org sghai --env test --add_product pulp
Successfully updated changeset [ pulp1 ]
katello> changeset promote --name pulp1 --org sghai --env test
Changeset [ pulp1 ] promoted               

Created another repo which is not in next target env:

katello> repo create --name pulp_86 --product pulp --org sghai --url http://repos.fedorapeople.org/repos/pulp/pulp/v1/stable/6Server/i386/
Successfully created repository [ pulp_86 ]

Created  template:
katello> template create --name temp1 --org sghai
Successfully created template [ temp1 ]
katello> template update --name temp1 --org sghai --from_product pulp --add_repository pulp_86
Successfully updated template [ temp1 ] 

Promoted template to next env:
katello> changeset create --name pulp2 --org sghai --env test
Successfully created changeset [ pulp2 ] for environment [ test ]
katello> changeset update --name pulp2 --org sghai --env test --add_template temp1
Successfully updated changeset [ pulp2 ]
katello> changeset promote --name pulp2 --org sghai --env test
Changeset [ pulp2 ] promoted               
Comment 7 errata-xmlrpc 2012-05-15 14:55:52 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.