scylla-jmx icon indicating copy to clipboard operation
scylla-jmx copied to clipboard

install.sh: fix hardcode sysconfdir in EnvironmentFile path

Open amoskong opened this issue 4 years ago • 6 comments

Currently we use fixed sysconfdir name 'sysconfig', it works as expected. But let's change it to use the assigned sysconfdir, it still works when a different sysconfdir is assigned.

Signed-off-by: Amos Kong [email protected]

amoskong avatar Dec 28 '20 11:12 amoskong

Oh sorry it seems like why we requires this change is because I haven't synced changes from scylla repo to scylla-jmx repo. Anyway, I think we align the way to implement this between scylla repo and scylla-jmx repo. On scylla repo, we do:

        cat << EOS > "$rsystemd"/scylla-server.service.d/nonroot.conf
[Service]
EnvironmentFile=
EnvironmentFile=$rsysconfdir/scylla-server

https://github.com/scylladb/scylla/blob/master/install.sh#L372 So scylla-jmx repo should be same. If current scylla repo's implementation has problem, then replace with new one on both repos, not just one.

syuu1228 avatar Dec 29 '20 17:12 syuu1228

Oh sorry it seems like why we requires this change is because I haven't synced changes from scylla repo to scylla-jmx repo. Anyway, I think we align the way to implement this between scylla repo and scylla-jmx repo. On scylla repo, we do:

        cat << EOS > "$rsystemd"/scylla-server.service.d/nonroot.conf
[Service]
EnvironmentFile=
EnvironmentFile=$rsysconfdir/scylla-server

https://github.com/scylladb/scylla/blob/master/install.sh#L372 So scylla-jmx repo should be same. If current scylla repo's implementation has problem, then replace with new one on both repos, not just one.

Currently implement in scylla_repo is fine, a redundant backslash is harmless.

# Current scylla_repo::
EnvironmentFile=/home/scylla-test/scylladb/etc/sysconfig//scylla-server

# Fixed scylla-jmx:
EnvironmentFile=/home/scylla-test/scylladb/etc/sysconfig/scylla-jmx

So it's fine to only merge this PR.

amoskong avatar Dec 31 '20 06:12 amoskong

@amoskong Even if scylla.git works fine, let's make sure the two solutions are the same. So please open a pull request in scylla.git to switch to also use realpath and let's merge both.

penberg avatar Jan 04 '21 08:01 penberg

@amoskong Even if scylla.git works fine, let's make sure the two solutions are the same. So please open a pull request in scylla.git to switch to also use realpath and let's merge both.

Thanks for the suggestion, I had sent a PR: https://github.com/scylladb/scylla/pull/7860

amoskong avatar Jan 04 '21 09:01 amoskong

@syuu1228 are you happy with this?

avikivity avatar Jan 04 '21 10:01 avikivity

@syuu1228 ping

penberg avatar Mar 04 '21 09:03 penberg