Skip to content

[test_ro_user] improve the delay for 'test_ro_user_banned_command' due to hostcfgd delay on boot#3775

Merged
lguohan merged 2 commits intosonic-net:masterfrom
shlomibitton:shlomi_add_delay_ro_user
Jul 24, 2021
Merged

[test_ro_user] improve the delay for 'test_ro_user_banned_command' due to hostcfgd delay on boot#3775
lguohan merged 2 commits intosonic-net:masterfrom
shlomibitton:shlomi_add_delay_ro_user

Conversation

@shlomibitton
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

After recent change introduced on this PR's:
sonic-net/sonic-buildimage#7965
sonic-net/sonic-buildimage#8117

'hostcfgd' will be delayed in 90 seconds.
If the test will run before the daemon has started, it will fail the test.
This is to align with the new change and make sure the test will pass.

Profiling the time it takes to configure tacacs after the daemon started can take time:
main started -> Mon 12 Jul 2021 02:07:06 PM UTC
'tacacs_server_update' function finished -> Mon 12 Jul 2021 02:08:10 PM UTC

This PR is to improve the previous delay introduced on PR #3741
Since the test is still failing on Azure CI.

How did you do it?

Check hostcfgd status and if the daemon started wait until tacacs is well configured.

How did you verify/test it?

Run the test.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@shlomibitton shlomibitton requested a review from a team as a code owner July 12, 2021 14:25
@shlomibitton
Copy link
Contributor Author

@wangxin Can you please check this PR? this one improves #3741 because the CI is still failing, it looks like even after the daemon started the tacacs is not configured and the test is failing.
I was unable to reproduce this on our setup so I measured the time it takes to configure tacacs with the daemon and added this time with some margin, this is only after we verify the daemon started.
Thanks

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

…allow 'hostcfgd' to start and configure tacas authorization.

PR: sonic-net/sonic-buildimage#7965

Change-Id: Ie8b4a9129c2a0a6a417b9922bc26c2d5f9a40352
Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
@liat-grozovik
Copy link
Collaborator

@wangxin can you please review recent changes? once it is merged i can trigger other PRs which are pending on it.

@liat-grozovik liat-grozovik changed the title [test_ro_user] improve the delay for 'test_ro_user_banned_command' after recent change [test_ro_user] improve the delay for 'test_ro_user_banned_command' due to hostcfgd delay on boot Jul 16, 2021
@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin
Copy link
Collaborator

wangxin commented Jul 20, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lguohan lguohan merged commit 0547e20 into sonic-net:master Jul 24, 2021
@shlomibitton shlomibitton deleted the shlomi_add_delay_ro_user branch July 27, 2021 16:34
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…e to hostcfgd delay on boot (sonic-net#3775)

What is the motivation for this PR?

After recent change introduced on this PR's:
sonic-net/sonic-buildimage#7965
sonic-net/sonic-buildimage#8117

'hostcfgd' will be delayed in 90 seconds.
If the test will run before the daemon has started, it will fail the test.
This is to align with the new change and make sure the test will pass.

Profiling the time it takes to configure tacacs after the daemon started can take time:
main started -> Mon 12 Jul 2021 02:07:06 PM UTC
'tacacs_server_update' function finished -> Mon 12 Jul 2021 02:08:10 PM UTC

Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants