Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

g-api did not start while running stack.sh

Trying to setup devstack, and it is throwing this error:

+functions-common:_run_under_systemd:1481  sudo systemctl enable devstack@g-api.service
+functions-common:_run_under_systemd:1482  sudo systemctl start devstack@g-api.service
+functions-common:run_process:1512         time_stop run_process
+functions-common:time_stop:2254           local name
+functions-common:time_stop:2255           local end_time
+functions-common:time_stop:2256           local elapsed_time
+functions-common:time_stop:2257           local total
+functions-common:time_stop:2258           local start_time
+functions-common:time_stop:2260           name=run_process
+functions-common:time_stop:2261           start_time=1526969688542
+functions-common:time_stop:2263           [[ -z 1526969688542 ]]
++functions-common:time_stop:2266           date +%s%3N
+functions-common:time_stop:2266           end_time=1526969689805
+functions-common:time_stop:2267           elapsed_time=1263
+functions-common:time_stop:2268           total=3482
+functions-common:time_stop:2270           _TIME_START[$name]=
+functions-common:time_stop:2271           _TIME_TOTAL[$name]=4745
+lib/glance:start_glance:350               echo 'Waiting for g-api (135.207.223.61) to start...'
Waiting for g-api (135.207.223.61) to start...
+lib/glance:start_glance:351               wait_for_service 60 http://135.207.223.61/image
+functions:wait_for_service:428            local timeout=60
+functions:wait_for_service:429            local url=http://135.207.223.61/image
+functions:wait_for_service:430            local rval=0
+functions:wait_for_service:431            time_start wait_for_service
+functions-common:time_start:2240          local name=wait_for_service
+functions-common:time_start:2241          local start_time=
+functions-common:time_start:2242          [[ -n '' ]]
++functions-common:time_start:2245          date +%s%3N
+functions-common:time_start:2245          _TIME_START[$name]=1526969689916
+functions:wait_for_service:432            timeout 60 bash -x
++::                                        curl -g -k --noproxy '*' -s -o /dev/null -w '%{http_code}' http://135.207.223.61/image
+::                                        [[ 503 == 503 ]]
+::                                        sleep 1
++::                                        curl -g -k --noproxy '*' -s -o /dev/null -w '%{http_code}' http://135.207.223.61/image
+::                                        [[ 503 == 503 ]]
+::                                        sleep 1
.
.
. (a bunch of same lines and then some)
.

    +functions-common:time_stop:2267           elapsed_time=60104
    +functions-common:time_stop:2268           total=134
    +functions-common:time_stop:2270           _TIME_START[$name]=
    +functions-common:time_stop:2271           _TIME_TOTAL[$name]=60238
    +functions:wait_for_service:438            return 124
    +lib/glance:start_glance:352               die 352 'g-api did not start'
    +functions-common:die:187                  local exitcode=0
    [Call Trace]
    ./stack.sh:1240:start_glance
    /opt/stack/devstack/lib/glance:352:die
    [ERROR] /opt/stack/devstack/lib/glance:352 g-api did not start
    Error on exit
    nova-compute(1716): Operation not permitted
    neutron-openvswitch-agent(1724): Operation not permitted
    neutron-openvswitch-agent: no process found
    cinder-volume(1693): Operation not permitted

which tells me that glance-api service is not running. So I take the command in the second line (log above) and execute it manually: sudo systemctl start devstack@g-api.service Then it runs and I can check status:

● devstack@g-api.service - Devstack devstack@g-api.service
   Loaded: loaded (/etc/systemd/system/devstack@g-api.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-05-22 01:20:56 EDT; 1h 0min ago
 Main PID: 11240 (uwsgi)
   Status: "uWSGI is ready"
   CGroup: /system.slice/system-devstack.slice/devstack@g-api.service
           ├─11240 glance-apiuWSGI maste
           ├─11242 glance-apiuWSGI worker
           ├─11243 glance-apiuWSGI worker
           ├─11244 glance-apiuWSGI worker
           └─11245 glance-apiuWSGI worker

May 22 01:20:59 agave021 devstack@g-api.service[11240]: DEBUG glance.common.config [-] oslo_policy.remote_ssl_client_key_file = None {{(pid=11243) log_opt_values /usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py:2908}}
May 22 01:20:59 agave021 devstack@g-api.service[11240]: DEBUG glance.common.config [-] oslo_policy.remote_ssl_verify_server_crt = False {{(pid=11243) log_opt_values /usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py:2908}}
May 22 01:20:59 agave021 devstack@g-api.service[11240]: DEBUG glance.common.config [-] ******************************************************************************** {{(pid=11243) log_opt_values /usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py:2910}}
May 22 01:20:59 agave021 devstack@g-api.service[11240]: WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0xd0bc60 pid: 11243 (default app)
May 22 01:21:08 agave021 devstack@g-api.service[11240]: DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: GET / Accept: */* {{(pid=11245) process_request /opt/stack/glance/glance/api/middleware/version_negotiation.py:45}}
May 22 01:21:08 agave021 devstack@g-api.service[11240]: DEBUG glance.api.middleware.version_negotiation [-] Using url versioning {{(pid=11245) process_request /opt/stack/glance/glance/api/middleware/version_negotiation.py:57}}
May 22 01:21:08 agave021 devstack@g-api.service[11240]: DEBUG glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices. {{(pid=11245) process_request /opt/stack/glance/glance/api/middleware/version_negotiation.py:64}}
May 22 01:21:08 agave021 devstack@g-api.service[11240]: [pid: 11245|app: 0|req: 1/1] 127.0.0.1 () {32 vars in 394 bytes} [Tue May 22 01:21:08 2018] GET / => generated 782 bytes in 3 msecs (HTTP/1.1 300) 3 headers in 105 bytes (1 switches on core 0)
May 22 02:14:49 agave021 systemd[1]: Started Devstack devstack@g-api.service.
May 22 02:21:20 agave021 systemd[1]: Started Devstack devstack@g-api.service.

But when I execute the curl command, it gives me 503 - which tells me something is still wrong, so I stop the service and then start it again, and then execute the curl command: curl -g -k --noproxy '*' -s -o /dev/null -w '%{http_code}' http://135.207.223.61/image

And viola it gives me status code 300 which I guess is better than 503. The problem is that I do not know how to fix this so that stack.sh can finish execution. Does anyone know what should I do?