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

syncd cannot be executed using -s option, remove unuseful buffer #499

Merged
merged 1 commit into from
Aug 1, 2019

Conversation

dzhangalibaba
Copy link
Contributor

  • fix wrong API type in internal_api_wait_for_response()

  • add cmdline parse option "s" , otherwise syncd cannot be executed via -s option, system cannot be up with syncd

    • current behavior:
root@ASW-7005:/# /usr/bin/syncd --diag -u -p /etc/sai.d/sai.profile -s
/usr/bin/syncd: invalid option -- 's'
Usage: syncd [-N] [-U] [-d] [-p profile] [-i interval] [-t [cold|warm|fast|fastfast]] [-h] [-u] [-S] [-s]
    -N --nocounters
        Disable counter thread
    -d --diag
        Enable diagnostic shell
    -p --profile profile
        Provide profile map file
    -i --countersInterval interval
        Provide counter thread interval
    -t --startType type
        Specify cold|warm|fast|fastfast start type
    -u --useTempView:
        Use temporary view between init and apply
    -S --disableExitSleep
        Disable sleep when syncd crashes
    -U --eableUnittests
        Metadata enable unittests
    -C --eableConsistencyCheck
        Enable consisteny check DB vs ASIC after comparison logic
    -s --syncMode
        Enable synchronous mode
    -h --help
        Print out this message
* after the fix :
root@ASW-7005:/# ps -ef | grep syncd
root        56     1  0 07:16 pts/0    00:00:00 /usr/bin/dsserve /usr/bin/syncd --diag -u -p /etc/sai.d/sai.profile -s
root        63    56 20 07:16 pts/0    00:01:50 /usr/bin/syncd --diag -u -p /etc/sai.d/sai.profile -s
root       290    92  0 07:25 pts/2    00:00:00 grep syncd
root@ASW-7005:/# 
  • remove unuseful api call g_asicState->setBuffered(false)
    • when orchagent is executed, orchagent will set switch attribute to decide the setBuffer is true or false, it is not needed to set the value here.

Signed-off-by: Dong Zhang d.zhang@alibaba-inc.com

@dzhangalibaba
Copy link
Contributor Author

is syncd with -s option tested before the changes merged? The issue is obvious.

Also there is another core-dump/crash issue in swss/orchagent when using syncMode, that crash is a must see when loading the image, is orchagent tested before changes merged? I'll file another PR on swss repo for the crash issue.

Copy link
Collaborator

@kcudnik kcudnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@lguohan
Copy link
Contributor

lguohan commented Aug 1, 2019

can you approve?

@lguohan lguohan added the Bug label Aug 1, 2019
@lguohan lguohan merged commit 70490b4 into sonic-net:master Aug 1, 2019
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
…all (sonic-net#499)

fix wrong API type in internal_api_wait_for_response()

add cmdline parse option "s" , otherwise syncd cannot be executed via -s option, system cannot be up with syncd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants