]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't use rgw_socket_path if frontend is configured 4275/head
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 19 Mar 2015 03:49:13 +0000 (20:49 -0700)
committerjeanchlopez <jelopez@redhat.com>
Mon, 6 Apr 2015 00:21:20 +0000 (17:21 -0700)
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>
src/rgw/rgw_main.cc

index fc40b6493ce3ed9ebce54b3a163adb2d57008ab8..24094d4e29a6706bc333ccb6b00daa9c540c723b 100644 (file)
@@ -261,10 +261,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;