Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rsyslogd][multiasic] fixed rsyslogd FATAL issue in the database container in multi-asic box #8390

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

mlok-nokia
Copy link
Contributor

Why I did it

Fix for issue #8389

How I did it

The /etc/rsyslog.conf is empty file which cause the FATAL of the process rsyslogd in the global instance database container. The function updateSyslogConf() should only generate the rsyslog.conf for containers in the namespace. it should not do it for the containers in the global instance. Instead, default rsyslog.conf should be used. Especially for database container, updateSyslogConf() is called before the database container is created. The result cause the sonic-cfggen failed to generate the rsyslog.conf.

How to verify it

-- Go to the database container and execute the supervisorctl status command:

admin@sonic:~$ docker exec -it database bash
root@sonic:/# supervisorctl status
flushdb                          EXITED    Aug 08 03:20 AM
redis                            RUNNING   pid 38, uptime 1 day, 11:49:24
rsyslogd                         RUNNING   pid 37, uptime 1 day, 11:49:24
supervisor-proc-exit-listener    RUNNING   pid 36, uptime 1 day, 11:49:24
root@sonic:/# ls /etc/rsyslog.conf 
/etc/rsyslog.conf
root@sonic:/# ls -al /etc/rsyslog.conf 
-rw-r--r-- 1 root root 1924 Aug  7 21:39 /etc/rsyslog.conf
root@sonic2:/# 

-- /etc/rsyslog.conf should not be a empty file

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@zhangyanzhao
Copy link
Collaborator

@arlakshm please help to review. Thanks.

Copy link
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as comments

files/build_templates/docker_image_ctl.j2 Show resolved Hide resolved
@rlhui rlhui added the Chassis 🤖 Modular chassis support label Oct 31, 2021
…ainer in multi-asic box

Signed-off-by: mlok <marty.lok@nokia.com>
Copy link
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@arlakshm arlakshm merged commit cb4c66a into sonic-net:master Dec 1, 2021
@mlok-nokia mlok-nokia deleted the syslogcfg branch April 16, 2022 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chassis 🤖 Modular chassis support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants