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

apiserver: use systemd-notify(1) #691

Merged
merged 1 commit into from
Jan 29, 2020
Merged

apiserver: use systemd-notify(1) #691

merged 1 commit into from
Jan 29, 2020

Conversation

iliana
Copy link
Contributor

@iliana iliana commented Jan 28, 2020

Issue #, if available: n/a

Description of changes:
This avoids use of the systemd and libsystemd-sys crates just for sending the start-up completion message to systemd.

Launched instances with this change and was able to access the API server to enable the admin container and run:

bash-5.0# LD_TRACE_LOADED_OBJECTS=1 /x86_64-thar-linux-gnu/sys-root/usr/lib64/ld-linux-x86-64.so.2 /usr/bin/apiserver 
        linux-vdso.so.1 (0x00007ffeef183000)
        libstd-e79e6f553aa6b60d.so => /x86_64-thar-linux-gnu/sys-root/usr/lib/libstd-e79e6f553aa6b60d.so (0x00007f6cc14ff000)
        libdl.so.2 => /x86_64-thar-linux-gnu/sys-root/usr/lib/libdl.so.2 (0x00007f6cc14fa000)
        librt.so.1 => /x86_64-thar-linux-gnu/sys-root/usr/lib/librt.so.1 (0x00007f6cc14f0000)
        libpthread.so.0 => /x86_64-thar-linux-gnu/sys-root/usr/lib/libpthread.so.0 (0x00007f6cc14ce000)
        libgcc_s.so.1 => /x86_64-thar-linux-gnu/sys-root/usr/lib/libgcc_s.so.1 (0x00007f6cc14b4000)
        libc.so.6 => /x86_64-thar-linux-gnu/sys-root/usr/lib/libc.so.6 (0x00007f6cc132e000)
        /lib64/ld-linux-x86-64.so.2 => /x86_64-thar-linux-gnu/sys-root/usr/lib64/ld-linux-x86-64.so.2 (0x00007f6cc1a3b000)
        libm.so.6 => /x86_64-thar-linux-gnu/sys-root/usr/lib/libm.so.6 (0x00007f6cc1266000)
bash-5.0# systemctl status apiserver
● apiserver.service - Thar API server
     Loaded: loaded (/x86_64-thar-linux-gnu/sys-root/usr/lib/systemd/system/apiserver.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2020-01-28 23:19:05 UTC; 5min ago
   Main PID: 2177 (apiserver)
      Tasks: 5 (limit: 9201)
     Memory: 6.0M
     CGroup: /system.slice/apiserver.service
             └─2177 /usr/bin/apiserver --datastore-path /var/lib/thar/datastore/current --socket-gid 274

Jan 28 23:19:05 localhost systemd[1]: Starting Thar API server...
Jan 28 23:19:05 localhost systemd[1]: Started Thar API server.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@iliana iliana requested a review from tjkirch January 28, 2020 23:26
Copy link
Contributor

@tjkirch tjkirch left a comment

Choose a reason for hiding this comment

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

I tested that this works with a local apiserver.

workspaces/api/apiserver/src/server/mod.rs Show resolved Hide resolved
This avoids use of the systemd and libsystemd-sys crates just for
sending the start-up completion message to systemd.
@iliana iliana merged commit 8c0be77 into develop Jan 29, 2020
@tjkirch tjkirch deleted the systemd-notify-cli branch January 29, 2020 17:13
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.

None yet

4 participants