Starting gateway with radosgw init script fails to create socket
Ceph Version: v0.80.4
Customer reported, unable to reproduce.
/var/run/ceph directory owned by apache:apache
chmod 644 /var/run/ceph (even temporarily elevated permissions do not allow creation)
The gateway will start, but no socket has been created. Ceph.conf socket settings match that in the radosgw.conf http conf file. Starting the gateway manually as root will allow socket creation.
#2 Updated by Ken Dreyer over 8 years ago
Alexandre Marangone also reported this downstream @ Red Hat, at https://bugzilla.redhat.com/1188397
Steps to Reproduce:
1. Follow http://ceph.com/docs/master/radosgw/config/#add-a-gateway-configuration-to-ceph on any RPM supported distro
Update doc so that "rgw socket path" and "FastCgiExternalServer" use a new directory for the socket (e.g. /var/run/radosgw/).
Link to doc pages referencing /var/run/ceph:
#3 Updated by Ken Dreyer over 8 years ago
- Status changed from New to In Progress
- Assignee set to Ken Dreyer
This branch can be proposed as a Pull Request after its prerequisite gets reviewed/merged: https://github.com/ceph/ceph/pull/3914
#5 Updated by Alexandre Marangone over 8 years ago
There's an inconsistency that has been here for a while: On RPM, we run the RGW as apache. On Deb, we run it as root.
Oldest reference I could find is http://tracker.ceph.com/issues/4571. For Ubuntu we use an upstart script which doesn't change the user either.
Thought I'd mention it since we chown to www-data in the Deb post install.
#6 Updated by Ken Dreyer over 8 years ago
Excellent data point, thanks for mentioning that. Do you know if that's still the case? https://github.com/ceph/ceph/blob/master/src/init-radosgw#L38 seems to indicate that the Debian init script defaults to using
www-data - Is that bogus?
#7 Updated by Alexandre Marangone over 8 years ago
I think so https://github.com/ceph/ceph/blob/master/src/init-radosgw#L83 still uses -u instead of -c.
That's still the case for Ubuntu (upstart) too.
#8 Updated by Ken Dreyer over 8 years ago
Thanks. Looks like Debian's init script did use
--chuid for two or three days, and then Sage reverted it in https://github.com/ceph/ceph/commit/2450db1b92f28424d0c048927036168881923096 . I wish I knew what the issues were there.