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

[docker-sonic-vs] Create /usr/share/sonic/platform symlink #5268

Merged
merged 1 commit into from
Sep 1, 2020
Merged

[docker-sonic-vs] Create /usr/share/sonic/platform symlink #5268

merged 1 commit into from
Sep 1, 2020

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Aug 28, 2020

- Why I did it
Copying platform.json file into an empty /usr/share/sonic/platform directory does not mimic an actual device. A more correct approach is to create a /usr/share/sonic/platform symlink which links to the actual platform directory; this is more like what is done inside SONiC containers. Then, we only need to copy the platform.json file into the actual platform directory; the symlink takes care of the alternative path, and also exposes all the other files in the platform directory.

One question: Since the SONiC VS container mimics the host OS of a physical switch, do we even need to create the /usr/share/sonic/platform and /usr/share/sonic/hwsku symlinks? Maybe we can remove these in a future patch.

- How I did it
Create /usr/share/sonic/platform symlink in start.sh

- How to verify it
Start a SONiC VS container and ensure the symlink exists.

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006

@jleveque
Copy link
Contributor Author

jleveque commented Aug 28, 2020

@samaity: Please review, as this affects a change made by you.

@jleveque
Copy link
Contributor Author

Retest vsimage please

@samaity
Copy link
Collaborator

samaity commented Aug 28, 2020

LGTM! @jleveque. Just one question is there any place where we try to find the port configuration file like portconfig.ini under /usr/share/sonic/platform/ folder. During implementation, I was thinking of doing something like this. But then I was just being extra cautious so, didn't change anything.

@jleveque
Copy link
Contributor Author

@samaity:

Just one question is there any place where we try to find the port configuration file like portconfig.ini under /usr/share/sonic/platform/ folder. During implementation, I was thinking of doing something like this. But then I was just being extra cautious so, didn't change anything.

I'm not clear what your question is here. Is this in regard to my question @ #5264 (comment)? If so, can you please respond there? If it's not related to that, can you please add some more details here?

@jleveque jleveque merged commit 456adc3 into sonic-net:master Sep 1, 2020
@jleveque jleveque deleted the cleanup_vs_docker branch September 1, 2020 20:52
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
…#5268)

Copying platform.json file into an empty /usr/share/sonic/platform directory does not mimic an actual device. A more correct approach is to create a /usr/share/sonic/platform symlink which links to the actual platform directory; this is more like what is done inside SONiC containers. Then, we only need to copy the platform.json file into the actual platform directory; the symlink takes care of the alternative path, and also exposes all the other files in the platform directory.
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.

3 participants