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

Fix issue config qos reload causing orchagent aborted via tracking dependencies among QoS tables #2116

Merged
merged 6 commits into from
Mar 9, 2022

Conversation

stephenxs
Copy link
Collaborator

What I did
Fix issue config qos reload causing orchagent aborted via tracking dependencies among QoS tables

  1. Track dependencies among QoS tables.
    Won't call SAI remove API for an object if it is still referenced.
  2. Support removing/replacing one field in PORT_QOS_MAP and QUEUE tables.
  3. Optimize logic to handle QUEUE table.
  4. Remove switch level DSCP_TO_TC map before the map is removed.
  5. Add mock test

Signed-off-by: Stephen Sun stephens@nvidia.com

Why I did it
Fix issue.

How I verified it
Manually test and mock test.

Details if related

…pendencies among QoS tables

1. Track dependencies among QoS tables.
   Won't call SAI remove API for an object if it is still referenced.
2. Support removing/replacing one field in PORT_QOS_MAP and QUEUE tables.
3. Optimize logic to handle QUEUE table.
4. Remove switch level DSCP_TO_TC map before the map is removed.
5. Add mock test

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Address typos
Fix issue: port qos map was not removed from the object store
Fix issue: if 2 dscp to tc maps were created and then 1 is removed,
the global map can be removed as well.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
There is one dscp to tc map which is set as global map
Create a new one and then remove it, the global map is removed
Add test case as well

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs stephenxs requested a review from prsunny as a code owner January 19, 2022 15:06
@stephenxs stephenxs requested a review from neethajohn January 19, 2022 15:08
@stephenxs
Copy link
Collaborator Author

This is to fix issue sonic-net/sonic-buildimage#9088

@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

@neethajohn kindly reminder to review this fix.

1 similar comment
@liat-grozovik
Copy link
Collaborator

@neethajohn kindly reminder to review this fix.

@dprital
Copy link
Collaborator

dprital commented Feb 8, 2022

@neethajohn - Can you please approve this PR ?

stephenxs and others added 2 commits February 22, 2022 01:47
@stephenxs
Copy link
Collaborator Author

LGTM failed due to

[2022-02-21 05:02:32] [build-stdout] [92mProcessing saiversion_8h.xml[0m
[2022-02-21 05:02:32] [build-stdout] [92mProcessing saivirtualrouter_8h.xml[0m
[2022-02-21 05:02:32] [build-stdout] [92mProcessing saivlan_8h.xml[0m
[2022-02-21 05:02:32] [build-stdout] [92mProcessing saiwred_8h.xml[0m
[2022-02-21 05:02:32] [build-stdout] [91mERROR: invalid type '' for SAI_ACL_COUNTER_ATTR_TABLE_ID[0m
[2022-02-21 05:02:32] [build-stdout] [91mERROR: flags are not defined for SAI_ACL_COUNTER_ATTR_TABLE_ID[0m
[2022-02-21 05:02:32] [build-stdout] [91mERROR: FATAL ERROR === MUST FIX === : Can't use an undefined value as an ARRAY reference at parse.pl line 1676.
[2022-02-21 05:02:32] [build-stdout] [0m
[2022-02-21 05:02:32] [build-stderr] make[3]: *** [Makefile:107: saimetadata.c] Error 1
[2022-02-21 05:02:32] [build-stdout] make[3]: Leaving directory '/opt/src/sonic-sairedis/SAI/meta'
[2022-02-21 05:02:32] [build-stderr] make[2]: *** [Makefile:1143: saimeta-gen] Error 2
[2022-02-21 05:02:32] [build-stdout] make[2]: Leaving directory '/opt/src/sonic-sairedis/meta'
[2022-02-21 05:02:32] [build-stderr] make[1]: *** [Makefile:442: install-recursive] Error 1
[2022-02-21 05:02:32] [build-stdout] make[1]: Leaving directory '/opt/src/sonic-sairedis'
[2022-02-21 05:02:32] [build-stderr] dh_auto_install: error: make -j1 install DESTDIR=/opt/src/sonic-sairedis/debian/tmp AM_UPDATE_INFO_DIR=no returned exit code 2
[2022-02-21 05:02:32] [build-stderr] make: *** [debian/rules:59: binary-syncd-vs] Error 25
[2022-02-21 05:02:32] [ERROR] Spawned process exited abnormally (code 2; tried to run: [/opt/work/lgtm-workspace/lgtm/extract.sh])

which looks like a common issue.

@neethajohn
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sonic-net sonic-net deleted a comment from azure-pipelines bot Feb 27, 2022
@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik liat-grozovik merged commit 12f980c into sonic-net:master Mar 9, 2022
@stephenxs stephenxs deleted the fix-qos-dependency branch March 9, 2022 07:16
judyjoseph pushed a commit that referenced this pull request Mar 20, 2022
…pendencies among QoS tables (#2116)

- What I did
Fix issue config qos reload causing orchagent aborted via tracking dependencies among QoS tables

1. Track dependencies among QoS tables.
2. Won't call SAI remove API for an object if it is still referenced.
3. Support removing/replacing one field in PORT_QOS_MAP and QUEUE tables.
4. Optimize logic to handle QUEUE table.
5. Remove switch level DSCP_TO_TC map before the map is removed.
6. Add mock test

- Why I did it
Fix issue.

- How I verified it
Manually test and mock test.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
preetham-singh pushed a commit to preetham-singh/sonic-swss that referenced this pull request Aug 6, 2022
…pendencies among QoS tables (sonic-net#2116)

- What I did
Fix issue config qos reload causing orchagent aborted via tracking dependencies among QoS tables

1. Track dependencies among QoS tables.
2. Won't call SAI remove API for an object if it is still referenced.
3. Support removing/replacing one field in PORT_QOS_MAP and QUEUE tables.
4. Optimize logic to handle QUEUE table.
5. Remove switch level DSCP_TO_TC map before the map is removed.
6. Add mock test

- Why I did it
Fix issue.

- How I verified it
Manually test and mock test.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
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.

6 participants