Description of problem: After configuration with command: katello-configure --deployment=headpin --org-name='Red Hat' There is only ACME_Corporation available. Version-Release number of selected component (if applicable): 2012-02-20.1 How reproducible: on RHEL-6.2 Server GA Steps to Reproduce: 1. yum -y install katello-headpin-all 2. katello-configure --deployment=headpin --org-name='Red Hat' 3. reboot 4. login to https://<hostname>/headpin as admin/admin 5. check Organizations tab Actual results: There is one organization named ACME_Corporation. Expected results: There should be one organization named 'Red Hat'.
The bug is in katello-configure; the db seed replacement code does some interesting defensive checking to see if the replacement string exists in what its replacing. Since org_description is built from org_name, if org_description gets replaced first, org_name will decide not to run because the file will already contain the org name. committed 89324fbcebd3043e541de17c38fa7a760e9e6872
VERIFIED katello-headpin-all-0.1.145-1.el6.noarch katello-configure --deployment=sam --org-name=RedHat_QE
DOESN'T WORK katello-headpin-all-0.1.145-1.el6.noarch katello-configure --deployment=headpin --org-name='Red Hat'
Thank you for your bug report. This issue was evaluated for inclusion in the current release of Subscription Asset Manager (SAM). Unfortunately, we are unable to address this request. Because we are in the final stages of development in the current release, only significant, release-blocking issues involving serious regressions and data corruption can be considered. If you believe this issue meets the release blocking criteria as defined and communicated to you by your Red Hat Support representative, please ask your representative to file this issue as a blocker for the current release. Otherwise, ask that it be evaluated for inclusion in the next release of SAM.
reviewed the test case [root@ibm-hs22-03 ~]# katello-configure --deployment=headpin --org-name='Red Hat' Starting Katello configuration The top-level log file is [/var/log/katello/katello-configure-20120409-033042/main.log] Creating Katello database user ############################################################ ... OK Creating Katello database ############################################################ ... OK Creating Candlepin database user ############################################################ ... OK Creating Candlepin database ############################################################ ... OK Candlepin setup ############################################################ ... OK Populating Katello database schema ############################################################ ... OK Initializing Katello data ############################################################ ... OK [root@ibm-hs22-03 ~]# reboot login to https://ibm-hs22-03.rhts.eng.brq.redhat.com/headpin as admin/admin checked Organisations tab [root@ibm-hs22-03 ~]# headpin -u admin -p admin org list -------------------------------------------------------------------------------- Organization List Id Name Description -------------------------------------------------------------------------------- 1 ACME_Corporation Red Hat Organization the --org-name='Red Hat' not shown.
VERIFIED with build : [root@kvm-guest-05 ~]# hostname kvm-guest-05.rhts.eng.bos.redhat.com [root@kvm-guest-05 ~]# rpm -qa | grep katello katello-configure-0.3.1-2.el6_2.noarch katello-selinux-0.1.10-1.el6.noarch katello-cli-headpin-0.2.0-1.el6_2.noarch katello-candlepin-cert-key-pair-1.0-1.noarch katello-configure-upgrade-0.3.1-2.el6_2.noarch katello-cli-common-0.3.1-1.el6_2.noarch katello-glue-candlepin-0.3.0-2.el6_2.noarch katello-certs-tools-1.0.6-1.el6.noarch katello-headpin-0.2.4-3.el6_2.noarch katello-common-0.3.0-2.el6_2.noarch katello-headpin-all-0.2.4-3.el6_2.noarch [root@kvm-guest-05 ~]# katello-configure --deployment=headpin --org-name='RedHat' Starting Katello configuration The top-level log file is [/var/log/katello/katello-configure-20120430-045953/main.log] Creating Candlepin database user ############################################################ ... OK Creating Candlepin database ############################################################ ... OK Candlepin setup ############################################################ ... OK Creating Katello database user ############################################################ ... OK Creating Katello database ############################################################ ... OK Populating Katello database schema ############################################################ ... OK Initializing Katello data ############################################################ ... OK [root@kvm-guest-05 ~]# headpin -u admin -p admin org list -------------------------------------------------------------------------------- Organization List Id Name Description -------------------------------------------------------------------------------- 1 RedHat RedHat Organization The issue has been fixed
Well, katello-configure doesn't ignore --org option in some cases, but you still ignore my usecase. It doesn't work if the name contains space. Lets try again.
Fixed upstream b7a0d82ffa3e8ed4bd793c8ad3f5894d12ea6836 [root@zapp ~]# katello-configure --org-name='Inter Naught' --deployment=sam WARNING: FQDN is not set! Starting Katello configuration The top-level log file is [/var/log/katello/katello-configure-20120510-115023/main.log] Initializing Katello data ############################################################ ... OK [root@zapp ~]# headpin -u admin -p admin org list ------------------------------------------------------------------------------------------------------------------------------------------- Organization List Id Name Description ------------------------------------------------------------------------------------------------------------------------------------------- 1 Inter Naught Inter Naught Organization
VERFIIED with the build : [root@dhcp201-197 ~]# rpm -qa | grep katello katello-glue-candlepin-0.3.1-1.el6_2.noarch katello-cli-headpin-0.2.2-1.el6_2.noarch katello-headpin-0.2.9-1.el6_2.noarch katello-configure-0.3.5-1.el6_2.noarch katello-cli-common-0.3.4-1.el6_2.noarch katello-common-0.3.1-1.el6_2.noarch katello-headpin-all-0.2.9-1.el6_2.noarch katello-certs-tools-1.1.5-1.el6_2.noarch katello-selinux-0.2.4-1.el6_2.noarch katello-candlepin-cert-key-pair-1.0-1.noarch [root@dhcp201-197 ~]# katello-configure --deployment=sam --org-name='Red Hat' Starting Katello configuration The top-level log file is [/var/log/katello/katello-configure-20120521-160932/main.log] Creating Katello database user ############################################################ ... OK Creating Katello database ############################################################ ... OK Creating Candlepin database user ############################################################ ... OK Candlepin setup ############################################################ ... OK Populating Katello database schema ############################################################ ... OK Initializing Katello data ############################################################ ... OK [root@dhcp201-197 ~]# headpin -u admin -p admin org list -------------------------------------------------------------------------------- Organization List Id Name Description -------------------------------------------------------------------------------- 1 ACME_Corporation ACME_Corporation Organization
VERIFIED with the build: [root@dell-pesc1425-01 ~]# rpm -qa | grep katello katello-cli-common-0.3.5-2.el6_2.noarch katello-selinux-0.2.4-1.el6_2.noarch katello-candlepin-cert-key-pair-1.0-1.noarch katello-glue-candlepin-0.3.2-1.el6_2.noarch katello-certs-tools-1.1.5-1.el6_2.noarch katello-configure-0.3.7-1.el6_2.noarch katello-headpin-all-0.2.12-2.el6_2.noarch katello-cli-headpin-0.2.2-1.el6_2.noarch katello-common-0.3.2-1.el6_2.noarch katello-headpin-0.2.12-2.el6_2.noarch [root@dell-pesc1425-01 ~]# katello-configure --deployment=sam --org-name='The Lannisters' Starting Katello configuration The top-level log file is [/var/log/katello/katello-configure-20120607-055204/main.log] Creating Katello database user ############################################################ ... OK Creating Katello database ############################################################ ... OK Creating Candlepin database user ############################################################ ... OK Candlepin setup ############################################################ ... OK Populating Katello database schema ############################################################ ... OK Initializing Katello data ############################################################ ... OK [root@dell-pesc1425-01 ~]# headpin -u admin -p admin org list -------------------------------------------------------------------------------- Organization List Id Name Description -------------------------------------------------------------------------------- 1 The Lannisters The Lannisters Organization
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: After configuration with command: katello-configure --deployment=sam --org-name='Red Hat' the organization "Red Hat" is not created and does not appear in the "Organizations" listing. This update now allows users to create organizations using the command: katello-configure --deployment=sam --org-name='Red Hat'
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,4 +1 @@ -After configuration with command: +The --org-name parameter in katello-configure did not name the default organization correctly. This update fixes the use of --org-name and names the default organization properly.-katello-configure --deployment=sam --org-name='Red Hat' -the organization "Red Hat" is not created and does not appear in the "Organizations" listing. This update now allows users to create organizations using the command: -katello-configure --deployment=sam --org-name='Red Hat'
This is realy not fun. It already happend that one option worked different way depending on value or presence of other option (https://bugzilla.redhat.com/show_bug.cgi?id=789344). Now it seems that --org-name works depending on presence of --user-name and --user-pass. (Do You see any other difference?) Please let someone review the code and solve this seriously. [root@ibm-hs21-11 ~]# rpm -qa | grep katello katello-selinux-0.2.4-1.el6_2.noarch katello-cli-common-0.3.5-2.el6_2.noarch katello-common-0.3.3-1.el6_2.noarch katello-configure-0.3.7-1.el6_2.noarch katello-headpin-0.2.13-1.el6_2.noarch katello-certs-tools-1.1.5-1.el6_2.noarch katello-cli-headpin-0.2.2-1.el6_2.noarch katello-glue-candlepin-0.3.3-1.el6_2.noarch katello-headpin-all-0.2.13-1.el6_2.noarch [root@ibm-hs21-11 ~]# [root@ibm-hs21-11 ~]# katello-configure --deployment=sam --org-name='Red Hat' --user-name=root --user-pass=toor Starting Katello configuration The top-level log file is [/var/log/katello/katello-configure-20120615-122432/main.log] Creating Katello database user ############################################################ ... OK Creating Katello database ############################################################ ... OK Creating Candlepin database user ############################################################ ... OK Candlepin setup ############################################################ ... OK Populating Katello database schema ############################################################ ... OK Initializing Katello data ############################################################ ... OK [root@ibm-hs21-11 ~]# [root@ibm-hs21-11 ~]# headpin -u root -p toor org list -------------------------------------------------------------------------------- Organization List Id Name Description -------------------------------------------------------------------------------- 1 ACME_Corporation ACME_Corporation Organization [root@ibm-hs21-11 ~]#
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-1021.html