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

[portsyncd] when no ports on config db on init - continue and set PortConfigDone #1861

Merged

Conversation

tomer-israel
Copy link
Contributor

Signed-off-by: tomeri [email protected]

What I did

  • continue the execution of handlePortConfigFromConfigDB when no ports on config db -> continue and set PortConfigDone
  • function handlePortConfigFromConfigDB is no longer boolean - change it to void

Why I did it
when there are no ports on config db the PortConfigDone on APP db wasn't set and dynamic add/remove of ports after init stage is damaged.

How I verified it
started with no ports configured and verified that PortConfigDone is set on APP db

Details if related

@tomer-israel tomer-israel requested a review from prsunny as a code owner August 9, 2021 11:47
@tomer-israel
Copy link
Contributor Author

/azpw run

@tomer-israel
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 1861 in repo Azure/sonic-swss

@tomer-israel
Copy link
Contributor Author

i have these failures on the swss checkers:
test_zero_cable_len_profile_update
test_route_nhg
test_route_nhg_exhaust
test_SpeedAndBufferSet

vs tests:
test_SpeedAndBufferSet failed (1 runs remaining out of 2).
<class 'AssertionError'>
Unexpected number of keys: expected=4, received=3 (('egress_lossy_profile', 'egress_lossless_profile', 'ingress_lossy_profile')), table="BUFFER_PROFILE"
[<TracebackEntry /home/vsts/work/1/s/tests/test_speed.py:39>, <TracebackEntry /home/vsts/work/1/s/tests/dvslib/dvs_database.py:366>]
test_SpeedAndBufferSet failed; it passed 0 out of the required 1 times.
<class 'AssertionError'>
Unexpected number of keys: expected=4, received=3 (('egress_lossy_profile', 'egress_lossless_profile', 'ingress_lossy_profile')), table="BUFFER_PROFILE"
[<TracebackEntry /home/vsts/work/1/s/tests/test_speed.py:39>, <TracebackEntry /home/vsts/work/1/s/tests/dvslib/dvs_database.py:366>]

it looks not related to my change and I also saw the same errors on this PR (the PR is not related to our PR):
#1860

so maybe we need to rerun these tests

@prsunny
Copy link
Collaborator

prsunny commented Aug 11, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tomer-israel
Copy link
Contributor Author

the code changes are not related to the failures at all:


test_dependency failed (1 runs remaining out of 2).
	<class 'AssertionError'>
	Unexpected number of keys: expected=0, received=1 (('oid:0x20000000005e8',)), table="ASIC_STATE:SAI_OBJECT_TYPE_LAG"
	[<TracebackEntry /home/vsts/work/1/s/tests/test_port_dpb_lag.py:55>, <TracebackEntry /home/vsts/work/1/s/tests/dvslib/dvs_lag.py:28>, <TracebackEntry /home/vsts/work/1/s/tests/dvslib/dvs_database.py:366>]

self = <test_port_dpb_lag.TestPortDPBLag object at 0x7f5a632cf550>
dvs = <conftest.DockerVirtualSwitch object at 0x7f5a638cb100>
marker = '=== start marker 2021-08-17T16:31:14.419203 ==='
log = 'Unable to remove port Ethernet0: ref count 1', expected_cnt = 1

    def check_syslog(self, dvs, marker, log, expected_cnt):
        (exitcode, num) = dvs.runcmd(['sh', '-c', "awk \'/%s/,ENDFILE {print;}\' /var/log/syslog | grep \"%s\" | wc -l" % (marker, log)])
>       assert num.strip() >= str(expected_cnt)
E       AssertionError: assert '0' >= '1'
E        +  where '0' = <built-in method strip of str object at 0x7f5a63a6c7f0>()
E        +    where <built-in method strip of str object at 0x7f5a63a6c7f0> = '0\n'.strip
E        +  and   '1' = str(1)

test_port_dpb_lag.py:11: AssertionError

my changes are related to init stage only when we are starting the system with zero ports, we continue to send portConfigDone

@liat-grozovik
Copy link
Collaborator

@prsunny was this test fixed/removed to allow other PRs to get in?

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

@prsunny could you please help to review and merge?

@prsunny
Copy link
Collaborator

prsunny commented Sep 20, 2021

How is this different from #1808 ?

@tomer-israel
Copy link
Contributor Author

How is this different from #1808 ?

in this change the function "handlePortConfigFromConfigDB" is continuing when we have no ports on the system and the PortConfigDone flag is set on App db

@liat-grozovik
Copy link
Collaborator

@prsunny can you please signoff?

@prsunny prsunny merged commit 3249cdb into sonic-net:master Sep 29, 2021
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
…ConfigDone (sonic-net#1861)

*continue the execution of handlePortConfigFromConfigDB when no ports on config db -> continue and set PortConfigDone
*function handlePortConfigFromConfigDB is no longer boolean - change it to void

Signed-off-by: tomeri <[email protected]>
vaibhavhd added a commit to sonic-net/sonic-buildimage that referenced this pull request Oct 9, 2021
[Submodule advance sonic-swss]
Include below commits to master image:

Cache routes for single nexthop for faster retrieval sonic-net/sonic-swss#1922
Reduce route count for route perf test (sonic-net/sonic-swss#1928)
[pytest]: Re-use DVS container when possible (sonic-net/sonic-swss#1816)
[PORTSYNCD] when no ports on config db on init, continue and set Port… (sonic-net/sonic-swss#1861)
[gearbox] Add gearbox unit test (sonic-net/sonic-swss#1920)
Reverted skipped test_buffer_dynamic test cases (sonic-net/sonic-swss#1937)
Revert "[buffer orch] Bugfix: Don't query counter SAI_BUFFER_POOL_STA… (sonic-net/sonic-swss#1945)
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…-net#1861)

* [TH3] Skip Control Plane Assist on WARM Reboot for TH3 HWSKUs
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.

3 participants