Bug 1374274

Summary: Capsule upgrade failed with error "URL Only one declaration of a proxy is allowed"
Product: Red Hat Satellite Reporter: Deepannagaraj Nagarathinam <dnagarat>
Component: InstallerAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: cshereme, jcallaha, stbenjam
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 18:02:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Deepannagaraj Nagarathinam 2016-09-08 11:42:51 UTC
Description of problem:

- Error while running the satellite-installer command on the Capsule server.

~~~~~~
Proxy mycapsule.example.com cannot be registered (422 Unprocessable Entity): URL Only one declaration of a proxy is allowed
~~~~~~

Version-Release number of selected component (if applicable):

- Red Hat Capsule v 6.2

How reproducible:

- Always at customer end.

Steps to Reproduce:

-> Upgrade the Satellite server to 6.2.

-> Try to upgrade the Capsule servers to 6.2

Actual results:

# satellite-installer --scenario capsule --upgrade --certs-tar mycapsule.example.com-certs.tar
Upgrade Step: Running installer...
 Proxy mycapsule.example.com cannot be registered (422 Unprocessable Entity): URL Only one declaration of a proxy is allowed
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[mycapsule.example.com]/ensure: change from absent to present failed: Proxy mycapsule.example.com cannot be registered (422 Unprocessable Entity): URL Only one declaration of a proxy is allowed
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[mycapsule.example.com]: Failed to call refresh: Proxy mycapsule.example.com cannot be registered (ApipieBindings::MissingArgumentsError: id): N/A
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[mycapsule.example.com]: Proxy mycapsule.example.com cannot be registered (ApipieBindings::MissingArgumentsError: id): N/A
Installing             Done                                               [100%] [................................................................................]
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/foreman-installer/capsule.log
Upgrade failed during the installation phase. Fix the error and re-run the upgrade.

Expected results:

- Running satellite-installer should complete successfully.

Additional info:

- satellite-installer --scenario capsule --upgrade --verbose --noop is not giving any errors.
- Found some upstream Bugzilla's but closed without any resolution / fix.

http://projects.theforeman.org/issues/3255
http://projects.theforeman.org/issues/7365

Comment 2 Stephen Benjamin 2016-12-13 15:32:22 UTC
This happens when the customer has changed the name of the capsule in the Satellite.

The registration code in the capsule installer searches for capsules by name, and expects it to be the FQDN.

We should probably search by URL as that's what's expected to be unique.

Workaround:
Ensure the capsule FQDN is the name of all your capsules.

Comment 3 Stephen Benjamin 2016-12-13 15:33:09 UTC
Created redmine issue http://projects.theforeman.org/issues/17659 from this bug

Comment 5 Bryan Kearney 2018-09-04 18:02:06 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.