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

add systemd support #6675

Merged
merged 7 commits into from Sep 30, 2019
Merged

add systemd support #6675

merged 7 commits into from Sep 30, 2019

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Sep 25, 2019

This change:

  1. adds socket activation support for the API and the gateway
  2. notifies systemd when go-ipfs is ready
  3. notifies systemd when go-ipfs is shutting down

Unlike my previous attempt (#5514), this change merges the sockets passed by systemd with those configured in ipfs config. This is likely what the user wants.

Motivation:

  1. Change 1 makes it possible to start go-ipfs on demand.
  2. Change 2 makes it possible to wait for go-ipfs to finish starting. This makes it possible to use systemd's automount feature along with add experimental daemon plugin for 9P2000.L support #6612 to auto-start IPFS and auto-mount /ipfs on demand.

@Stebalien Stebalien requested review from mburns and olizilla and removed request for dirkmc and djdv September 25, 2019 04:07
@hsanjuan
Copy link
Contributor

Would you consider putting the sockets part as a separate, re-usable module out of the ipfs codebase? Seems quite useful.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Instead of letting systemd override the configured addresses, merge them. This
is likely the "expected" behavior.
That way, we can reliably know when the daemon is ready.
@Stebalien
Copy link
Member Author

@hsanjuan done.

Copy link

@gmasgras gmasgras left a comment

Choose a reason for hiding this comment

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

tested this and it works as expected

@Stebalien Stebalien merged commit 164dd28 into master Sep 30, 2019
@Stebalien Stebalien deleted the feat/systemd-activation branch September 30, 2019 22:22
@olizilla
Copy link
Member

@Stebalien could you merge these systemd improvements into the stabalize-dht branch so we can try them on a gateway node pls?

@Stebalien
Copy link
Member Author

@olizilla I've rebased the stabilize branch. However, that branch now requires 2048 bit keys so we'll want to wait until we've updated the bootstrappers (or add a patch to that branch to revert it).

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