xenial keystone charm deploy kilo template.

Bug #1654333 reported by José Pekkarinen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Keystone Charm
Fix Released
High
Unassigned
keystone (Juju Charms Collection)
Invalid
High
Unassigned

Bug Description

Hi,

Doing some testing I found that deploying an Openstack bundle without specifying any series, but in the charms taken, ends up with a xenial-mitaka deployment of openstack with a keystone stuck in the folowing status:

keystone/0* error idle 0 192.168.0.16 5000/tcp hook failed: "shared-db-relation-changed" for keystone-percona:shared-db

The error shown is the following:

2017-01-04 20:04:44 INFO juju-log shared-db:39: Migrating the keystone database.
2017-01-04 20:04:45 INFO shared-db-relation-changed Option "log_config" from group "DEFAULT" is deprecated. Use option "log-config-append" from group "DEFAULT".
2017-01-04 20:04:45 INFO shared-db-relation-changed Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future.
2017-01-04 20:04:45 INFO shared-db-relation-changed Traceback (most recent call last):
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/shared-db-relation-changed", line 775, in <module>
2017-01-04 20:04:45 INFO shared-db-relation-changed main()
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/shared-db-relation-changed", line 768, in main
2017-01-04 20:04:45 INFO shared-db-relation-changed hooks.execute(sys.argv)
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/charmhelpers/core/hookenv.py", line 715, in execute
2017-01-04 20:04:45 INFO shared-db-relation-changed self._hooks[hook_name]()
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1817, in wrapped_f
2017-01-04 20:04:45 INFO shared-db-relation-changed restart_functions)
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/charmhelpers/core/host.py", line 524, in restart_on_change_helper
2017-01-04 20:04:45 INFO shared-db-relation-changed r = lambda_f()
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1816, in <lambda>
2017-01-04 20:04:45 INFO shared-db-relation-changed (lambda: f(*args, **kwargs)), restart_map, stopstart,
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/keystone_utils.py", line 1509, in inner_synchronize_ca_if_changed2
2017-01-04 20:04:45 INFO shared-db-relation-changed ret = f(*args, **kwargs)
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/shared-db-relation-changed", line 384, in db_changed
2017-01-04 20:04:45 INFO shared-db-relation-changed leader_init_db_if_ready(use_current_context=True)
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/shared-db-relation-changed", line 370, in leader_init_db_if_ready
2017-01-04 20:04:45 INFO shared-db-relation-changed migrate_database()
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/charmhelpers/core/decorators.py", line 40, in _retry_on_exception_inner_2
2017-01-04 20:04:45 INFO shared-db-relation-changed return f(*args, **kwargs)
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/keystone_utils.py", line 567, in migrate_database
2017-01-04 20:04:45 INFO shared-db-relation-changed subprocess.check_output(cmd)
2017-01-04 20:04:45 INFO shared-db-relation-changed File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
2017-01-04 20:04:45 INFO shared-db-relation-changed raise CalledProcessError(retcode, cmd, output=output)
2017-01-04 20:04:45 INFO shared-db-relation-changed subprocess.CalledProcessError: Command '['sudo', '-u', 'keystone', 'keystone-manage', 'db_sync']' returned non-zero exit status 1
2017-01-04 20:04:45 ERROR juju.worker.uniter.operation runhook.go:107 hook "shared-db-relation-changed" failed: exit status 1

and launching the command keystone-manage db_sync shows the following:

Option "log_config" from group "DEFAULT" is deprecated. Use option "log-config-append" from group "DEFAULT".
Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future.

Checking the situation, it turns out that the template taken for keystone.conf was the kilo one:

# kilo
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
###############################################################################
[DEFAULT]
admin_token = thaeFievie1aeHeigeey3thae8palaech7nin
use_syslog = False
log_config = /etc/keystone/logging.conf
debug = False
verbose = False
public_endpoint = http://192.168.0.14:5000
admin_endpoint = http://192.168.0.14:35357

[eventlet_server]
admin_bind_host = 0.0.0.0
public_bind_host = 0.0.0.0
public_workers = 2
admin_workers = 2
admin_port = 35347
public_port = 4990

....

The bundle used is attached.

The version of the charm is the following:

keystone 9.2.0 waiting 1 keystone jujucharms 260 ubuntu

Thanks!

José.

Revision history for this message
José Pekkarinen (koalinux) wrote :
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Here's a smaller bundle:

series: xenial
services:
  keystone:
    charm: cs:xenial/keystone
    num_units: 1
    options:
      admin-password: xeijae0roozei0ruseiHiejah5exa2Ah
      admin-token: thaeFievie1aeHeigeey3thae8palaech7nin

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This seems to be related to deploying from the charm store. For example using the following bundle with juju-deployer gets the mitaka template if deploying from a git branch, and gets the kilo template if deploying from the charm store.

base-services:
  services:
    keystone:
      #branch: https://github.com/openstack/charm-keystone;stable/16.07 # gets mitaka template
      charm: cs:xenial/keystone # gets kilo template
      constraints: mem=1G
      options:
        admin-password: openstack
        admin-token: ubuntutesting
xenial-mitaka:
  inherits: base-services
  series: xenial

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Ok so this is the problem.

$ cd /var/lib/juju/agents/unit-keystone-0/charm/templates
$ ls
essex folsom git grizzly havana icehouse keystone-token-flush kilo liberty parts wsgi-keystone.conf

There's no mitaka directory. So the charm picks the most recent release that has a keystone.conf template, which is kilo.

I'm not sure why the stable charm in the charm store is so old.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Seems the stable charm in the store is up-to-date as of the 16.07 release. The mitaka templates were missing until a recent commit which added them in Nov.

commit 10e3d84effcadd9c527d5d18f8bdd0d25003b85a
Author: Frode Nordahl <email address hidden>
Date: Tue Nov 8 08:49:36 2016 +0100

Refresh keystone.conf and policy.json for Mitaka and Newton

Changed in keystone (Juju Charms Collection):
status: New → Confirmed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

I can't update the importance of this bug but I think this should be a high importance candidate for backporting to the stable charm.

tags: added: backport-potential
Changed in keystone (Juju Charms Collection):
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Frode Nordahl (fnordahl) wrote :

At the time of release of the 16.07 and 16.10 charms there was no need for update of the templates.

There will be new templates available for 17.02 release. The changes will not be backported.

tags: removed: backport-potential
Changed in keystone (Juju Charms Collection):
status: Triaged → Fix Committed
James Page (james-page)
Changed in charm-keystone:
importance: Undecided → High
status: New → Fix Committed
Changed in keystone (Juju Charms Collection):
status: Fix Committed → Invalid
James Page (james-page)
Changed in charm-keystone:
milestone: none → 17.02
James Page (james-page)
Changed in charm-keystone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.