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
(cherry picked from commit f797e15dcf
)
This commit is contained in:
parent
72b2e4da86
commit
bce8cb7496
@ -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.
|
@ -804,7 +804,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):
|
||||||
fixture = deployment.DeploymentWorkflowFixture()
|
fixture = deployment.DeploymentWorkflowFixture()
|
||||||
self.useFixture(fixture)
|
self.useFixture(fixture)
|
||||||
clients = self.app.client_manager
|
clients = self.app.client_manager
|
||||||
@ -837,6 +838,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')
|
||||||
|
|
||||||
@ -853,6 +855,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.image import kolla_builder
|
from tripleo_common.image import kolla_builder
|
||||||
@ -54,13 +53,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_args_from_answers_file(self, args):
|
def _update_args_from_answers_file(self, args):
|
||||||
if args.answers_file is None:
|
if args.answers_file is None:
|
||||||
@ -780,7 +774,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 '
|
||||||
@ -847,11 +841,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',
|
||||||
|
Loading…
Reference in New Issue
Block a user