-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix offline installation #131
Conversation
After offline installation, scylla-jmx fails to be started for a chdir error. WorkingDirectory is set to /var/lib/scylla in scylla-jmx.service, it doesn't exist in nonroot install. This patch solved the problem by setting WorkingDirectory to empty in nonroot.conf. $ systemctl --user status scylla-jmx ● scylla-jmx.service - Scylla JMX Loaded: loaded (/home/scylla-test/.config/systemd/user/../../../scylladb/etc/systemd/scylla-jmx.service; linked; vendor preset: enabled) Drop-In: /home/scylla-test/.config/systemd/user/scylla-jmx.service.d └─nonroot.conf Active: failed (Result: exit-code) since Wed 2020-08-26 15:19:56 UTC; 2s ago Process: 66955 ExecStart=/home/scylla-test/install_root/jmx/scylla-jmx $SCYLLA_JMX_PORT $SCYLLA_API_PORT $SCYLLA_API_ADDR $SCYLLA_JMX_ADDR $SCYLLA_JMX_FILE $SCYLLA_JMX_LOCAL $SCYLLA_JMX_REMOTE $SCYLLA_JMX_DEBUG (code=exited, status=200/CHDIR) Main PID: 66955 (code=exited, status=200/CHDIR) systemd[5654]: Started Scylla JMX. systemd[66955]: scylla-jmx.service: Changing to the requested working directory failed: No such file or directory systemd[66955]: scylla-jmx.service: Failed at step CHDIR spawning /home/scylla-test/scylladb/jmx/scylla-jmx: No such file or directory systemd[5654]: scylla-jmx.service: Main process exited, code=exited, status=200/CHDIR systemd[5654]: scylla-jmx.service: Failed with result 'exit-code'. Signed-off-by: Amos Kong <[email protected]>
Append a patch to fix #132
|
@syuu1228 Please review this. |
On Debian10, only Openjdk-11 is available, the install.sh fails in java checking. Openjdk-8 and Openjdk-11 all work well, we should check both of them. This patch also fixed the error message. Signed-off-by: Amos Kong <[email protected]>
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.
I think we shouldn't apply $sysconfdir = /etc/default on nonroot mode.
Why we want to use it on Debian variants is it's distribution's default sysconfig dir.
On nonroot mode we uses $prefix/$sysconfdir, it's not /etc/default directory anyway, so no reason to apply the directory name here.
I suppose just always use $prefix/etc/sysconfig is fine for nonroot mode.
The env file path in nonroot.conf is /home/scylla-test/scylladb/etc/sysconfig/scylla-jmx.
Actually it's installed to /home/scylla-test/scylladb/etc/default/scylla-jmx,
because the special sysconfdir is assigned in install commandline.
Other changes looks okay to me. |
If sysconfdir isn't assigned, $prefix/etc/sysconfig == $retc/../$sysconfig
OK, I got it. You expect the syscondir is only assigned for root install of debian-like distros. I'm fine to use default sysconfdir for nonroot install of debian-like distros. So I will remove the last patch. Then we can merge this PR. Thanks for your review. |
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.
LGTM
Currently after offline installation, the scylla-jmx fails to be started.
This patch fixed the problem.
Fixes: scylladb/scylladb#7098 by [PATCH] install.sh: check both openjdk-8 and openjdk-11
Fixes: #129 by [PATCH] nonroot.conf: set WorkingDirectory to empty