[deploy] Wait for vEOS to come back after restart#906
[deploy] Wait for vEOS to come back after restart#906qiluo-msft merged 4 commits intosonic-net:masterfrom wangxin:wait-for-vm
Conversation
Signed-off-by: Xin Wang <xinw@mellanox.com>
ansible/roles/eos/tasks/main.yml
Outdated
| notify: | ||
| - Restart the box | ||
| - Pause for reboot | ||
| - Wait for VM to come up |
There was a problem hiding this comment.
It is dangerous to assume the order of notify items. ref: https://stackoverflow.com/a/35130254/2514803
Suggest use normal tasks in this playbook. #Closed
There was a problem hiding this comment.
@qiluo-msft
Thanks for the suggestion. Updated and committed. Replaced notifying handlers with tasks.
ansible/roles/eos/handlers/main.yml
Outdated
| pause: seconds=30 | ||
|
|
||
| - name: Wait for VM to come up | ||
| local_action: shell ansible -m ping -i veos {{ inventory_hostname }} |
There was a problem hiding this comment.
local_action [](start = 2, length = 12)
Use 'ping' module? #Closed
There was a problem hiding this comment.
Failure of ping module would cause playbook fail. Replaced the ping command with the ansible wait_for module which is designed for this kind of job.
Signed-off-by: Xin Wang <xinw@mellanox.com>
ansible/roles/eos/handlers/main.yml
Outdated
| state: started | ||
| delay: 30 | ||
| timeout: 900 | ||
| connection: local |
There was a problem hiding this comment.
If not used, please remove.
There was a problem hiding this comment.
Sure. Removed the unused handlers.
Signed-off-by: Xin Wang <xinw@mellanox.com>
* [deploy] Wait for vEOS to come back after restart * [deploy] Replace handlers with tasks to ensure execution sequence * [deploy] Replace ping cmd with wait_for module * [deploy] Remove unused handlers
…8 topo (sonic-net#906) Cherry-pick [21472](sonic-net#21472) into 202503 <!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: enable test_acl and test_qos_sai for t0-f2-d40u8, t1-f2-d10u8 topo ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [x] 202503 ### Approach #### What is the motivation for this PR? enable test_acl and test_qos_sai for t0-f2-d40u8, t1-f2-d10u8 topo #### How did you do it? Added into supported topo list. #### How did you verify/test it? local testbed. #### Any platform specific information? #### Supported testbed topology if it's a new test case? ### Documentation <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? -->
These changes are included in this PR: 07e1f79 [syncd] Add workaround for warm boot new objects (sonic-net#959) 50fd353 Fix the option missing in kernel config issue (sonic-net#956) e77503c [syncd] Comparison logic workaround for empty buffer profile (sonic-net#906) (sonic-net#941)
…t#3112) 0ed90ba - [policerorch]: Fix return code comparison error (sonic-net#968) (1 minutes ago) <Shuotian Cheng) 80fcada - remove crm acl_counters when acl_table removed (sonic-net#918) (3 hours ago) <JaredLius> bd3651f - [aclorch]: Fix matching MIRROR_DSCP throws unnecessary errors (sonic-net#966) (2 minutes ago) <Shuotian Cheng> 0af226a - [aclorch]: Add MIRROR_DSCP table type (sonic-net#906) (4 weeks ago) <Shuotian Cheng> 9005962 - [vstest]: Update the mirror session state table name (sonic-net#917) (5 weeks ago) <Shuotian Cheng> c4e3e54 - [policerorch]: Add PolicerOrch to bundle with mirror session (sonic-net#889) (6 weeks ago) <Shuotian Cheng> ee49926 - [Makefile]: Remove header files from source files (sonic-net#883) (8 weeks ago) <Shuotian Cheng> f889f80 - [aclorch]: Add ICMP type/code match for v4/v6 (sonic-net#868) (8 weeks ago) <Shuotian Cheng> 9931450 - [aclorch]: Add MIRRORv6 and MIRRORv4v6 support for ACL table (sonic-net#825) (9 weeks ago) <Shuotian Cheng> a1ab18c - [mirrororch]: Fix comments typo (sonic-net#863) (9 weeks ago) <Shuotian Cheng> sonic-swss-common 485db07 - [schema]: Add SWITCH_CAPABILITY_TABLE (sonic-net#276) (6 weeks ago) <Shuotian Cheng> 3f49b20 - [schema]: Add POLICER configuration table (sonic-net#277) (6 weeks ago) <Shuotian Cheng> 539b87d - [schema]: Add STATE_MIRROR_SESSION_TABLE_NAME (sonic-net#278) (6 weeks ago) <Shuotian Cheng> sonic-utilities dc52015 - [Sonic-utilities]: Added commands to view acl and port running configs (sonic-net#557) (6 days ago) <Prem Prakash> 635dc88 - [config]: Add config acl add/remove table command (sonic-net#541) (4 weeks ago) <Shuotian Cheng> dcdc922 - [show]: Add show policer command (sonic-net#540) (4 weeks ago) <Shuotian Cheng> 128462a - [config]: Add --policer option for mirror session (sonic-net#537) (6 weeks ago) <Shuotian Cheng> 38da7f3 - [acl_loader]: Add policer attribute in show mirror_session command (sonic-net#538) (6 weeks ago) <Shuotian Cheng> f95ff00 - [acl_loader]: Do not apply default DENY rule for MIRRORV6 table (sonic-net#522) (6 weeks ago) <Shuotian Cheng> Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
…omatically (sonic-net#20222) src/sonic-swss-common * 3d9f52b - (HEAD -> 202311, origin/202311) Account for control character as part of zmq_read_part (sonic-net#906) (sonic-net#910) (6 hours ago) [mssonicbld]
Description of PR
Summary:
Fixes # (issue)
The vEOS VM deploy script restart the VM after start-up config is loaded into it. The VMs need some time to start up and be functional. There could be issue if run other tasks like changing topo immediately before the VMs are up. This change is to add some code to wait until the VMs are back after restart.
Type of change
Approach
How did you do it?
Add code to wait until the VMs are back after restart.
How did you verify/test it?
Used in Mellanox lab.
Any platform specific information?
NA
Supported testbed topology if it's a new test case?
NA
Documentation