Make --deployed-server the default
Now that ephemeral-heat is the default deployment mode, this option with default False is confusing. Also, we don't get EndpointNotFound exception when instantiating clients, if the client library is present. Change-Id: I3ffc591989b619e534ff1d1574ffe841c8573357
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- Ephemeral heat is now used as default for overcloud deployment
|
||||||
|
and assumes the nodes are pre-provisioned using metalsmith. Deprecates
|
||||||
|
existing ``--deployed-server`` option and adds an additional option
|
||||||
|
``--provision-nodes`` for using installed heat and provisioning
|
||||||
|
nodes with heat.
|
||||||
@@ -835,7 +835,8 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||||||
mock_roles_data, mock_image_prepare,
|
mock_roles_data, mock_image_prepare,
|
||||||
mock_generate_password, mock_rc_params,
|
mock_generate_password, mock_rc_params,
|
||||||
mock_check_service_vip_migr,
|
mock_check_service_vip_migr,
|
||||||
mock_provision_networks, mock_provision_virtual_ips):
|
mock_provision_networks,
|
||||||
|
mock_provision_virtual_ips):
|
||||||
mock_tmpdir.return_value = self.tmp_dir.path
|
mock_tmpdir.return_value = self.tmp_dir.path
|
||||||
fixture = deployment.DeploymentWorkflowFixture()
|
fixture = deployment.DeploymentWorkflowFixture()
|
||||||
self.useFixture(fixture)
|
self.useFixture(fixture)
|
||||||
@@ -868,6 +869,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||||||
os.makedirs(self.tmp_dir.join('tripleo-heat-templates'))
|
os.makedirs(self.tmp_dir.join('tripleo-heat-templates'))
|
||||||
reg_file = self.tmp_dir.join(
|
reg_file = self.tmp_dir.join(
|
||||||
'tripleo-heat-templates/overcloud-resource-registry-puppet.yaml')
|
'tripleo-heat-templates/overcloud-resource-registry-puppet.yaml')
|
||||||
|
|
||||||
with open(reg_file, 'w+') as temp_file:
|
with open(reg_file, 'w+') as temp_file:
|
||||||
temp_file.write('resource_registry:\n Test2: OS::Heat::None')
|
temp_file.write('resource_registry:\n Test2: OS::Heat::None')
|
||||||
|
|
||||||
@@ -884,6 +886,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
|
|||||||
arglist = ['--answers-file', test_answerfile,
|
arglist = ['--answers-file', test_answerfile,
|
||||||
'--environment-file', test_env2,
|
'--environment-file', test_env2,
|
||||||
'--disable-password-generation',
|
'--disable-password-generation',
|
||||||
|
'--provision-nodes',
|
||||||
'--working-dir', self.tmp_dir.path]
|
'--working-dir', self.tmp_dir.path]
|
||||||
verifylist = [
|
verifylist = [
|
||||||
('answers_file', test_answerfile),
|
('answers_file', test_answerfile),
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import urllib
|
|||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from heatclient.common import template_utils
|
from heatclient.common import template_utils
|
||||||
from keystoneauth1.exceptions.catalog import EndpointNotFound
|
|
||||||
from osc_lib import exceptions as oscexc
|
from osc_lib import exceptions as oscexc
|
||||||
from osc_lib.i18n import _
|
from osc_lib.i18n import _
|
||||||
from tripleo_common import update
|
from tripleo_common import update
|
||||||
@@ -144,13 +143,8 @@ class DeployOvercloud(command.Command):
|
|||||||
self.clients = self.app.client_manager
|
self.clients = self.app.client_manager
|
||||||
self.orchestration_client = self.clients.orchestration
|
self.orchestration_client = self.clients.orchestration
|
||||||
if not parsed_args.deployed_server:
|
if not parsed_args.deployed_server:
|
||||||
try:
|
|
||||||
self.compute_client = self.clients.compute
|
self.compute_client = self.clients.compute
|
||||||
self.baremetal_client = self.clients.baremetal
|
self.baremetal_client = self.clients.baremetal
|
||||||
except EndpointNotFound:
|
|
||||||
self.log.warning('WARNING: Nova endpoint not available. '
|
|
||||||
'Assuming --deployed-server')
|
|
||||||
parsed_args.deployed_server = True
|
|
||||||
|
|
||||||
def _update_parameters(self, args, parameters,
|
def _update_parameters(self, args, parameters,
|
||||||
tht_root, user_tht_root):
|
tht_root, user_tht_root):
|
||||||
@@ -747,7 +741,7 @@ class DeployOvercloud(command.Command):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--disable-validations',
|
'--disable-validations',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=True,
|
||||||
help=_('DEPRECATED. Disable the pre-deployment validations '
|
help=_('DEPRECATED. Disable the pre-deployment validations '
|
||||||
'entirely. These validations are the built-in '
|
'entirely. These validations are the built-in '
|
||||||
'pre-deployment validations. To enable external '
|
'pre-deployment validations. To enable external '
|
||||||
@@ -814,11 +808,16 @@ class DeployOvercloud(command.Command):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--deployed-server',
|
'--deployed-server',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=True,
|
||||||
help=_('Use pre-provisioned overcloud nodes. Removes baremetal,'
|
help=_('DEPRECATED: Use pre-provisioned overcloud nodes.'
|
||||||
'compute and image services requirements from the'
|
'Now the default and this CLI option has no effect.')
|
||||||
'undercloud node. Must only be used with the'
|
)
|
||||||
'--disable-validations.')
|
parser.add_argument(
|
||||||
|
'--provision-nodes',
|
||||||
|
action='store_false',
|
||||||
|
dest='deployed_server',
|
||||||
|
default=True,
|
||||||
|
help=_('Provision overcloud nodes with heat.')
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--config-download',
|
'--config-download',
|
||||||
|
|||||||
Reference in New Issue
Block a user