Switch deployed-server if nova unavailable

If we have an undercloud without nova deployed, you must specify
--deployed-server as part of the overcloud deployment. But we switched
to this method being the default and we can detect when nova is
unavialble so let's switch to --deployed-server if a user forgets and
nova is unavailable.

Change-Id: Icf225c359e9f3d862ed8cb8c9d555df68550d050
Closes-Bug: #1901562
(cherry picked from commit 0e304cbece)
This commit is contained in:
Alex Schultz 2020-10-26 13:09:52 -06:00
parent aa44664dc3
commit 87dc5ba626
1 changed files with 8 additions and 2 deletions

View File

@ -29,6 +29,7 @@ import time
import yaml
from heatclient.common import template_utils
from keystoneauth1.exceptions.catalog import EndpointNotFound
import openstack
from osc_lib import exceptions as oscexc
from osc_lib.i18n import _
@ -61,8 +62,13 @@ class DeployOvercloud(command.Command):
self.object_client = self.clients.tripleoclient.object_store
self.orchestration_client = self.clients.orchestration
if not parsed_args.deployed_server:
self.compute_client = self.clients.compute
self.baremetal_client = self.clients.baremetal
try:
self.compute_client = self.clients.compute
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, stack):
parameters = {}