]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't use rgw_socket_path if frontend is configured 4574/head
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 19 Mar 2015 03:49:13 +0000 (20:49 -0700)
committerLoic Dachary <ldachary@redhat.com>
Wed, 6 May 2015 11:01:11 +0000 (13:01 +0200)
Fixes: #11160
Backport: hammer, firefly

Previously if we wanted to use the tcp fcgi socket, we needed to clear
rgw_socket_path.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 36d6eea3caa79fcb4e08bdd340ccda2474b9e5ea)

src/rgw/rgw_main.cc

index de8a1bc09ab0a06362db54b62ae1c92a0e7b8041..2a247e4191f241c98ee5446b99da220c4479c3fe 100644 (file)
@@ -279,10 +279,17 @@ void RGWFCGXProcess::run()
   string socket_port;
   string socket_host;
 
-  conf->get_val("socket_path", g_conf->rgw_socket_path, &socket_path);
+  conf->get_val("socket_path", "", &socket_path);
   conf->get_val("socket_port", g_conf->rgw_port, &socket_port);
   conf->get_val("socket_host", g_conf->rgw_host, &socket_host);
 
+  if (socket_path.empty() && socket_port.empty() && socket_host.empty()) {
+    socket_path = g_conf->rgw_socket_path;
+    if (socket_path.empty()) {
+      dout(0) << "ERROR: no socket server point defined, cannot start fcgi frontend" << dendl;
+      return;
+    }
+  }
 
   if (!socket_path.empty()) {
     string path_str = socket_path;