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

[config reload]Modifying config reload tests to align with latest config reload enhancement #7558

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions tests/common/config_reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ def config_system_checks_passed(duthost):
if int(out['stdout'].strip()) < 120:
return False

logging.info("Checking if delayed services are up")
Copy link
Contributor

Choose a reason for hiding this comment

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

delayed

Do you have new ways to check delayed services?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@qiluo-msft No. But the waiting for swss for 120 seconds should cover this as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Originally the test verify lldp/pmon/snmp/telemetry/etc started. I do not understand "waiting for swss for 120 seconds should cover this".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously all these services took 3 min 30 seconds to boot up and hence it is greater than 120 seconds wait for swss. Now these services almost within 30 seconds of switch initialization (at the worst a min). So essentially config reload will not proceed for another 60 seconds which is quite sufficient for these services to start.
Hence not adding any checks here.

out = duthost.shell("systemctl list-dependencies sonic-delayed.target --plain |sed '1d'")
status = duthost.shell("systemctl is-enabled {}".format(out['stdout'].replace("\n", " ")))
services = [line.strip() for line in out['stdout'].splitlines()]
state = [line.strip() for line in status['stdout'].splitlines()]
for service in services:
if state[services.index(service)] == "enabled":
out1 = duthost.shell("systemctl show {} --property=LastTriggerUSecMonotonic --value".format(service))
if out1['stdout'].strip() == "0":
return False
logging.info("All checks passed")
return True

Expand Down