[PKG-Openstack-devel] Bug#828912: keystone: /etc/cron.hourly/keystone doesn't work unless "provider" is uncommented

Turbo Fredriksson turbo at bayour.com
Tue Jun 28 21:28:39 UTC 2016


Package: keystone
Version: 2:9.0.2-1
Severity: minor

The code say

    grep -E '^[ \t]*provider[ \t]*=' /etc/keystone/keystone.conf

but if 'provider' is commented out (as in, "use default value")

    #provider = uuid

then this will match nothing, not run the token_flush and the
script will exit with '1', which is an error, and the mailbox
will be 'spammed' with

     run-parts: /etc/cron.hourly/keystone exited with return code 1

Removing the dash in the config file make it work, so the correct
fix for this would (probably) be something like:

----- s n i p -----
--- /etc/cron.hourly/keystone~	2016-06-21 10:01:26.000000000 +0100
+++ /etc/cron.hourly/keystone	2016-06-28 22:24:23.180502167 +0100
@@ -4,9 +4,9 @@
 
 if [ -x /usr/bin/keystone-manage ] ; then
 	# We should only run token_flush if we're using uuid tokens.
-	PROVIDER=$(grep -E '^[ \t]*provider[ \t]*=' /etc/keystone/keystone.conf)
+	PROVIDER=$(grep -E '^[ \t#]*provider[ \t]*=' /etc/keystone/keystone.conf)
 	if [ -n "${PROVIDER}" ] ; then
-		PROVIDER=$(grep -E '^[ \t]*provider[ \t]*=' /etc/keystone/keystone.conf | sed -e 's/[ \t]*provider[ \t]*=//' | awk '{print $1}')
+		PROVIDER=$(grep -E '^[ \t#]*provider[ \t]*=' /etc/keystone/keystone.conf | sed -e 's/[ \t#]*provider[ \t]*=//' | awk '{print $1}')
 	else
 		PROVIDER=uuid
 	fi
----- s n i p -----

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/16 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages keystone depends on:
ii  adduser                                 3.114
ii  dbconfig-common                         2.0.4
ii  debconf [debconf-2.0]                   1.5.59
ii  init-system-helpers                     1.35
ii  lsb-base                                9.20160601
ii  python-keystone                         2:9.0.2-1
ii  python-q-text-as-data [q-text-as-data]  1.4.0-1
pn  python:any                              <none>
ii  sqlite3                                 3.13.0-1
ii  ssl-cert                                1.0.38

keystone recommends no packages.

Versions of packages keystone suggests:
pn  apparmor  <none>



More information about the Openstack-devel mailing list