]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: udpate vstart to use new ssl port 27394/head
authorErnesto Puerta <epuertat@redhat.com>
Fri, 29 Mar 2019 13:06:25 +0000 (14:06 +0100)
committerTatjana Dehler <tdehler@suse.com>
Fri, 5 Apr 2019 10:32:08 +0000 (12:32 +0200)
Fixes: https://tracker.ceph.com/issues/39030
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
(cherry picked from commit 5792c0377a0495030de1a7a8cd5e10f46e91358d)

src/vstart.sh

index 22ca3c6318d182e79b0e113ee2590d8aae2bfe1c..6d85af72162345b099afb31033362415cd075ded 100755 (executable)
@@ -771,6 +771,7 @@ EOF
 
 start_mgr() {
     local mgr=0
+    local ssl=${DASHBOARD_SSL:-1}
     # avoid monitors on nearby ports (which test/*.sh use extensively)
     MGR_PORT=$(($CEPH_PORT + 1000))
     for name in x y z a b c d e f g h i j k l m n o p
@@ -789,11 +790,18 @@ start_mgr() {
 EOF
 
             if $with_mgr_dashboard ; then
-                ceph_adm config set mgr mgr/dashboard/$name/server_port $MGR_PORT --force
+                local port_option="ssl_server_port"
+                local http_proto="https"
+                if [ "$ssl" == "0" ]; then
+                    port_option="server_port"
+                    http_proto="http"
+                    ceph_adm config set mgr mgr/dashboard/ssl false --force
+                fi
+                ceph_adm config set mgr mgr/dashboard/$name/$port_option $MGR_PORT --force
                 if [ $mgr -eq 1 ]; then
-                    DASH_URLS="https://$IP:$MGR_PORT"
+                    DASH_URLS="$http_proto://$IP:$MGR_PORT"
                 else
-                    DASH_URLS+=", https://$IP:$MGR_PORT"
+                    DASH_URLS+=", $http_proto://$IP:$MGR_PORT"
                 fi
             fi
            MGR_PORT=$(($MGR_PORT + 1000))
@@ -817,8 +825,10 @@ EOF
         # setting login credentials for dashboard
         if $with_mgr_dashboard; then
             ceph_adm tell mgr dashboard ac-user-create admin admin administrator
-            if ! ceph_adm tell mgr dashboard create-self-signed-cert;  then
-                echo dashboard module not working correctly!
+            if [ "$ssl" != "0" ]; then
+                if ! ceph_adm tell mgr dashboard create-self-signed-cert;  then
+                    echo dashboard module not working correctly!
+                fi
             fi
         fi