Description of problem: When trying to re-register a system using the generated curl command it throws the error mentioning that the system is already registered and it would need to use the option --force. Error: -------- This system is already registered. Use --force to override --------- When --force option is using the below error is the output. Error: ================================================================================================ [root@localhost ~]# curl -X GET "https://satellite.example.com:9090/register?activation_key=new&hostgroup_id=3&location_id=2&operatingsystem_id=3&organization_id=1" -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MTE1Njk4ODEsImp0aSI6ImUxMzJkOGU1OGQ2MTc4YTc4ODM3ZjU2ZjY0MzJiZmZhYTZjYmI2OWY0ODFmMGFiYmFjNTJkOGZhZWVlN2JjMDMiLCJleHAiOjE2MTE1ODQyODF9.fLNNZqN_7HNYFcCyspX6Usqt6AN3u5oOUA3DIdEB6Pk' | bash --force bash: --force: invalid option Usage: bash [GNU long option] [option] ... bash [GNU long option] [option] script-file ... GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --posix --rcfile --rpm-requires --restricted --verbose --version Shell options: -ilrsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o option % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10369 100 10369 0 0 20017 0 --:--:-- --:--:-- --:--:-- 20017 curl: (23) Failed writing body (0 != 10369) ================================================================================================ Version-Release number of selected component (if applicable): [root@localhost ~]# rpm -qa | grep -i satellite satellite-6.9.0-0.3.beta.el7sat.noarch ansiblerole-satellite-receptor-installer-0.6.13-1.el7sat.noarch satellite-maintain-0.0.1-1.el7sat.noarch satellite-common-6.9.0-0.3.beta.el7sat.noarch satellite-installer-6.9.0.6-1.el7sat.noarch tfm-rubygem-foreman_theme_satellite-7.0.1.4-1.el7sat.noarch satellite-cli-6.9.0-0.3.beta.el7sat.noarch How reproducible: 100% Steps to Reproduce: 1. Register a client system using the generated curl command 2. Do NOT un-register the system and then run the same curl command again. It will ask to use the --force option. 3. Run the same curl command with the --force option. Actual results: Do not register the system the second time. Expected results: [1] It should use the option or --force [2] Curl command should process any additional parameters supported for subscription-manager. Additional info:
Created redmine issue https://projects.theforeman.org/issues/31810 from this bug
I'd say better approach to re-registration would be to run sub-man clean, overall feels like a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1900664
*** This bug has been marked as a duplicate of bug 1900664 ***