-
Notifications
You must be signed in to change notification settings - Fork 121
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
Compatibility for OpenRC to manage oxen service node #1395
base: debian/sid
Are you sure you want to change the base?
Conversation
Fixes: oxen-io/lokinet#1519 Signed-off-by: Jacob Hrbek <kreyren@fsfe.org>
publish that to to he dockerhub make the test to work on all branches with the file Signed-off-by: Jacob Hrbek <kreyren@fsfe.org>
Signed-off-by: Jacob Hrbek <kreyren@fsfe.org>
Signed-off-by: Jacob Hrbek <kreyren@fsfe.org>
debian/oxen-node.openrc
Outdated
DESC="oxen-node" | ||
DAEMON="/usr/bin/oxend" | ||
DAEMON_ARGS="--non-interactive --config-file /etc/oxen/oxen.conf" | ||
PIDFILE="/var/run/oxen-node-sysd2v.pid" |
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.
Any particular reason for this pid filename convention?
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 really.. This part was generated by the mentioned script
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.
Where afaik the concern are systems with both systemd compatibility and openrc runner?
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.
No, systemd doesn't write a pidfile, and AFAIK systemd will ignore a sysvinit script in /etc/init.d/whatever as long as a systemd service file is installed.
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.
Seems sane for me to not use the sysd2v
then.. Note script generated using sysd2v
converter.
Currently this isn't installing this init script with the |
Oops, that name wasn't quite right and it needed an addition to the rules file; I pushed a commit to fix it. Can you give the resulting debs a try and let me know if it works? https://oxen.rocks/jagerman/loki/devuan-ceres/deb-sid-20210130T222203Z-edb395a6d/ |
@jagerman Installation LGTM: https://gist.github.com/Kreyren/6af81ca6f52c7862564c27fb0c983e6c But the startup fails: root@d6ef928b56a6:/# service oxen-node status
oxend is not running ... failed!
root@d6ef928b56a6:/# service oxen-node start
Starting oxen-node: oxend.
root@d6ef928b56a6:/# service oxen-node status
oxend is not running ... failed!
root@d6ef928b56a6:/# grep FATAL /var/log/oxen/oxen.log
2021-02-01 11:29:21.805 7fb5aeff9140 INFO logging contrib/epee/src/mlog.cpp:255 New log categories: *:WARNING,net:FATAL,net.http:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,serialization:FATAL,logging:INFO,msgwriter:INFO
2021-02-01 11:30:04.340 7fed916b8140 INFO logging contrib/epee/src/mlog.cpp:255 New log categories: *:WARNING,net:FATAL,net.http:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,serialization:FATAL,logging:INFO,msgwriter:INFO
2021-02-01 11:30:04.342 7fed916b8140 FATAL net contrib/epee/include/epee/net/abstract_tcp_server2.inl:958 Error starting server: Failed to bind IPv4 (set to required) Which seems like configuration issue with the IP? |
Quick dockerfile to reproduce the environment: FROM debian:unstable
ENV DEBIAN_FRONTEND=noninteractive
RUN true \
&& apt-get update \
&& apt-get install --yes \
lsb-release curl \
&& curl -so /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg \
&& echo "deb https://deb.oxen.io $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/oxen.list \
&& apt-get update \
&& apt-get install --yes openrc \
&& curl -so "liboxen8.1.5_8.1.5-1_amd64.deb" "https://oxen.rocks/jagerman/loki/devuan-ceres/deb-sid-20210130T222203Z-edb395a6d/liboxen8.1.5_8.1.5-1_amd64.deb" \
&& curl -so "oxend_8.1.5-1_amd64.deb" "https://oxen.rocks/jagerman/loki/devuan-ceres/deb-sid-20210130T222203Z-edb395a6d/oxend_8.1.5-1_amd64.deb" \
&& apt-get install --yes ./liboxen8.1.5_8.1.5-1_amd64.deb ./oxend_8.1.5-1_amd64.deb \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& { service oxen-node status || true ;} \
&& { service oxen-node start || true ;} \
&& { service oxen-node status || true ;} \
&& { service oxen-node stop || true ;} \
&& { service oxen-node status || true ;} |
That error generally means that an oxend is already running, bound to the p2p port. I suspect it is running already here via systemd? |
It was running, but killing the oxend didn't help |
FWIW that looks to me as issue not relevant to the proposed OpenRC integration. |
This is failing on the install of the downloaded archives, perhaps they are signed with a key I don't have? |
MAINTAINERS: Squash using GItHub.
Fixes: oxen-io/lokinet#1519
Transferred from: oxen-io/lokinet#1520
This should also make it compatible with devuan https://www.devuan.org/, consider adding release.
The test can be seen working in Kreyren#1