Hide Forgot
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
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).
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.
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
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 ]