If the kickstart file is generated with Spaces, then the following is generated in the kickstart file: Assume Activtion Key Name is "A Test Key" subscription-manager regiseter --activationkey A Test Key This fails, since Test and Key are parsed as options. It needs to have quotes to make it work.
Although this bug is actually in foreman-katello-engine: https://github.com/Katello/foreman-katello-engine/blob/62826633/app/views/unattended/snippets/_subscription_manager_registration.erb#L7 I'm linking it to the issue on our current sprint to pull this snippet into Foreman's community templates and core, then we'll fix it in the process.
Fixed in Foreman's snippets, but it appears Katello still ships their own.
Moving to POST since upstream bug http://projects.theforeman.org/issues/3842 has been closed
# subscription-manager register --activationkey=A test key cannot parse argument: test cannot parse argument: key
@tazim - Note that the test scenario described is incorrect. The nature of the issue is that the kickstart file is not escaping or quoting activation key names when it references them. Your example (sub-mgr register --activationkey=A test key) will never work, nor should you expect it to. You would need to quote the name yourself as either "A test key" or A\ test\ key That said, this BZ still exists as far as I know in the kickstart file. Thanks!
# subscription-manager register --force --activationkey 'A test key' --org ACME_Corporation Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.
Network error, unable to connect to server looks like to be NTP issue. the date/time could be different. the below command could get executed successfully for me. But this needs to be checked with a kickstart file. We need to look into it further about the exact scenario. ~]# subscription-manager register --org ACME_Corporation --activationkey "A test key2" The system has been registered with ID: 12f9052d-c6f7-4fc7-b710-2c4ab280c3a0 sorry the idea for now is to put the bug on right track.
Created redmine issue http://projects.theforeman.org/issues/5857 from this bug
I now know the exact scenario to test this bug, will assign it to self.
The activation key with spaces was used to register the provisioned rhel6box to sat6box. [root@netgear ~]# yum repolist Loaded plugins: product-id, security, subscription-manager This system is receiving updates from Red Hat Subscription Management. ACME_Corporation_RHEL6_RHEL65_x86_64 | 2.9 kB 00:00 repo id repo name status ACME_Corporation_RHEL6_RHEL65_x86_64 RHEL65_x86_64 3,690 repolist: 3,690 The below ananconda-ks.cfg file was used to provision a vm and as visible an activation key with spaces was used. [root@netgear ~]# cat anaconda-ks.cfg | grep -i "ak with space_ks" subscription-manager register --org="ACME_Corporation" --name="netgear.katellolabs.org" --activationkey="ak with space_ks"
The build used to verify this bug is sat6-beta-snap7
This was delivered with 6.0.3, which is the Satellite 6 Beta.