summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2017-09-12 16:10:56 -0600
committerEmilien Macchi <emilien@redhat.com>2017-10-19 03:31:01 +0000
commit598c7b6916056dbcfd09f0bf140ce8e492c88fa8 (patch)
treecfbf77dc69031ac866288b8018e3f123d476c0fc
parent98d138913df2092f56627b0c8f61e4b214d1e2ea (diff)
Support for Satellite Capsule in rhel-registration
For deployments running on RHEL with Satellite 6 (or beyond) with Capsule (Katello API enabled), the Katello API is available on 8443 port, so the previous API ping didn't work for this case. Capsule is now supported since we just check if katello-ca-consumer-latest rpm is available to tell that Satellite version is 6 or beyond. Closes-Bug: #1716777 Change-Id: If76763b367917fc15f609ad144679750602826eb (cherry picked from commit ad3ea5bb7a2ee2cb1ae6b1d21b2f0b5a177c9fc6)
-rw-r--r--extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration17
-rw-r--r--releasenotes/notes/sat_capsule-bb59fad44c17f97f.yaml7
2 files changed, 15 insertions, 9 deletions
diff --git a/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration b/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration
index 487857ef..d754aafd 100644
--- a/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration
+++ b/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration
@@ -186,14 +186,13 @@ function retry() {
set -e
}
-function detect_satellite_version {
- ping_api=$REG_SAT_URL/katello/api/ping
- if curl --retry ${retry_max_count} --retry-delay 10 --max-time 30 -L -k -s -D - -o /dev/null $ping_api | grep "200 OK"; then
- echo Satellite 6 detected at $REG_SAT_URL
- satellite_version=6
+function detect_satellite_server {
+ if curl --retry ${retry_max_count} --retry-delay 10 --max-time 30 -L -k -s -D - -o /dev/null $REG_SAT_URL/pub/katello-ca-consumer-latest.noarch.rpm | grep "200 OK"; then
+ echo Satellite 6 or beyond with Katello API detected at $REG_SAT_URL
+ katello_api_enabled=1
elif curl --retry ${retry_max_count} --retry-delay 10 --max-time 30 -L -k -s -D - -o /dev/null $REG_SAT_URL/rhn/Login.do | grep "200 OK"; then
- echo Satellite 5 detected at $REG_SAT_URL
- satellite_version=5
+ echo Satellite 5 with RHN detected at $REG_SAT_URL
+ katello_api_enabled=0
else
echo No Satellite detected at $REG_SAT_URL
exit 1
@@ -231,8 +230,8 @@ case "${REG_METHOD:-}" in
retry subscription-manager $repos
;;
satellite)
- detect_satellite_version
- if [ "$satellite_version" = "6" ]; then
+ detect_satellite_server
+ if [ "$katello_api_enabled" = "1" ]; then
repos="$repos --enable ${satellite_repo}"
curl --retry ${retry_max_count} --retry-delay 10 --max-time 30 -L -k -O "$REG_SAT_URL/pub/katello-ca-consumer-latest.noarch.rpm"
diff --git a/releasenotes/notes/sat_capsule-bb59fad44c17f97f.yaml b/releasenotes/notes/sat_capsule-bb59fad44c17f97f.yaml
new file mode 100644
index 00000000..58298d36
--- /dev/null
+++ b/releasenotes/notes/sat_capsule-bb59fad44c17f97f.yaml
@@ -0,0 +1,7 @@
+---
+fixes:
+ - |
+ For deployments running on RHEL with Satellite 6 (or beyond) with Capsule (Katello API enabled),
+ the Katello API is available on 8443 port, so the previous API ping didn't work for this case.
+ Capsule is now supported since we just check if katello-ca-consumer-latest rpm is available
+ to tell that Satellite version is 6 or beyond.