Merge "Enhance logging for dcaudit and dcorch"
This commit is contained in:
commit
30ec05b01b
@ -43,12 +43,14 @@ class PatchAudit(object):
|
||||
return PatchAuditData()
|
||||
|
||||
def subcloud_patch_audit(self, keystone_client, subcloud):
|
||||
LOG.info("Triggered patch audit for: %s." % subcloud.name)
|
||||
|
||||
# NOTE(nicodemos): Patch audit not supported for 24.09 subcloud
|
||||
if subcloud.software_version == SW_VERSION:
|
||||
return consts.SYNC_STATUS_NOT_AVAILABLE
|
||||
|
||||
# Log this just for N-1 subclouds, before the has_usm_service external call
|
||||
LOG.info("Triggered patch audit for: %s." % subcloud.name)
|
||||
|
||||
# NOTE(nicodemos): If the subcloud is on the 22.12 release with USM enabled,
|
||||
# skip the patch audit.
|
||||
if utils.has_usm_service(subcloud.region_name, keystone_client):
|
||||
|
@ -608,7 +608,7 @@ class SubcloudAuditManager(manager.Manager):
|
||||
software_audit_data,
|
||||
use_cache,
|
||||
)
|
||||
LOG.debug(
|
||||
LOG.info(
|
||||
"Sent subcloud audit request message for subclouds: %s"
|
||||
% subcloud_ids
|
||||
)
|
||||
@ -626,7 +626,7 @@ class SubcloudAuditManager(manager.Manager):
|
||||
software_audit_data,
|
||||
use_cache,
|
||||
)
|
||||
LOG.debug(
|
||||
LOG.info(
|
||||
"Sent final subcloud audit request message for subclouds: %s"
|
||||
% subcloud_ids
|
||||
)
|
||||
|
@ -115,7 +115,7 @@ class IdentitySyncThread(SyncThread):
|
||||
self.log_extra = {
|
||||
"instance": "{}/{}: ".format(self.region_name, self.endpoint_type)
|
||||
}
|
||||
LOG.info("IdentitySyncThread initialized", extra=self.log_extra)
|
||||
LOG.debug("IdentitySyncThread initialized", extra=self.log_extra)
|
||||
|
||||
def initialize_sc_clients(self):
|
||||
super().initialize_sc_clients()
|
||||
|
@ -101,7 +101,7 @@ class SysinvSyncThread(SyncThread):
|
||||
|
||||
self.sc_sysinv_client = None
|
||||
|
||||
LOG.info("SysinvSyncThread initialized", extra=self.log_extra)
|
||||
LOG.debug("SysinvSyncThread initialized", extra=self.log_extra)
|
||||
|
||||
def initialize_sc_clients(self):
|
||||
super().initialize_sc_clients()
|
||||
|
@ -769,17 +769,18 @@ class SyncThread(object):
|
||||
# shouldn't get here
|
||||
LOG.exception("Unexpected error!")
|
||||
|
||||
if not total_num_of_audit_jobs:
|
||||
if total_num_of_audit_jobs == 0:
|
||||
# todo: if we had an "unable to sync this
|
||||
# subcloud/endpoint" alarm raised, then clear it
|
||||
pass
|
||||
else:
|
||||
db_api.subcloud_sync_update(
|
||||
self.ctxt,
|
||||
self.subcloud_name,
|
||||
self.endpoint_type,
|
||||
values={"sync_request": consts.SYNC_STATUS_REQUESTED},
|
||||
)
|
||||
|
||||
db_api.subcloud_sync_update(
|
||||
self.ctxt,
|
||||
self.subcloud_name,
|
||||
self.endpoint_type,
|
||||
values={"sync_request": consts.SYNC_STATUS_REQUESTED},
|
||||
)
|
||||
LOG.debug(
|
||||
"{}: done sync audit".format(threading.currentThread().getName()),
|
||||
extra=self.log_extra,
|
||||
|
@ -594,7 +594,7 @@ class TestIdentitySyncThreadProjectRoleAssignmentsPut(
|
||||
|
||||
self._execute()
|
||||
|
||||
self._assert_log("info", "IdentitySyncThread initialized")
|
||||
self._assert_log("debug", "IdentitySyncThread initialized")
|
||||
self.log.error.assert_not_called()
|
||||
|
||||
|
||||
|
@ -1,4 +1,23 @@
|
||||
/var/log/dcmanager/*.log
|
||||
/var/log/dcmanager/state.log
|
||||
{
|
||||
nodateext
|
||||
size 40M
|
||||
start 1
|
||||
rotate 20
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
sharedscripts
|
||||
postrotate
|
||||
systemctl reload syslog-ng > /dev/null 2>&1 || true
|
||||
endscript
|
||||
|
||||
}
|
||||
|
||||
/var/log/dcmanager/audit.log
|
||||
/var/log/dcmanager/dcmanager-api.log
|
||||
/var/log/dcmanager/dcmanager.log
|
||||
/var/log/dcmanager/orchestrator.log
|
||||
{
|
||||
nodateext
|
||||
size 20M
|
||||
|
Loading…
x
Reference in New Issue
Block a user