| Summary: | openstack-glance-db-setup creates logfile owned by root | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jan van Eldik <Jan.van.Eldik> |
| Component: | openstack-glance | Assignee: | Pádraig Brady <p> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 17 | CC: | akscram, alexander.sakhnov, asalkeld, bfilippov, breu, jonathansteffan, markmc, matt_domsch, mlvov, pbrady, p, rbryant, rkukura |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | openstack-glance-2012.1-3.fc17 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-04-12 02:41:38 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Jan van Eldik
2012-04-10 08:41:49 UTC
Also present in openstack-glance-2012.1-1.fc16.noarch Good one. This happens on new systems where openstack-glance-db-setup is run before glance ever was. I.E. the norm for users. This should fix it...
diff --git a/openstack-glance-db-setup b/openstack-glance-db-setup
index e1f0eb9..95a2a83 100755
--- a/openstack-glance-db-setup
+++ b/openstack-glance-db-setup
@@ -247,12 +247,10 @@ fi
# Ask openstack-$APP to sync the db.
echo "Asking openstack-$APP to sync the database."
-if [ "${APP}" = "nova" ]; then
- nova-manage db sync
-else
- # glance and keystone
- $APP-manage db_sync
-fi
+[ "${APP}" = "nova" ] && db_sync='db sync' || db_sync='db_sync'
+# Run as $APP user so any newly created (log) files have correct ownership
+runuser -s /bin/sh $APP -c "$APP-manage $db_sync"
Fix coming up...
openstack-glance-2012.1-2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/openstack-glance-2012.1-2.fc17 Note the build above is for F17, but you might be able to install manually on your F16 system. I checked keystone and its "db sync" process does not create log files. I checked nova, and its does, but only for the nova-manage command which is generally run as root anyway. In any case all services will soon update to a shared db-setup script which will manage permissions consistently. Works fine on F16, Karma given. Thanks! Package openstack-glance-2012.1-2.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing openstack-glance-2012.1-2.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-5594/openstack-glance-2012.1-2.fc17 then log in and leave karma (feedback). openstack-glance-2012.1-3.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/openstack-glance-2012.1-3.fc17 openstack-glance-2012.1-3.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/openstack-glance-2012.1-3.fc17 openstack-glance-2012.1-3.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. |