-
Notifications
You must be signed in to change notification settings - Fork 672
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
Improve SONiC disk checker to handle disk full case and mount overlay fs to allow remote user login. #3700
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@patch('os.access', return_value=True) | ||
@patch('os.statvfs', return_value=os.statvfs_result((4096, 4096, 1909350, 1491513, 4096, | ||
971520, 883302, 883302, 4096, 255))) | ||
def test_unmount_disk_full(self, mock_os_statvfs, mock_os_access, mock_rmtree, mock_proc, mock_log): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this test will cover recovery case.
I also will add a sonic-mgmt test to cover the disk-full scenario.
Add disk full event to sonic-events-host yang model. Why I did it This PR need publish disk full event: sonic-net/sonic-utilities#3700 Work item tracking Microsoft ADO: 30608100 How I did it Add disk full event to yang model. How to verify it Pass all UT. Description for the changelog Add disk full event to sonic-events-host yang model.
for d in dirs: | ||
d_name = get_dname(d) | ||
|
||
ret = run_cmd(["umount", "-l", "{}_{}".format(overlay_prefix, d_name)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's worth noting that if there's some process in /etc
or /home
(including any user's shell being in their home directory), then this will most likely fail. I guess since disk_check.py
gets executed frequently, it'll eventually work, at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not fail because unmount with -l, lazy mode will wait and unmount in background.
Improve SONiC disk checker to handle disk full case and mount overlay fs to allow remote user login.
This PR depends on DB schema change: sonic-net/sonic-buildimage#21351
What I did
How I did it
How to verify it
Work item tracking
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)