From b15f7a6bce6d5c2adc066be2ce06e3fdbd56d002 Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Mon, 14 Mar 2016 16:52:48 -0400 Subject: Modify dnsdomainname test in pkispawn We do a check for the dnsdomainname, which fails in Openstack CI because this is not set. Instead of exiting, default to the hostname. (cherry picked from commit 795465f8620a0a10092435dce46e4cff93dbc20a) --- base/server/python/pki/server/deployment/pkimessages.py | 2 +- base/server/sbin/pkidestroy | 2 +- base/server/sbin/pkispawn | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/server/python/pki/server/deployment/pkimessages.py b/base/server/python/pki/server/deployment/pkimessages.py index cc9102161..c68a40db2 100644 --- a/base/server/python/pki/server/deployment/pkimessages.py +++ b/base/server/python/pki/server/deployment/pkimessages.py @@ -70,7 +70,7 @@ PKI_DIRECTORY_ALREADY_EXISTS_NOT_A_DIRECTORY_1 = \ PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1 = \ "Directory '%s' is either missing or is NOT a directory!" PKI_DNS_DOMAIN_NOT_SET = \ - "A valid DNS domain name MUST be established to use PKI services!" + "DNS domain name has not been set - using the hostname instead." PKI_FILE_ALREADY_EXISTS_1 = "File '%s' already exists!" PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1 = \ "File '%s' already exists BUT it is NOT a file!" diff --git a/base/server/sbin/pkidestroy b/base/server/sbin/pkidestroy index abc11dc8d..459b75596 100755 --- a/base/server/sbin/pkidestroy +++ b/base/server/sbin/pkidestroy @@ -91,7 +91,7 @@ def main(argv): config.pki_dns_domainname = str(dnsdomainname).rstrip('\n') if not len(config.pki_dns_domainname): print log.PKI_DNS_DOMAIN_NOT_SET - sys.exit(1) + config.pki_dns_domainname = config.pki_hostname except subprocess.CalledProcessError as exc: print log.PKI_SUBPROCESS_ERROR_1 % exc sys.exit(1) diff --git a/base/server/sbin/pkispawn b/base/server/sbin/pkispawn index 7ab11a515..f362b9e92 100755 --- a/base/server/sbin/pkispawn +++ b/base/server/sbin/pkispawn @@ -92,7 +92,7 @@ def main(argv): config.pki_dns_domainname = str(dnsdomainname).rstrip('\n') if not len(config.pki_dns_domainname): print log.PKI_DNS_DOMAIN_NOT_SET - sys.exit(1) + config.pki_dns_domainname = config.pki_hostname except subprocess.CalledProcessError as exc: print log.PKI_SUBPROCESS_ERROR_1 % exc sys.exit(1) -- cgit