-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support building multi-asic component #3856
Support building multi-asic component #3856
Conversation
* indicate 'virsh' should be run as sudo * add instructions to get DHCP lease for SSH connections Signed-off-by: Lawrence Lee <t-lale@microsoft.com> (cherry picked from commit 4afe564)
* prepare slave.mk to build multi-asic services * move systemd services into single and multi instance folders * prepare sonic_debian_extension to copy over single and multi instance services * detect single or multi-asic platform in systemd-sonic-generator and enable correct services Signed-off-by: Lawrence Lee <t-lale@microsoft.com> (cherry picked from commit 0fdb595)
…ulti-instance container support [build_templates]: * add network namespace creation/linking to docker_image_ctl.j2 * add support for multi-instance containers to docker_image_ctl.j2 * add support for hostnames in multi-asic containers * don't try and copy single instance version of namespace service in sonic_debian_extension [rules]: * add rule for creating network namespace docker * removes "--net=host" from DOCKER_RUN_OPTS in all other docker rules (it now lives in docker_image_ctl.j2) [build]: * retry docker build without squashing if squashing fails [platform/vs]: add network interfaces to virtual switch * add 32 more network interfaces, for a total of 64 Signed-off-by: Lawrence Lee <t-lale@microsoft.com> (cherry picked from commit ba7b7e0)
* add script to configure virtual switch internal topology * create service to manage topology * install topology service in sonic_debian_extension Signed-off-by: Lawrence Lee <t-lale@microsoft.com> (cherry picked from commit bf7b16d)
* remove extra line from slave.mk * change namespace names to 'asic#' Signed-off-by: Lawrence Lee <t-lale@microsoft.com> (cherry picked from commit 95bef6e)
platform specific conf file during boot up.
creation and use database docker network for multi asic platform.
@@ -0,0 +1,17 @@ | |||
[Unit] | |||
Description=Internal topology service | |||
Requires=database@0.service database@1.service database@2.service database@3.service database@4.service database@5.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why hard code numbers here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed to dynamically update dependency based on number of asics
can you make description more informative? refer to PR that is not going to be merged is not a good idea. |
only for multi-asic vs platform
[asic.conf]: Added default asic.conf file for vs platform
docker_image_ctl.j2
retest this please |
retest vsimage please |
1 similar comment
retest vsimage please |
NET="host" | ||
else | ||
{%- if docker_container_name == "database" %} | ||
NET="bridge" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are using tab, but other places you are using space in the same file. can you change to space and make the spacing consistent acrosss the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spacing
retest vsimage please |
1 similar comment
retest vsimage please |
- move single instance services into their own folder - generate Systemd templates for any multi-instance service files in slave.mk - detect single or multi-instance platform in systemd-sonic-generator based on asic.conf platform specific file. - update container hostname after creation instead of during creation (docker_image_ctl) - run Docker containers in a network namespace if specified - add a service to create a simulated multi-ASIC topology on the virtual switch platform Signed-off-by: Lawrence Lee <t-lale@microsoft.com> Signed-off-by: Suvarna Meenakshi <Suvarna.Meenaksh@microsoft.com>
if [ x"$HOSTNAME" != x"$CURRENT_HOSTNAME" ]; then | ||
updateHostName "$HOSTNAME" | ||
fi | ||
postStartAction | ||
updateHostName "$HOSTNAME" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for late comment.
Why it is needed to call updateHostName even though it is called in the condition right above?
echo "Failed to docker run" >&1 | ||
exit 4 | ||
} | ||
|
||
preStartAction | ||
docker start {{docker_container_name}} | ||
postStartAction | ||
updateHostName "$HOSTNAME" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question here
- move single instance services into their own folder - generate Systemd templates for any multi-instance service files in slave.mk - detect single or multi-instance platform in systemd-sonic-generator based on asic.conf platform specific file. - update container hostname after creation instead of during creation (docker_image_ctl) - run Docker containers in a network namespace if specified - add a service to create a simulated multi-ASIC topology on the virtual switch platform Signed-off-by: Lawrence Lee <t-lale@microsoft.com> Signed-off-by: Suvarna Meenakshi <Suvarna.Meenaksh@microsoft.com>
… "--net" options in the docker create command In the file "files/build_templates/docker_image_ctl.j2", it adds the option "--net" to the docker create command through the commit "abe7ef7e2e2e1215c97cee19a83aab0b130cebe5" (sonic-net#3856). Remove the "--net" option in "docker-syncd-brcm-rpc.mk" to avoid specifying duplicated "--net" options. Signed-off-by: charlie_chen <charlie_chen@edge-core.com>
…m syncd rpc (#4296) In the file "files/build_templates/docker_image_ctl.j2", it adds the option "--net" to the docker create command through the commit "abe7ef7e2e2e1215c97cee19a83aab0b130cebe5" (#3856). Remove the "--net" option in "docker-syncd-brcm-rpc.mk" to avoid specifying duplicated "--net" options. Signed-off-by: charlie_chen <charlie_chen@edge-core.com>
- move single instance services into their own folder - generate Systemd templates for any multi-instance service files in slave.mk - detect single or multi-instance platform in systemd-sonic-generator based on asic.conf platform specific file. - update container hostname after creation instead of during creation (docker_image_ctl) - run Docker containers in a network namespace if specified - add a service to create a simulated multi-ASIC topology on the virtual switch platform Signed-off-by: Lawrence Lee <t-lale@microsoft.com> Signed-off-by: Suvarna Meenakshi <Suvarna.Meenaksh@microsoft.com>
Single asic build was generated and loaded on the device to make sure the changes don't impact single asic image.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)