Fix missing print format in log messages

This is to fix missing print format in log message.

Change-Id: Id76cca077fcdf3d589fecbc85d70dade2982116e
This commit is contained in:
zhufl 2020-04-14 15:12:47 +08:00
parent a039f5e7a5
commit c86133cb54
2 changed files with 5 additions and 5 deletions

View File

@ -1050,11 +1050,11 @@ class CommonAdapter(object):
return cg
group_update = {}
group_id = group.id
if not volumes:
LOG.warning('There is no Volume in group: %s, cannot enable '
'group replication')
'group replication', group_id)
return group_update, []
group_id = group.id
# check whether the group was created as cg in unity
group_is_cg = utils.group_is_cg(group)
if not group_is_cg:
@ -1101,12 +1101,12 @@ class CommonAdapter(object):
def disable_replication(self, context, group, volumes):
"""Disable the group replication."""
group_update = {}
group_id = group.id
if not volumes:
# Return if empty group
LOG.warning('There is no Volume in group: %s, cannot disable '
'group replication')
'group replication', group_id)
return group_update, []
group_id = group.id
group_is_cg = utils.group_is_cg(group)
if not group_is_cg:
msg = (_('Cannot disable replication on generic group '

View File

@ -69,7 +69,7 @@ class RestCommon(object):
result = func(call_url, **kwargs)
except Exception as err:
LOG.error('Bad response from server: %(url)s. '
'Error: %(err)s'), {'url': url, 'err': err}
'Error: %(err)s', {'url': url, 'err': err})
return {"error": {
"code": constants.CONNECT_ERROR,
"description": "Connect to server error."}}