With root as default user, unable to have multiple RGW instances running
This is with reference to the commit https://github.com/ceph/ceph/commit/f30fa4a364602fb9412babf7319140eca4c64995 and tracker http://tracker.ceph.com/issues/11453
On Hammer binaries, we are finding this fix has regressed to have multiple RGW instances to be run on a single machine. Meaning, with no user specified under ‘client.radosgw.gateway’ sections, and by having the default user to be assumed as ‘root’, we are unable to get multiple RGW daemons run on a client machine.
The start-stop-daemon complains than an instance of ‘radosgw’ is already running, by starting the first daemon in the configuration and bails out from starting further instances:
+ start-stop-daemon --start
u root -x /usr/bin/radosgw - -n client.radosgw.gateway-3
/usr/bin/radosgw already running.
However, by having a user specified in the relevant ‘client.radosgw.gateway’ sections, one can get around this issue. Wanted to confirm if this is indeed a regression or was it expected to behave so from the fix.
#4 Updated by Sage Weil about 8 years ago
diff --git a/src/init-radosgw b/src/init-radosgw index 6fb8ba2..b7569a0 100644 --- a/src/init-radosgw +++ b/src/init-radosgw @@ -100,7 +100,7 @@ case "$1" in echo "Starting $name..." if [ $DEBIAN -eq 1 ]; then - start-stop-daemon --start -u $user -x $RADOSGW -- -n $name + start-stop-daemon --start -u $user -x $RADOSGW -p /var/run/ceph/client-$name.pid -- -n $name elif [ -n "$SYSTEMD_RUN" ]; then $SYSTEMD_RUN -r su "$user" -c "ulimit -n 32768; $RADOSGW -n $name" else
this would probably fix it. Pavan, do you mind testing?