Allow to override t-h-t 'Cloud*' params undercloud
Allow to parametrize the hardcoded 'undercloud' domain name. F.e. RDOcloud uses an 'rdocloud' domain, therefore some DNS things might be failing with the hardcoded value. The default domain name remains unchanged. It can be overriden with a new '--local-domain' option as well. Related-bug: #1698349 Partial-bug: #1733873 Change-Id: Iad63142b241f9f7f0bbef68473f18b69f36daf76 Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
parent
bb52d24649
commit
909a9f7530
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
For containerized undercloud deploy, a new option `--local_domain`
|
||||
allows to override undercloud domain name and endpoints' FQDNs, which
|
||||
default to 'undercloud'.
|
@ -126,9 +126,9 @@ class DeployUndercloud(command.Command):
|
||||
|
||||
return pw_file
|
||||
|
||||
def _generate_hosts_parameters(self):
|
||||
def _generate_hosts_parameters(self, parsed_args):
|
||||
hostname = self._get_hostname()
|
||||
domain = 'undercloud'
|
||||
domain = parsed_args.local_domain
|
||||
|
||||
data = {
|
||||
'CloudName': hostname,
|
||||
@ -252,7 +252,7 @@ class DeployUndercloud(command.Command):
|
||||
environments.extend(parsed_args.environment_files)
|
||||
|
||||
with tempfile.NamedTemporaryFile(delete=False) as tmp_env_file:
|
||||
tmp_env = self._generate_hosts_parameters()
|
||||
tmp_env = self._generate_hosts_parameters(parsed_args)
|
||||
|
||||
ip_nw = netaddr.IPNetwork(parsed_args.local_ip)
|
||||
ip = str(ip_nw.ip)
|
||||
@ -431,6 +431,12 @@ class DeployUndercloud(command.Command):
|
||||
dest='local_ip',
|
||||
help=_('Local IP/CIDR for undercloud traffic. Required.')
|
||||
)
|
||||
parser.add_argument(
|
||||
'--local-domain', metavar='<LOCAL_DOMAIN>',
|
||||
dest='local_domain',
|
||||
default='undercloud',
|
||||
help=_('Local domain for undercloud and its API endpoints')
|
||||
)
|
||||
parser.add_argument(
|
||||
'-k',
|
||||
'--keep-running',
|
||||
|
Loading…
x
Reference in New Issue
Block a user