Skip to content

[service_acl] Wait until SSH is in 'stopped' state rather than waiting for 'started' state to timeout#1820

Merged
jleveque merged 1 commit intosonic-net:masterfrom
jleveque:fix_service_acl_playbook
Jun 26, 2020
Merged

[service_acl] Wait until SSH is in 'stopped' state rather than waiting for 'started' state to timeout#1820
jleveque merged 1 commit intosonic-net:masterfrom
jleveque:fix_service_acl_playbook

Conversation

@jleveque
Copy link
Contributor

With the recent changes to caclmgrd, this check was not consistent, and could potentially fail with the following error:

TASK [test : Ensure the SSH port on the DuT becomes closed to us] ********************************************************************************************************************
Friday 26 June 2020  01:17:14 +0000 (0:00:05.323)       0:01:29.829 ***********
fatal: [sonic-dut-1]: FAILED! => {"msg": "The conditional check ''Timeout when waiting for search string OpenSSH' not in result.msg' failed. The error was: error while evaluating conditional ('Timeout when waiting for search string OpenSSH' not in result.msg): Unable to look up a name or access an attribute in template string ({% if 'Timeout when waiting for search string OpenSSH' not in result.msg %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'AnsibleUndefined' is not iterable"}

result could potentially be AnsibleUndefined.

This changes the logic to match that of the new pytest, which is a more appropriate method of checking that we are no longer able to SSH to the device, and no longer relies on parsing an error message (see https://github.com/Azure/sonic-mgmt/blob/master/tests/cacl/test_control_plane_acl.py#L34). Also remove unnecessary sleep, which also aligns more with the pytest version.

@jleveque
Copy link
Contributor Author

Retest vsimage please

1 similar comment
@jleveque
Copy link
Contributor Author

Retest vsimage please

@jleveque jleveque merged commit 1d2fa82 into sonic-net:master Jun 26, 2020
@jleveque jleveque deleted the fix_service_acl_playbook branch June 26, 2020 19:06
yxieca pushed a commit that referenced this pull request Jun 27, 2020
… to timeout (#1820)

With the recent changes to caclmgrd, this check was not consistent, and could potentially fail with the following error:

```
TASK [test : Ensure the SSH port on the DuT becomes closed to us] ********************************************************************************************************************
Friday 26 June 2020  01:17:14 +0000 (0:00:05.323)       0:01:29.829 ***********
fatal: [sonic-dut-1]: FAILED! => {"msg": "The conditional check ''Timeout when waiting for search string OpenSSH' not in result.msg' failed. The error was: error while evaluating conditional ('Timeout when waiting for search string OpenSSH' not in result.msg): Unable to look up a name or access an attribute in template string ({% if 'Timeout when waiting for search string OpenSSH' not in result.msg %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'AnsibleUndefined' is not iterable"}
```

`result` could potentially be `AnsibleUndefined`.

This changes the logic to match that of the new pytest, which is a more appropriate method of checking that we are no longer able to SSH to the device, and no longer relies on parsing an error message (see https://github.com/Azure/sonic-mgmt/blob/master/tests/cacl/test_control_plane_acl.py#L34). Also remove unnecessary sleep, which also aligns more with the pytest version.
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…-net#8769)

Included Commits
92d0744 [config reload] Removed job-mode for sonic.target restart (sonic-net#1820)
c28fb22 [ci]: Support PR coverage (sonic-net#1806)
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
sonic-swss:

bb69ca2 [portsorch] Avoid orchagent crash when set invalid interface types to port (sonic-net#1906)
6e1bacc [pfcwd] Fix the polling interval time granularity (sonic-net#1912)
564785b [teammgrd]: Improve LAGs cleanup on shutdown: send SIGTERM directly to PID. (sonic-net#1841)
7ee8d26 [tlm teamd] Add retry mechanism before logging the ERR in get_dumps. (sonic-net#1629)
7f57d3d [fgnhgorch] Enable packet flow when no FG ECMP neighbors are resolved (sonic-net#1900)
08d009f Mux state order change (sonic-net#1902)

sonic-utilities:

1bc0f07 Provide support to install platform extensions (sonic-net#1578)
968c781 [config reload] Removed job-mode for sonic.target restart (sonic-net#1820)
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