Project

General

Profile

Bug #9001

Starting gateway with radosgw init script fails to create socket

Added by Brian Andrus over 9 years ago. Updated over 8 years ago.

Status:
Won't Fix
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
Support
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Ceph Version: v0.80.4
Distro: CentOS

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.

History

#1 Updated by Sage Weil over 9 years ago

  • Priority changed from Normal to High

#2 Updated by Ken Dreyer about 9 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

Suggestion:
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:
- http://ceph.com/docs/master/radosgw/config/#create-a-gateway-configuration
- http://ceph.com/docs/master/radosgw/config/#add-a-gateway-configuration-to-ceph
- http://ceph.com/docs/master/radosgw/federated-config/

#3 Updated by Ken Dreyer about 9 years ago

  • Status changed from New to In Progress
  • Assignee set to Ken Dreyer

WIP branch at https://github.com/ceph/ceph/tree/wip-doc-rgw-socket-perms

This branch can be proposed as a Pull Request after its prerequisite gets reviewed/merged: https://github.com/ceph/ceph/pull/3914

#4 Updated by Ken Dreyer about 9 years ago

It would also be nice to get clarity on https://github.com/ceph/ceph/pull/3916 before we try to add a second socket dir to the packaging.

#5 Updated by Alexandre Marangone about 9 years ago

Hi Ken,

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 about 9 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 about 9 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 about 9 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.

#9 Updated by Ken Dreyer almost 9 years ago

We should take a new approach here and simply run RGW as root on all platforms (both RHEL and Debian/Ubuntu). See #11453 for that.

#10 Updated by Sage Weil over 8 years ago

  • Status changed from In Progress to Won't Fix
  • Regression set to No

Also available in: Atom PDF