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

disk_check: Minor log related updates #1736

Merged
merged 1 commit into from
Aug 2, 2021

Conversation

renukamanavalan
Copy link
Contributor

What I did

  1. Set default log level to SYSLOG-ERR
  2. Make log level configurable via args

How I did it

How to verify it

By default, the debug logs don't appear, unless the "-l 7" is passed in command line.

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

1) Set default loglevel to SYSLOG_ERR
2) Make log level configurable via args
@renukamanavalan renukamanavalan merged commit dd01b56 into sonic-net:master Aug 2, 2021
qiluo-msft pushed a commit that referenced this pull request Aug 3, 2021
1) Set default loglevel to SYSLOG_ERR
2) Make log level configurable via args
qiluo-msft added a commit to qiluo-msft/sonic-utilities that referenced this pull request Aug 14, 2021
renukamanavalan added a commit to renukamanavalan/sonic-utilities that referenced this pull request Oct 11, 2021
1) Set default loglevel to SYSLOG_ERR
2) Make log level configurable via args
renukamanavalan added a commit to renukamanavalan/sonic-utilities that referenced this pull request Oct 11, 2021
1) Set default loglevel to SYSLOG_ERR
2) Make log level configurable via args
yxieca pushed a commit that referenced this pull request Oct 15, 2021
…ly (#1873)

* disk_check: Check & mount RO as RW using tmpfs (#1569)

What I did
There is a bug that occasionally turn root-overlay as RO. This makes /etc & /home as RO. This blocks any new remote user login, as that needs to write into /etc & /home.

This tool scans /etc & /home (or given dirs) as in RW or RO state. If RO, it could create a writable overlay using tmpfs.
This is transient and stays until next reboot. Any write after the overlay will be lost upon reboot.

But this allows new remote users login.

How I did it
Create upper & work dirs in /run/mount (tmpfs). Mount /etc & /home as lowerdirs and use the same name for final merge. This allows anyone opening a file in /etc or /home to operate on the merged overlay, transparently.

How to verify it
Mount any dir on tmpfs ( mount -t tmpfs tmpfs test_dir)
remount as RO (mount -o remount,ro test_dir)
Pass that dir to this script. (disk_check.py -d ./test_dir)
Now it should be RW

* disk_check updates: (#1736)

1) Set default loglevel to SYSLOG_ERR
2) Make log level configurable via args

* disk_check: Script updated to run good in 201811 & 201911 (#1747)

What I did
Have independent subdirs for each mounted dir to avoid any collisions of files/dirs by same name.
Adopt for older version of python3

How I did it
Changes:
Individual subdirs for each dir to be mounted
subprocess args made compatible with older version of python3 (tested in version 3.5.3)

How to verify it
Simulate read-only state
Run this script
Test ssh via new tacacs user (who had not logged in earlier)
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 18, 2022
To include following changes:

* d84a8cc 2021-08-05 | [fast-reboot] revert the change of disabling counter polling before fast-reboot (sonic-net#1744) (HEAD -> 202012, github/202012) [Ying Xie]
* e900bc5 2021-08-04 | Add script null_route_helper (sonic-net#1718) [bingwang-ms]
* 85f14e1 2021-08-02 | disk_check updates: (sonic-net#1736) [Renuka Manavalan]
* d68ac1c 2021-05-27 | [console][show] Force refresh all lines status during show line (sonic-net#1641) [Blueve]
* a0e417f 2021-04-25 | [console] Display success message after line cleared (sonic-net#1579) [Blueve]
* 0c6bb27 2021-04-07 | [console] Include Flow Control status in show line result (sonic-net#1549) [Blueve]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants