Use --preserve-env to keep proxy settings
User may set http_proxy/no_proxy and then run the install. We don't preserve the env when doing undercloud install. Change-Id: Iec51bf33bdca7fb0d3026512abd9360ef3cecb70 Closes-Bug: #1811376
This commit is contained in:
parent
866171507a
commit
0e5a10e297
@ -70,9 +70,9 @@ class TestUndercloudInstall(TestPluginV1):
|
||||
self.cmd.take_action(parsed_args)
|
||||
|
||||
mock_subprocess.assert_called_with(
|
||||
['sudo', 'openstack', 'tripleo', 'deploy', '--standalone',
|
||||
'--standalone-role', 'Undercloud', '--stack', 'undercloud',
|
||||
'--local-domain=localdomain',
|
||||
['sudo', '--preserve-env', 'openstack', 'tripleo', 'deploy',
|
||||
'--standalone', '--standalone-role', 'Undercloud', '--stack',
|
||||
'undercloud', '--local-domain=localdomain',
|
||||
'--local-ip=192.168.24.1/24',
|
||||
'--templates=/usr/share/openstack-tripleo-heat-templates/',
|
||||
'--heat-native', '-e',
|
||||
@ -138,9 +138,9 @@ class TestUndercloudInstall(TestPluginV1):
|
||||
mock.call('/foo')
|
||||
])
|
||||
mock_subprocess.assert_called_with(
|
||||
['sudo', 'openstack', 'tripleo', 'deploy', '--standalone',
|
||||
'--standalone-role', 'Undercloud', '--stack', 'undercloud',
|
||||
'--local-domain=localdomain',
|
||||
['sudo', '--preserve-env', 'openstack', 'tripleo', 'deploy',
|
||||
'--standalone', '--standalone-role', 'Undercloud', '--stack',
|
||||
'undercloud', '--local-domain=localdomain',
|
||||
'--local-ip=192.168.24.1/24',
|
||||
'--templates=/usertht',
|
||||
'--roles-file=foo/roles.yaml',
|
||||
@ -290,9 +290,9 @@ class TestUndercloudInstall(TestPluginV1):
|
||||
self.assertTrue(found_net_conf_override)
|
||||
|
||||
mock_subprocess.assert_called_with(
|
||||
['sudo', 'openstack', 'tripleo', 'deploy', '--standalone',
|
||||
'--standalone-role', 'Undercloud', '--stack', 'undercloud',
|
||||
'--local-domain=localdomain',
|
||||
['sudo', '--preserve-env', 'openstack', 'tripleo', 'deploy',
|
||||
'--standalone', '--standalone-role', 'Undercloud', '--stack',
|
||||
'undercloud', '--local-domain=localdomain',
|
||||
'--local-ip=192.168.24.1/24',
|
||||
'--templates=/usr/share/openstack-tripleo-heat-templates/',
|
||||
'--heat-native', '-e',
|
||||
@ -359,9 +359,9 @@ class TestUndercloudInstall(TestPluginV1):
|
||||
self.cmd.app_args.verbose_level = old_verbose
|
||||
|
||||
mock_subprocess.assert_called_with(
|
||||
['sudo', 'openstack', 'tripleo', 'deploy', '--standalone',
|
||||
'--standalone-role', 'Undercloud', '--stack', 'undercloud',
|
||||
'--local-domain=localdomain',
|
||||
['sudo', '--preserve-env', 'openstack', 'tripleo', 'deploy',
|
||||
'--standalone', '--standalone-role', 'Undercloud', '--stack',
|
||||
'undercloud', '--local-domain=localdomain',
|
||||
'--local-ip=192.168.24.1/24',
|
||||
'--templates=/usr/share/openstack-tripleo-heat-templates/',
|
||||
'--heat-native', '-e',
|
||||
@ -421,9 +421,9 @@ class TestUndercloudInstall(TestPluginV1):
|
||||
self.cmd.take_action(parsed_args)
|
||||
|
||||
mock_subprocess.assert_called_with(
|
||||
['sudo', 'openstack', 'tripleo', 'deploy', '--standalone',
|
||||
'--standalone-role', 'Undercloud', '--stack', 'undercloud',
|
||||
'--local-domain=localdomain',
|
||||
['sudo', '--preserve-env', 'openstack', 'tripleo', 'deploy',
|
||||
'--standalone', '--standalone-role', 'Undercloud', '--stack',
|
||||
'undercloud', '--local-domain=localdomain',
|
||||
'--local-ip=192.168.24.1/24',
|
||||
'--templates=/usr/share/openstack-tripleo-heat-templates/',
|
||||
'--heat-native', '-e',
|
||||
@ -480,9 +480,9 @@ class TestUndercloudInstall(TestPluginV1):
|
||||
self.cmd.take_action(parsed_args)
|
||||
|
||||
mock_subprocess.assert_called_with(
|
||||
['sudo', 'openstack', 'tripleo', 'deploy', '--standalone',
|
||||
'--standalone-role', 'Undercloud', '--stack', 'undercloud',
|
||||
'--local-domain=localdomain',
|
||||
['sudo', '--preserve-env', 'openstack', 'tripleo', 'deploy',
|
||||
'--standalone', '--standalone-role', 'Undercloud', '--stack',
|
||||
'undercloud', '--local-domain=localdomain',
|
||||
'--local-ip=192.168.24.1/24',
|
||||
'--templates=/usr/share/openstack-tripleo-heat-templates/',
|
||||
'--heat-native', '-e',
|
||||
@ -558,9 +558,9 @@ class TestUndercloudUpgrade(TestPluginV1):
|
||||
self.cmd.take_action(parsed_args)
|
||||
|
||||
mock_subprocess.assert_called_with(
|
||||
['sudo', 'openstack', 'tripleo', 'deploy', '--standalone',
|
||||
'--standalone-role', 'Undercloud', '--stack', 'undercloud',
|
||||
'--local-domain=localdomain',
|
||||
['sudo', '--preserve-env', 'openstack', 'tripleo', 'deploy',
|
||||
'--standalone', '--standalone-role', 'Undercloud', '--stack',
|
||||
'undercloud', '--local-domain=localdomain',
|
||||
'--local-ip=192.168.24.1/24',
|
||||
'--templates=/usr/share/openstack-tripleo-heat-templates/',
|
||||
'--upgrade', '-e',
|
||||
@ -620,9 +620,9 @@ class TestUndercloudUpgrade(TestPluginV1):
|
||||
self.cmd.take_action(parsed_args)
|
||||
|
||||
mock_subprocess.assert_called_with(
|
||||
['sudo', 'openstack', 'tripleo', 'deploy', '--standalone',
|
||||
'--standalone-role', 'Undercloud', '--stack', 'undercloud',
|
||||
'--local-domain=localdomain',
|
||||
['sudo', '--preserve-env', 'openstack', 'tripleo', 'deploy',
|
||||
'--standalone', '--standalone-role', 'Undercloud', '--stack',
|
||||
'undercloud', '--local-domain=localdomain',
|
||||
'--local-ip=192.168.24.1/24',
|
||||
'--templates=/usr/share/openstack-tripleo-heat-templates/',
|
||||
'--upgrade', '-e',
|
||||
@ -681,9 +681,9 @@ class TestUndercloudUpgrade(TestPluginV1):
|
||||
self.cmd.take_action(parsed_args)
|
||||
|
||||
mock_subprocess.assert_called_with(
|
||||
['sudo', 'openstack', 'tripleo', 'deploy', '--standalone',
|
||||
'--standalone-role', 'Undercloud', '--stack', 'undercloud',
|
||||
'--local-domain=localdomain',
|
||||
['sudo', '--preserve-env', 'openstack', 'tripleo', 'deploy',
|
||||
'--standalone', '--standalone-role', 'Undercloud', '--stack',
|
||||
'undercloud', '--local-domain=localdomain',
|
||||
'--local-ip=192.168.24.1/24',
|
||||
'--templates=/usr/share/openstack-tripleo-heat-templates/',
|
||||
'--upgrade', '-e',
|
||||
@ -742,9 +742,9 @@ class TestUndercloudUpgrade(TestPluginV1):
|
||||
self.cmd.take_action(parsed_args)
|
||||
|
||||
mock_subprocess.assert_called_with(
|
||||
['sudo', 'openstack', 'tripleo', 'deploy', '--standalone',
|
||||
'--standalone-role', 'Undercloud', '--stack', 'undercloud',
|
||||
'--local-domain=localdomain',
|
||||
['sudo', '--preserve-env', 'openstack', 'tripleo', 'deploy',
|
||||
'--standalone', '--standalone-role', 'Undercloud', '--stack',
|
||||
'undercloud', '--local-domain=localdomain',
|
||||
'--local-ip=192.168.24.1/24',
|
||||
'--templates=/usr/share/openstack-tripleo-heat-templates/',
|
||||
'-y', '--upgrade', '-e',
|
||||
@ -807,9 +807,9 @@ class TestUndercloudUpgrade(TestPluginV1):
|
||||
self.cmd.app_args.verbose_level = old_verbose
|
||||
|
||||
mock_subprocess.assert_called_with(
|
||||
['sudo', 'openstack', 'tripleo', 'deploy', '--standalone',
|
||||
'--standalone-role', 'Undercloud', '--stack', 'undercloud',
|
||||
'--local-domain=localdomain',
|
||||
['sudo', '--preserve-env', 'openstack', 'tripleo', 'deploy',
|
||||
'--standalone', '--standalone-role', 'Undercloud', '--stack',
|
||||
'undercloud', '--local-domain=localdomain',
|
||||
'--local-ip=192.168.24.1/24',
|
||||
'--templates=/usr/share/openstack-tripleo-heat-templates/',
|
||||
'--upgrade', '-e',
|
||||
|
@ -673,8 +673,9 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=False,
|
||||
if force_stack_update:
|
||||
deploy_args += ["--force-stack-update"]
|
||||
|
||||
cmd = ["sudo", "openstack", "tripleo", "deploy", "--standalone",
|
||||
"--standalone-role", "Undercloud", "--stack", "undercloud"]
|
||||
cmd = ["sudo", "--preserve-env", "openstack", "tripleo", "deploy",
|
||||
"--standalone", "--standalone-role", "Undercloud", "--stack",
|
||||
"undercloud"]
|
||||
cmd += deploy_args[:]
|
||||
|
||||
# In dry-run, also report the expected heat stack virtual state/action
|
||||
|
Loading…
Reference in New Issue
Block a user