1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2026-10-23 21:49:05 +03:00

MCOL-5338: Fixed issue related to mcs-loadbrm. (#3107)

[fix] eventually wrong logging messages format
This commit is contained in:
Alan Mologorsky
2024-02-05 21:27:57 +03:00
committed by GitHub
parent 9681841cfc
commit 1e8172f74b

View File

@@ -71,9 +71,7 @@ def cmapi_available(host=LOCALHOST):
:return: is CMAPI running or not
:rtype: bool
"""
logging.debug(
'Detecting CMAPI is up and running on {}.'.format(host)
)
logging.debug('Detecting CMAPI is up and running on {}.'.format(host))
url = 'https://{}:{}/notfound'.format(host, API_PORT)
request = Request(method='POST', url=url)
ctx = get_unverified_context()
@@ -113,7 +111,7 @@ def get_ip_address_by_nic(ifname):
struct.pack('256s', bytes(ifname[:15], 'utf-8'))
)[20:24]
)
except Exception as exc:
except Exception:
logging.debug(
'Exception while getting IP address of an "{}" interface'.format(
ifname
@@ -172,15 +170,13 @@ def is_node_primary(conf_root):
success = True
except HTTPError as exc:
logging.warning(
'Something goes wrong while requesting primary status ',
'through api.',
'Got response code "{}" with reason "{}".'.format(
exc.code, exc.reason
)
'Something goes wrong while requesting primary status '
'through api. '
f'Got response code "{exc.code}" with reason "{exc.reason}".'
)
except URLError:
logging.warning(
'CMAPI became unavailable while trying',
'CMAPI became unavailable while trying '
'to request primary status.'
)
except Exception:
@@ -238,7 +234,7 @@ def get_meta(conf_root, meta_type):
raise
except URLError:
logging.warning(
'CMAPI on primary became unavailable while trying',
'CMAPI on primary became unavailable while trying '
'to request {} from it.'.format(meta_type)
)
raise
@@ -318,8 +314,8 @@ if __name__ == '__main__':
subprocess.check_call(cmd, shell=True)
except subprocess.CalledProcessError as exc:
logging.error(
'Failed to start storagemanager. {}'.format(cmd),
'exits with {}.'.format(exc.returncode)
'Failed to start storagemanager. '
f'Command "{cmd}" exits with {exc.returncode}.'
)
sys.exit(1)
time.sleep(1) # allow SM time to init
@@ -402,7 +398,7 @@ if __name__ == '__main__':
)
except Exception as exc:
logging.error(
'Failed to detect primary or load BRM data from',
'Failed to detect primary or load BRM data from'
'the primary node.',
exc_info=True
)
@@ -450,7 +446,7 @@ if __name__ == '__main__':
else:
if s3_enabled:
logging.info(
'brm_saves_currenty returned empty string from',
'brm_saves_currenty returned empty string from '
'read_from_sm_with_retry'
)
else: