resolve sync image execption handle in nova

resolve sync image execption handle in nova when using sync the image
ate the first time lauching instance.

Change-Id: I07ff47b59d45f9efbaf2f62332b83db8add25357
This commit is contained in:
joey5678 2014-12-20 15:00:54 +08:00
parent 9ed9344fc2
commit 909968edec
3 changed files with 3 additions and 2 deletions

View File

@ -104,7 +104,7 @@ class OpenStackClients(object):
'service_type': service_type,
'username': con.username,
'api_key': con.password,
'region_name':con.region_name,
'region_name':con.region_name,
'extensions': extensions
}
if con.password is not None:

View File

@ -1109,6 +1109,7 @@ class ComputeManager(manager.Manager):
limit=self.QUERY_PER_PAGE_LIMIT,
marker=marker)
except Client_Unauthorized:
openstack_clients = clients.OpenStackClients(req_context)
self.sync_nova_client = openstack_clients.nova()
LOG.debug(_('the token is timed out in sync_nova_client,'
'fetch a new token form keystone.'))

View File

@ -59,7 +59,7 @@ class Store(object):
from_store_loc['login_user'],
from_store_loc['login_password'])
except Exception:
msg = _('ssh login failed to %(user):%(passwd)@%(host)',
msg = _('ssh login failed to %(user)s:%(passwd)s %(host)s' %
{'user': from_store_loc['login_user'],
'passwd': from_store_loc['login_password'],
'host': from_store_loc['host']