From 4231a52c8c3f0c0c50a5e05592006f6480c72ec6 Mon Sep 17 00:00:00 2001 From: Tilman Baumann Date: Wed, 14 Sep 2022 18:13:21 +0100 Subject: [PATCH] Do not try to sign certificates for None if ip not resolved Fixes https://github.com/juju/charm-helpers/issues/732 --- charmhelpers/contrib/openstack/cert_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charmhelpers/contrib/openstack/cert_utils.py b/charmhelpers/contrib/openstack/cert_utils.py index 5c961c589..af6248e3d 100644 --- a/charmhelpers/contrib/openstack/cert_utils.py +++ b/charmhelpers/contrib/openstack/cert_utils.py @@ -90,7 +90,7 @@ def add_hostname_cn(self): if vip: addresses.append(vip) self.hostname_entry = { - 'cn': get_hostname(ip), + 'cn': get_hostname(ip) or ip, 'addresses': addresses} def add_hostname_cn_ip(self, addresses):