58 lines
2.1 KiB
Diff
58 lines
2.1 KiB
Diff
From 2b92e042bb8a4510abec38fcfc302d8de1e28f37 Mon Sep 17 00:00:00 2001
|
|
From: Darren Archibald <darren.archibald@oracle.com>
|
|
Date: Fri, 23 Feb 2024 06:55:32 -0800
|
|
Subject: [PATCH] spacewalk: fix CA cert file path for Oracle Linux
|
|
|
|
Update the CA cert file that is available in Oracle Linux to register with ULN.
|
|
|
|
Orabug: 30435672
|
|
|
|
Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
|
|
Signed-off-by: Vijay Balakrishna <vijay.balakrishna@oracle.com>
|
|
Acked-by: Joe Kennedy <joe.kennedy@oracle.com>
|
|
Reviewed-by: Laurence Rochfort <laurence.rochfort@oracle.com>
|
|
Signed-off-by: Darren Archibald <darren.archibald@oracle.com>
|
|
---
|
|
cloudinit/config/cc_spacewalk.py | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/cloudinit/config/cc_spacewalk.py b/cloudinit/config/cc_spacewalk.py
|
|
index 08514f2..7248cce 100644
|
|
--- a/cloudinit/config/cc_spacewalk.py
|
|
+++ b/cloudinit/config/cc_spacewalk.py
|
|
@@ -4,7 +4,7 @@
|
|
import logging
|
|
from textwrap import dedent
|
|
|
|
-from cloudinit import subp
|
|
+from cloudinit import subp, util
|
|
from cloudinit.cloud import Cloud
|
|
from cloudinit.config import Config
|
|
from cloudinit.config.schema import MetaSchema, get_meta_doc
|
|
@@ -47,6 +47,7 @@ LOG = logging.getLogger(__name__)
|
|
distros = ["redhat", "fedora"]
|
|
required_packages = ["rhn-setup"]
|
|
def_ca_cert_path = "/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT"
|
|
+ol_ca_cert_path = "/usr/share/rhn/ULN-CA-CERT"
|
|
|
|
|
|
def is_registered():
|
|
@@ -100,9 +101,14 @@ def handle(name: str, cfg: Config, cloud: Cloud, args: list) -> None:
|
|
# Need to have this installed before further things will work.
|
|
cloud.distro.install_packages(required_packages)
|
|
if not is_registered():
|
|
+ if util.system_info()['variant'] == "ol":
|
|
+ cert = ol_ca_cert_path
|
|
+ else:
|
|
+ cert = def_ca_cert_path
|
|
do_register(
|
|
spacewalk_server,
|
|
cloud.datasource.get_hostname(fqdn=True).hostname,
|
|
+ ca_cert_path=cert,
|
|
proxy=cfg.get("proxy"),
|
|
activation_key=cfg.get("activation_key"),
|
|
)
|
|
--
|
|
2.31.1
|
|
|