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

modify syncd init script for supporting yml #1411

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

geans-pin
Copy link
Contributor

No description provided.

Copy link

linux-foundation-easycla bot commented Aug 8, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

if [ ! -z "$PLT_CONFIG_YML" ] && [ -f $PLATFORM_DIR/common_config_support ]; then
cp -f $HWSKU_DIR/*.config.yml /tmp
cp -f /etc/sai.d/sai.profile /tmp
CONFIG_YML=$(find /tmp -name '*.yml')

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We use the file name .yml suffix to identify the file format. Can you change the sai.profile and *.config.bcm to *.yml as following BRCM SDK rule ?

@kcudnik
Copy link
Collaborator

kcudnik commented Oct 2, 2024

what is motivation here? please provide extended descrption for this pr

@geans-pin
Copy link
Contributor Author

what is motivation here? please provide extended descrption for this pr

I had added the comment to remind this in HLD. Please check the PR of HLD

@kcudnik
Copy link
Collaborator

kcudnik commented Oct 9, 2024

still not description in PR and seems like build is failing

@geans-pin
Copy link
Contributor Author

geans-pin commented Oct 23, 2024

still not description in PR and seems like build is failing
Can you check the latest commit in this PR ? on line 182 and 183

            #Overwrite section in common config should
            #be located after normal section

Also, in the HLD PR. Please check the following description.

#Note, the Overwrite Section should be located after normal section in the common config file, otherwise the logic will overwrite all properties

@kcudnik
Copy link
Collaborator

kcudnik commented Oct 23, 2024

still not description in PR and seems like build is failing
Can you check the latest commit in this PR ? on line 182 and 183

            #Overwrite section in common config should
            #be located after normal section

Also, in the HLD PR. Please check the following description.

#Note, the Overwrite Section should be located after normal section in the common config file, otherwise the logic will overwrite all properties

here: #1411 (comment) no description

@geans-pin
Copy link
Contributor Author

still not description in PR and seems like build is failing
Can you check the latest commit in this PR ? on line 182 and 183

            #Overwrite section in common config should
            #be located after normal section

Also, in the HLD PR. Please check the following description.
#Note, the Overwrite Section should be located after normal section in the common config file, otherwise the logic will overwrite all properties

here: #1411 (comment) no description

With the new fix, we don't have this limitation. So, we don't need the comment now.

Geans

@geans-pin
Copy link
Contributor Author

common config UT.pdf

fi

if [ ! -z "$PLT_CONFIG_BCM" ] && [ -f $PLATFORM_DIR/common_config_support ] ; then
cp -f $HWSKU_DIR/*.config.bcm /tmp

Choose a reason for hiding this comment

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

If there is no *.config.bcm doesn't exist, this command will fail. Need to check /etc/said.d/profile and find out where is the config.bcm file then copy it to /tmp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So far the script does search the sai.profile to find platform config.
The following copied escaped from the fix.

Can you try the following change for line#250 to see if works ? I will fix it in the PR.

cp -f $HWSKU_DIR/*.config.bcm /tmp => cp -f $PLT_CONFIG_BCM /tmp

Geans

for file in $CONFIG_BCM; do
merge_config_bcm_files $file $COMMON_CONFIG_BCM "chip common properties"
done
echo "Merging $PLT_CONFIG_BCM with $COMMON_CONFIG_BCM, merge files stored in $CONFIG_BCM"

Choose a reason for hiding this comment

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

For 7260 hwsku, no config.bcm, just config.bcm.j2.
The merged file doesn't exist, and caused syncd can't boot up.

2024 Nov 14 05:02:27.495014 str2-7260cx3-acs-9 INFO syncd#supervisord: syncd Merging /etc/sai.d/config.bcm with /usr/share/sonic/device/x86_64-broadcom_common/x86_64-broadcom_b97/broadcom-sonic-th2.config.bcm, merge files stored in 
2024 Nov 14 05:02:27.505237 str2-7260cx3-acs-9 INFO syncd#supervisord: syncd cp: cannot stat '/tmp/*.bcm': No such file or directory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So far the script does search the sai.profile to find platform config.
The following copied escaped from the fix.

Can you try the following change for line#250 to see if works ? I will fix it in the PR.

cp -f $HWSKU_DIR/*.config.bcm /tmp => cp -f $PLT_CONFIG_BCM /tmp

Geans

@geans-pin
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@geans-pin
Copy link
Contributor Author

@ZhaohuiS

Can you help the checker failed ? In this PR, we don't change this src/singaler.cpp actually.

Geans

Assertion failed: pfd.revents & POLLIN (src/signaler.cpp:265)
/bin/bash: line 6: 22075 Aborted (core dumped) ${dir}$tst
FAIL: tests

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.

5 participants