Activate dcagent
This commit configures the following: - Activate the audit using dcagent for subclouds running current N software version. - Configure the log folders and log rotation for dcagent. The logs will be available in /var/log/dcagent/dcagent.log. Test plan: - PASS: Build a developer ISO. Deploy a DC system with 2 system controllers and 1 subcloud. Verify the audit is performed using dcagent for N release subclouds and the old audit model for N-1 subclouds. - PASS: Manage the subcloud and verify the endpoints are correctly being audited. - PASS: Verify dcagent is being properly logged to the correct folder. Depends-On: https://review.opendev.org/c/starlingx/config/+/925767 Depends-On: https://review.opendev.org/c/starlingx/stx-puppet/+/925766 Story: 2011106 Task: 50689 Change-Id: I2d7bfb0abbb9c0d95e2be07c52a6b2d2a511ebbd Signed-off-by: Victor Romano <victor.gluzromano@windriver.com>
This commit is contained in:
parent
50f0f53c2f
commit
0ed0c3c37f
@ -400,10 +400,7 @@ def send_subcloud_shutdown_signal(subcloud_name):
|
||||
|
||||
|
||||
def subcloud_has_dcagent(software_version: str):
|
||||
# TODO(vgluzrom): remove "False" condition and uncomment code
|
||||
# when dcagent service is enabled by default
|
||||
return False
|
||||
# return software_version >= consts.MIN_VERSION_FOR_DCAGENT
|
||||
return software_version >= consts.MIN_VERSION_FOR_DCAGENT
|
||||
|
||||
|
||||
def log_subcloud_msg(
|
||||
|
@ -1 +1 @@
|
||||
/var/log/dcagent
|
||||
var/log/dcagent
|
||||
|
@ -1,3 +1,4 @@
|
||||
d /var/log/dcagent 0755 root root - -
|
||||
d /var/log/dcdbsync 0755 root root - -
|
||||
d /var/log/dcmanager 0755 root root - -
|
||||
d /var/log/dcorch 0755 root root - -
|
||||
|
@ -43,6 +43,21 @@
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/dcagent/*.log
|
||||
{
|
||||
nodateext
|
||||
size 10M
|
||||
start 1
|
||||
rotate 20
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
sharedscripts
|
||||
postrotate
|
||||
systemctl reload syslog-ng > /dev/null 2>&1 || true
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/dcmanager/ansible/*.log
|
||||
{
|
||||
nodateext
|
||||
|
@ -7,6 +7,7 @@ destination d_dcmanager_orch { file("/var/log/dcmanager/orchestrator.log" templa
|
||||
destination d_dcorch { file("/var/log/dcorch/dcorch.log" template(t_preformatted)); };
|
||||
destination d_dcdbsync { file("/var/log/dcdbsync/dcdbsync.log" template(t_preformatted)); };
|
||||
destination d_dcdbsync_openstack { file("/var/log/dcdbsync/dcdbsync_openstack.log" template(t_preformatted)); };
|
||||
destination d_dcagent { file("/var/log/dcagent/dcagent.log" template(t_preformatted)); };
|
||||
|
||||
# Distributed Cloud Log Filters
|
||||
filter f_dcmanagermanager { facility(local4) and program(dcmanager-manager); };
|
||||
@ -21,6 +22,8 @@ filter f_dcorchapiproxy { facility(local4) and program(dcorch-api-proxy); };
|
||||
filter f_dcdbsyncapi { facility(local4) and program(dcdbsync-api); };
|
||||
filter f_dcdbsyncopenstackapi { facility(local4) and program(dcdbsync-api); };
|
||||
|
||||
filter f_dcagentapi { facility(local4) and program(dcagent-api); };
|
||||
|
||||
# Distributed Cloud Log Path
|
||||
log {source(s_src); filter(f_dcmanagermanager); destination(d_dcmanager); };
|
||||
log {source(s_src); filter(f_dcmanageraudit); destination(d_dcmanager_audit); };
|
||||
@ -31,4 +34,5 @@ log {source(s_src); filter(f_dcorchengine); destination(d_dcorch); };
|
||||
log {source(s_src); filter(f_dcorchapiproxy); destination(d_dcorch); };
|
||||
log {source(s_src); filter(f_dcdbsyncapi); destination(d_dcdbsync); };
|
||||
log {source(s_src); filter(f_dcdbsyncopenstackapi); destination(d_dcdbsync_openstack); };
|
||||
log {source(s_src); filter(f_dcagentapi); destination(d_dcagent); };
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user