glance-control <SERVICE> start as non-privileged user appears to fail but still starts server

Bug #1046593 reported by Brian Waldon on 2012-09-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Medium
Eoghan Glynn

Bug Description

Running as non-root, if I run 'glance-control api start' I get two error messages but the service still starts. If glance-control can't fully succeed then the service shouldn't be started. If I then try to stop the service, glance-control doesn't know it's running (but it most definitely is).

vagrant@precise:/opt/stack/glance$ glance-control api start
Unable to increase file descriptor limit. Running as non-root?
Starting glance-api
Unable to create /var/run/glance. Running as non-root?

vagrant@precise:/opt/stack/glance$ ps aux | grep glance-api
vagrant 18821 15.3 3.6 128756 37540 ? Ss 22:25 0:00 /usr/bin/python /usr/local/bin/glance-api

vagrant@precise:/opt/stack/glance$ glance-control api stop
No glance-api running

vagrant@precise:/opt/stack/glance$ ps aux | grep glance-api
vagrant 18821 0.3 3.3 128756 34512 ? Ss 22:25 0:00 /usr/bin/python /usr/local/bin/glance-api

Brian Waldon (bcwaldon) on 2012-09-05
description: updated
Rongze Zhu (zrzhit) on 2012-09-06
Changed in glance:
assignee: nobody → Rongze Zhu (zrzhit)
Brian Waldon (bcwaldon) wrote :

Hi Rongze - we need to get this fixed by Monday of next week. I'm more than happy with whatever you want to provide, but if you don't feel like you can have something proposed by Monday then we need to reassign this.

Fix proposed to branch: master
Review: https://review.openstack.org/12677

Changed in glance:
status: Triaged → In Progress
Rongze Zhu (zrzhit) wrote :

Hi Brian, I am sorry I can't fix the bug, you can reassign it to another.

Changed in glance:
assignee: Rongze Zhu (zrzhit) → nobody
Brian Waldon (bcwaldon) wrote :

No worries! Thanks for giving it a try.

Changed in glance:
status: In Progress → Triaged
Eoghan Glynn (eglynn) on 2012-09-10
Changed in glance:
assignee: nobody → Eoghan Glynn (eglynn)

Fix proposed to branch: master
Review: https://review.openstack.org/12736

Changed in glance:
status: Triaged → In Progress
Eoghan Glynn (eglynn) wrote :

This is a case of mis-configuration combined with the lack of a good error message.

The file in which to cache the glance service PID can be configured via the pid-file config option, otherwise it defaults to /var/run/glance/glance-api.pid.

This file path must be writeable by the current user, otherwise glance-control bombs out, *after* spawning the required service but *without* caching the process ID anywhere.

The issue could be addressed by falling back to a temporary pid file in that case, so that at least the user could supply that file to the corresponding glance-contol stop command.

Changed in glance:
status: In Progress → Confirmed
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/12736
Committed: http://github.com/openstack/glance/commit/69389a644205fa193be6b80fcb149dd940b2e3e0
Submitter: Jenkins
Branch: master

commit 69389a644205fa193be6b80fcb149dd940b2e3e0
Author: Eoghan Glynn <email address hidden>
Date: Mon Sep 10 19:03:30 2012 +0000

    Fallback to a temp pid file in glance-control

    Fixes bug 1046593.

    Previously if the pid file was not writeable by the current user
    then glance-control bombs out, *after* spawning the required service
    but *without* caching the process ID anywhere.

    Now we fall back to a temporary file, so that at least user can supply
    that file to the corresponding glance-contol stop command.

    Change-Id: I6c1daf36221f731fdb5a8bb59d3f91a595337af8

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-09-11
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-09-27
Changed in glance:
milestone: folsom-rc1 → 2012.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers