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 756955 - Not able to add package group to a template when two or more products are present in the template
Summary: Not able to add package group to a template when two or more products are pre...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.0
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: Unspecified
Assignee: Tomas Strachota
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-11-25 09:48 UTC by Sachin Ghai
Modified: 2019-09-26 13:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 18:08:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sachin Ghai 2011-11-25 09:48:20 UTC
Description of problem:
Getting validation error while adding the package group:

katello> template update --name urtemplate --org ACME_Corporation --add_package_group "Administration Tools"
Updating the template, please wait... Validation failed: Package group 'Administration Tools' not found in the Locker environment


Version-Release number of selected component (if applicable):
[root@dhcp201-152 ~]# rpm -qa | grep katello
katello-glue-pulp-0.1.113-1.git.0.5033839.fc15.x86_64
katello-common-0.1.113-1.git.0.5033839.fc15.noarch
katello-cli-common-0.1.13-1.git.57.d40f3ce.fc15.noarch
katello-glue-candlepin-0.1.113-1.git.0.5033839.fc15.x86_64
katello-configure-0.1.18-1.git.0.fc26262.fc15.noarch
katello-glue-foreman-0.1.113-1.git.0.5033839.fc15.x86_64
katello-all-0.1.113-1.git.0.5033839.fc15.x86_64
katello-cli-0.1.13-1.git.57.d40f3ce.fc15.noarch
katello-repos-0.1.3-1.git.1228.e56fa5b.fc15.noarch
katello-0.1.113-1.git.0.5033839.fc15.x86_64
[root@dhcp201-152 ~]# 


How reproducible:
always

Steps to Reproduce:
1. create two products say 1) pulp 2) rhel6 and create repos 
2. sync the products
3. create  template
4. add products like first pulp and then rhel6
5. the add Add_package_group
  
Actual results:
Updating the template, please wait... Validation failed: Package group 'Administration Tools' not found in the Locker environment

Expected results:
package group should be added successfully

Additional info:

production.log
==============

[root@dhcp201-152 ~]# tail -f /var/log/katello/production.log
ActiveRecord::RecordInvalid
base: Package group 'Administration Tools' not found in the Locker environment
Rendered text template (0.0ms)
Completed 400 Bad Request in 906ms (Views: 0.7ms | ActiveRecord: 5.6ms)

steps taken:
=============


katello> template create --name=urtemplate --org=ACME_Corporation Successfully created template [ urtemplate ]

katello> template update --name urtemplate --org ACME_Corporation --add_product pulp
Successfully updated template [ urtemplate ]

katello> template update --name urtemplate --org ACME_Corporation add_product rhel6
Successfully updated template [ urtemplate ]
katello> template update --name urtemplate --org ACME_Corporation add_distribution "ks-Red Hat Enterprise Linux-Server-6.1-x86_64"
Successfully updated template [ urtemplate ]
katello> template update --name urtemplate --org ACME_Corporation --add_package_group "Administration Tools"
Updating the template, please wait... Validation failed: Package group 'Administration Tools' not found in the Locker environment

Comment 1 Lukas Zapletal 2011-11-25 09:49:57 UTC
FYI I think we are missing one option in the 

katello template update --name lzap --org ACME_Corporation --add_anything xxx

command. And it is

-- product xxxx

because the CLI dont know from which product it should add the element (package, group, etc).

Comment 2 Tomas Strachota 2012-01-06 13:48:46 UTC
I believe that we don't want to require a product from which the packages should come from. In the template we only define what packages we want to be installed and don't care where they come from. Therefore no option --product is needed.

Comment 3 Tomas Strachota 2012-01-09 13:12:56 UTC
I tried the described scenario but didn't manage to make it fail. It either returns a correct error message when the package group is not in any of the repos or adds the group.

Tested with katello 0.1.170-1

Comment 4 Sachin Ghai 2012-01-18 11:57:16 UTC
Verified with following katello build:

[root@dhcp201-176 ~]# rpm -qa | grep katello
katello-glue-candlepin-0.1.178-1.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-common-0.1.178-1.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-repos-testing-0.1.5-1.el6.noarch
katello-cli-0.1.35-1.el6.noarch
katello-0.1.178-1.el6.noarch
katello-configure-0.1.53-1.el6.noarch
katello-glue-pulp-0.1.178-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-common-0.1.35-1.el6.noarch
katello-certs-tools-1.0.2-1.el6.noarch
katello-all-0.1.178-1.el6.noarch
katello-glue-foreman-0.1.178-1.el6.noarch
katello-repos-0.1.5-1.el6.noarch

I can add package group to a template when multiple products were present. Earlier I was using wrong package group name.

Verified with following steps:
========================

katello> template create --name urtemplate --org sghai_org
Successfully created template [ urtemplate ]

Added 'pulp' product first
============================
katello> template update --name urtemplate --org sghai_org --add_product pulp
Successfully updated template [ urtemplate ]

Added 'RHEL'
============
katello> template update --name urtemplate --org sghai_org --add_product "Red Hat Enterprise Linux Server"
Successfully updated template [ urtemplate ]

katello> template update --name urtemplate --org sghai_org --add_distribution "ks-Red Hat Enterprise Linux-Server-6.2-x86_64"
Successfully updated template [ urtemplate

katello> template update --name urtemplate --org sghai_org --add_package_group "Additional Development"
Successfully updated template [ urtemplate ]

katello> template update --name urtemplate --org sghai_org --add_package_group "Backup Client"
Successfully updated template [ urtemplate ]


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