-
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
[build]: Move Systemd service start to systemd generator #3172
[build]: Move Systemd service start to systemd generator #3172
Conversation
please provide test log, can you get the docker ps output after boot? |
The services that you moved shouldn't impact the |
@jleveque The services tied to docker containers are started in rc.local here, and the other explicitly named services get started as well. Although you do bring up a good point, as I believe the build/boot process for the virtual switch image is slightly different than other images. @lguohan can probably speak more to this, but I believe for the virtual switch image (which is the only image I'm testing with), first boot actually happens during the build because of the way we generate the final image. So even though it works for the virtual switch, it might not work properly for other platforms. I'm not sure how to go about testing this. |
You will need to build an image and install on an actual device to test. So the Docker containers are part of the |
Not sure about the name, |
OK. I guess I wasn't aware of that. 😕 |
@jleveque you were right, a reboot is needed for things to start up properly. I'm testing some changes now that hopefully fix that issue. |
it would be a no go if a reboot is required after installation. |
b050b13
to
be62ff9
Compare
retest vsimage please |
python is slow! https://www.freedesktop.org/software/systemd/man/systemd.generator.html I suggest follow the suggestion. example: https://github.com/systemd/systemd/blob/master/src/getty-generator/getty-generator.c |
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.
overall, i think it looks good.
since the boot up time is critical to us, I would like you to convert your generator to c program.
Signed-off-by: Lawrence Lee <[email protected]>
d32f364
to
52f1d74
Compare
* remove install dependency from p4 docker * use CONFIGURED_ARCH in Makefile Signed-off-by: Lawrence Lee <[email protected]>
retest this please |
retest vs please |
retest this please |
restest this please |
retest vs please |
1 similar comment
retest vs please |
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.
something is wrong, I cannot find the generator binary in the image.
retest broadcom please |
3 similar comments
retest broadcom please |
retest broadcom please |
retest broadcom please |
platform/broadcom/raw-image.mk
Outdated
@@ -4,6 +4,7 @@ SONIC_RAW_IMAGE = sonic-broadcom.raw | |||
$(SONIC_RAW_IMAGE)_MACHINE = broadcom | |||
$(SONIC_RAW_IMAGE)_IMAGE_TYPE = raw | |||
$(SONIC_RAW_IMAGE)_INSTALLS += $(BRCM_OPENNSL_KERNEL) | |||
$(SONIC_ONE_ABOOT_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR) |
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.
this is in correct, please fix.
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 missed platform/broadcom/aboot-image.mk as well.
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.
Not sure which file you're referring to, I don't see broadcom/aboot-image.mk , did you mean one-aboot.mk?
* fix Makefile typo Signed-off-by: Lawrence Lee <[email protected]>
retest vs please |
retest baseimage please |
retest vs please |
4 similar comments
retest vs please |
retest vs please |
retest vs please |
retest vs please |
SYSTEMD_SONIC_GENERATOR was added earlier in public repo as part of PR sonic-net#3172 (sonic-net#3172) This update was missed in the NBI image make file as this cisco image file ( one-nbi.mk ) is not present in public REPO This is the module which fine tunes and creates the systemd files. This is needed for multi-asic dockers to come up on a 3164 coverted to SONIC with NBI image. admin@NAMESPACE5:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 71aa6d5cecc9 docker-teamd:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes teamd5 843d86e325d6 docker-syncd-brcm:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes syncd5 71e3db49929f docker-teamd:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes teamd4 4c8b68200395 docker-orchagent:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes swss5 a99da03c65f6 docker-syncd-brcm:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes syncd4 43135b5ba83a docker-teamd:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes teamd3 0d059f873315 docker-orchagent:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes swss4 388f1b4c8ab5 docker-syncd-brcm:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes syncd3 6a5a426454a8 docker-teamd:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes teamd2 489afc83e2b7 docker-orchagent:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes swss3 22f0f342b81b docker-syncd-brcm:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes syncd2 67413f12cc0f docker-teamd:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes teamd1 1f1dfcce6b23 docker-teamd:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes teamd0 c13644c642d8 docker-orchagent:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes swss2 6530eb85b150 docker-syncd-brcm:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes syncd1 e56e0712b2d1 docker-orchagent:latest "/usr/bin/supervisord" 33 minutes ago Up 33 minutes swss1 32728bcc249a docker-syncd-brcm:latest "/usr/bin/supervisord" 3 ...
- What I did
- How I did it
/etc/sonic/generated_services.conf
to be read by the generator at boot time- How to verify it
Build, install, and start an image and ensure that all system services and docker containers run properly.
Output of
docker ps
after boot should be similar to the following:All containers should be running or 'up'.
- Description for the changelog
Enable Systemd services in a Systemd generator to prepare for boot time platform detection and service configuration.
- A picture of a cute animal (not mandatory but encouraged)