[sonic-cfggen] Fix sonic-cfggen crash issue when printing non-exists table/key#4131
[sonic-cfggen] Fix sonic-cfggen crash issue when printing non-exists table/key#4131zhenggen-xu wants to merge 2 commits intosonic-net:masterfrom
Conversation
06d47b5 to
b71c240
Compare
|
@zhenggen-xu , it looks like your proposed change breaks the test. I do not whether we should change the test or your patch. any opinion? |
|
@lguohan it looks like the upstream merge broke some changes: changed to: We need revert that line and see. |
…'t fail if no WARM_RESTART in configDB In general, instead of sonic-cfggen crashing we print empty string if we use -v or --var-json for variables not existing Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
15dff30
|
Just reverted the merge issue and let's see the results. |
pavel-shirshov
left a comment
There was a problem hiding this comment.
I'd suggest to use is not None instead of != None
…table/key Address review feedback Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
In general, I might want to leave that to different PR, as the fix here was to handle exceptions not fixing existing style issue. I see many places in the file using "!= None", we probably should have some PR to address them all together. Anyway, I changed it so to get the PR moving forward. |
|
Your code catches all exceptions. How can we find an issue if we have one? I'd suggest you to make |
…lly (#25253) #### Why I did it src/sonic-swss ``` * 9b237a2e - (HEAD -> master, origin/master, origin/HEAD) [vnet/vxlan]: Handle SAI failures without crashing swss (#3908) (4 hours ago) [prabhataravind] * 1d348170 - Enabling the FEC histogram for gbsyncd counters (#4067) (9 hours ago) [arpit-nexthop] * 2ee85de5 - [ci] fix docker slave name (#4090) (29 hours ago) [yijingyan2] * 0f99a399 - Merge pull request #4089 from divyagayathri-hcl/6_multicast (34 hours ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 0cb64f2d - [P4Orch] Implement functions to process/drain multicast router interface table entries. (2 days ago) [mint570] |/ * 76f9b4b7 - Merge pull request #4087 from divyagayathri-hcl/5_multicast (3 days ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 69e09ff0 - [P4Orch] Implement functions for both deleting and updating a multicast router interface table entries. (4 days ago) [mint570] |/ * b60191c9 - This PR adds communication statistics recording and debugging utilities to countersyncd for analyzing online issues and performance. The changes introduce a new utilities module with functions for formatting hex dumps and tracking inter-actor channel statistics. Changes: Added utilities module with hex formatting and channel statistics tracking Instrumented all actor message receive points to record queue lengths Added debug logging for raw netlink message payloads Reviewed changes (7 days ago) [Ze Gan] * 61724451 - Add drop monitor attributes to supported debug counter attributes (#4120) (7 days ago) [manish1-arista] * 48c3c201 - [Vnetorch] Relax attr parsing for vnet route table (#4150) (7 days ago) [Jing Zhang] * 8b18beef - Merge pull request #4085 from divyagayathri-hcl/3_multicast (7 days ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 6125fc55 - [P4Orch] Implement functions to add multicast router interface table entries. (8 days ago) [mint570] | failure_prs.log skip_prs.log 2571bbb8 - [P4Orch] Add L3MulticastManager class definition and begin to populate its unit test. (8 days ago) [mint570] |/ * a8d968c9 - Update the COUNTER_DB with the new Port Object-Id when the Port is removed and created when the Port Speed is changed dynamically via GCU (#3977) (9 days ago) [saksarav-nokia] * 416a0eb8 - [countersyncd]: Add retry between client and otel collector (#4131) (10 days ago) [Janet Cui] * 5fdb2456 - Merge pull request #4083 from divyagayathri-hcl/1_multicast (10 days ago) [StephenWangGoogle] * 8e72c3d9 - [P4Orch] Add support for SAI functions needed for swss multicast support. (12 days ago) [mint570] ``` #### How I did it #### How to verify it #### Description for the changelog
…lly (sonic-net#25253) #### Why I did it src/sonic-swss ``` * 9b237a2e - (HEAD -> master, origin/master, origin/HEAD) [vnet/vxlan]: Handle SAI failures without crashing swss (sonic-net#3908) (4 hours ago) [prabhataravind] * 1d348170 - Enabling the FEC histogram for gbsyncd counters (sonic-net#4067) (9 hours ago) [arpit-nexthop] * 2ee85de5 - [ci] fix docker slave name (sonic-net#4090) (29 hours ago) [yijingyan2] * 0f99a399 - Merge pull request sonic-net#4089 from divyagayathri-hcl/6_multicast (34 hours ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 0cb64f2d - [P4Orch] Implement functions to process/drain multicast router interface table entries. (2 days ago) [mint570] |/ * 76f9b4b7 - Merge pull request sonic-net#4087 from divyagayathri-hcl/5_multicast (3 days ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 69e09ff0 - [P4Orch] Implement functions for both deleting and updating a multicast router interface table entries. (4 days ago) [mint570] |/ * b60191c9 - This PR adds communication statistics recording and debugging utilities to countersyncd for analyzing online issues and performance. The changes introduce a new utilities module with functions for formatting hex dumps and tracking inter-actor channel statistics. Changes: Added utilities module with hex formatting and channel statistics tracking Instrumented all actor message receive points to record queue lengths Added debug logging for raw netlink message payloads Reviewed changes (7 days ago) [Ze Gan] * 61724451 - Add drop monitor attributes to supported debug counter attributes (sonic-net#4120) (7 days ago) [manish1-arista] * 48c3c201 - [Vnetorch] Relax attr parsing for vnet route table (sonic-net#4150) (7 days ago) [Jing Zhang] * 8b18beef - Merge pull request sonic-net#4085 from divyagayathri-hcl/3_multicast (7 days ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 6125fc55 - [P4Orch] Implement functions to add multicast router interface table entries. (8 days ago) [mint570] | failure_prs.log skip_prs.log 2571bbb8 - [P4Orch] Add L3MulticastManager class definition and begin to populate its unit test. (8 days ago) [mint570] |/ * a8d968c9 - Update the COUNTER_DB with the new Port Object-Id when the Port is removed and created when the Port Speed is changed dynamically via GCU (sonic-net#3977) (9 days ago) [saksarav-nokia] * 416a0eb8 - [countersyncd]: Add retry between client and otel collector (sonic-net#4131) (10 days ago) [Janet Cui] * 5fdb2456 - Merge pull request sonic-net#4083 from divyagayathri-hcl/1_multicast (10 days ago) [StephenWangGoogle] * 8e72c3d9 - [P4Orch] Add support for SAI functions needed for swss multicast support. (12 days ago) [mint570] ``` #### How I did it #### How to verify it #### Description for the changelog Signed-off-by: Xincun Li <stli@microsoft.com>
…lly (sonic-net#25253) #### Why I did it src/sonic-swss ``` * 9b237a2e - (HEAD -> master, origin/master, origin/HEAD) [vnet/vxlan]: Handle SAI failures without crashing swss (sonic-net#3908) (4 hours ago) [prabhataravind] * 1d348170 - Enabling the FEC histogram for gbsyncd counters (sonic-net#4067) (9 hours ago) [arpit-nexthop] * 2ee85de5 - [ci] fix docker slave name (sonic-net#4090) (29 hours ago) [yijingyan2] * 0f99a399 - Merge pull request sonic-net#4089 from divyagayathri-hcl/6_multicast (34 hours ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 0cb64f2d - [P4Orch] Implement functions to process/drain multicast router interface table entries. (2 days ago) [mint570] |/ * 76f9b4b7 - Merge pull request sonic-net#4087 from divyagayathri-hcl/5_multicast (3 days ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 69e09ff0 - [P4Orch] Implement functions for both deleting and updating a multicast router interface table entries. (4 days ago) [mint570] |/ * b60191c9 - This PR adds communication statistics recording and debugging utilities to countersyncd for analyzing online issues and performance. The changes introduce a new utilities module with functions for formatting hex dumps and tracking inter-actor channel statistics. Changes: Added utilities module with hex formatting and channel statistics tracking Instrumented all actor message receive points to record queue lengths Added debug logging for raw netlink message payloads Reviewed changes (7 days ago) [Ze Gan] * 61724451 - Add drop monitor attributes to supported debug counter attributes (sonic-net#4120) (7 days ago) [manish1-arista] * 48c3c201 - [Vnetorch] Relax attr parsing for vnet route table (sonic-net#4150) (7 days ago) [Jing Zhang] * 8b18beef - Merge pull request sonic-net#4085 from divyagayathri-hcl/3_multicast (7 days ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 6125fc55 - [P4Orch] Implement functions to add multicast router interface table entries. (8 days ago) [mint570] | failure_prs.log skip_prs.log 2571bbb8 - [P4Orch] Add L3MulticastManager class definition and begin to populate its unit test. (8 days ago) [mint570] |/ * a8d968c9 - Update the COUNTER_DB with the new Port Object-Id when the Port is removed and created when the Port Speed is changed dynamically via GCU (sonic-net#3977) (9 days ago) [saksarav-nokia] * 416a0eb8 - [countersyncd]: Add retry between client and otel collector (sonic-net#4131) (10 days ago) [Janet Cui] * 5fdb2456 - Merge pull request sonic-net#4083 from divyagayathri-hcl/1_multicast (10 days ago) [StephenWangGoogle] * 8e72c3d9 - [P4Orch] Add support for SAI functions needed for swss multicast support. (12 days ago) [mint570] ``` #### How I did it #### How to verify it #### Description for the changelog Signed-off-by: Feng Pan <fenpan@microsoft.com>
…lly (#25253) #### Why I did it src/sonic-swss ``` * 9b237a2e - (HEAD -> master, origin/master, origin/HEAD) [vnet/vxlan]: Handle SAI failures without crashing swss (#3908) (4 hours ago) [prabhataravind] * 1d348170 - Enabling the FEC histogram for gbsyncd counters (#4067) (9 hours ago) [arpit-nexthop] * 2ee85de5 - [ci] fix docker slave name (#4090) (29 hours ago) [yijingyan2] * 0f99a399 - Merge pull request #4089 from divyagayathri-hcl/6_multicast (34 hours ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 0cb64f2d - [P4Orch] Implement functions to process/drain multicast router interface table entries. (2 days ago) [mint570] |/ * 76f9b4b7 - Merge pull request #4087 from divyagayathri-hcl/5_multicast (3 days ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 69e09ff0 - [P4Orch] Implement functions for both deleting and updating a multicast router interface table entries. (4 days ago) [mint570] |/ * b60191c9 - This PR adds communication statistics recording and debugging utilities to countersyncd for analyzing online issues and performance. The changes introduce a new utilities module with functions for formatting hex dumps and tracking inter-actor channel statistics. Changes: Added utilities module with hex formatting and channel statistics tracking Instrumented all actor message receive points to record queue lengths Added debug logging for raw netlink message payloads Reviewed changes (7 days ago) [Ze Gan] * 61724451 - Add drop monitor attributes to supported debug counter attributes (#4120) (7 days ago) [manish1-arista] * 48c3c201 - [Vnetorch] Relax attr parsing for vnet route table (#4150) (7 days ago) [Jing Zhang] * 8b18beef - Merge pull request #4085 from divyagayathri-hcl/3_multicast (7 days ago) [StephenWangGoogle] |\ | failure_prs.log skip_prs.log 6125fc55 - [P4Orch] Implement functions to add multicast router interface table entries. (8 days ago) [mint570] | failure_prs.log skip_prs.log 2571bbb8 - [P4Orch] Add L3MulticastManager class definition and begin to populate its unit test. (8 days ago) [mint570] |/ * a8d968c9 - Update the COUNTER_DB with the new Port Object-Id when the Port is removed and created when the Port Speed is changed dynamically via GCU (#3977) (9 days ago) [saksarav-nokia] * 416a0eb8 - [countersyncd]: Add retry between client and otel collector (#4131) (10 days ago) [Janet Cui] * 5fdb2456 - Merge pull request #4083 from divyagayathri-hcl/1_multicast (10 days ago) [StephenWangGoogle] * 8e72c3d9 - [P4Orch] Add support for SAI functions needed for swss multicast support. (12 days ago) [mint570] ``` #### How I did it #### How to verify it #### Description for the changelog Signed-off-by: dprital <drorp@nvidia.com>
This should be back-ported to 201911 and 201811 branches too.
- What I did
If the configDB has no warm-restart configurations, the start.sh in bgp docker would fail due to python exception as below:
- How I did it
Check the WARM_RESTART table first. If does not exist, won't check the bgp_eoiu info to avoid crash.
- How to verify it
After the fix:
Additional tests:
Before fix:
After fix:
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)