Error installing keystone selecting dbconfig-common and sqlite3 as the backend

Bug #944684 reported by Sergio Rubio on 2012-03-02
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
keystone (Ubuntu)
Medium
Unassigned
Precise
Medium
Unassigned

Bug Description

Dialog selections:

select "configure database for keystone with dbconfig-common"
select sqlite3

dpkg output:
-----

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  keystone
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/14.9 kB of archives.
After this operation, 126 kB of additional disk space will be used.
ySelecting previously unselected package keystone.
(Reading database ... 296043 files and directories currently installed.)
Unpacking keystone (from .../keystone_2012.1~e4~20120203.1574-0ubuntu3_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up keystone (2012.1~e4~20120203.1574-0ubuntu3) ...
dbconfig-common: writing config to /etc/dbconfig-common/keystone.conf

Creating config file /etc/dbconfig-common/keystone.conf with new version
creating database keystone: success.
verifying database keystone exists: success.
SUCCESS: Role Admin created successfully.
SUCCESS: Role Member created successfully.
SUCCESS: Role KeystoneAdmin created successfully.
SUCCESS: Role KeystoneServiceAdmin created successfully.
SUCCESS: Role sysadmin created successfully.
SUCCESS: Role netadmin created successfully.
Traceback (most recent call last):
  File "/usr/bin/keystone-manage", line 35, in <module>
    keystone.manage2.main()
  File "/usr/lib/python2.7/dist-packages/keystone/manage2/__init__.py", line 107, in main
    exit(cmd.run(args))
  File "/usr/lib/python2.7/dist-packages/keystone/manage2/commands/sync_database.py", line 19, in run
    self.sync_database(version=args.version)
  File "/usr/lib/python2.7/dist-packages/keystone/manage2/commands/sync_database.py", line 15, in sync_database
    migration.db_sync(Command._get_connection_string(), version=version)
  File "/usr/lib/python2.7/dist-packages/keystone/backends/sqlalchemy/migration.py", line 168, in db_sync
    _version_control(sql_connection)
  File "/usr/lib/python2.7/dist-packages/keystone/backends/sqlalchemy/migration.py", line 157, in _version_control
    return versioning_api.version_control(sql_connection, repo_path)
  File "<string>", line 2, in version_control
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
    return f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 250, in version_control
    ControlledSchema.create(engine, repository, version)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 139, in create
    table = cls._create_table_version(engine, repository, version)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 180, in _create_table_version
    if not table.exists():
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 549, in exists
    self.name, schema=self.schema)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2274, in run_callable
    conn = self.contextual_connect()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2340, in contextual_connect
    self.pool.connect(),
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 210, in connect
    return _ConnectionFairy(self).checkout()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 371, in __init__
    rec = self._connection_record = pool._do_get()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 758, in _do_get
    return self._create_connection()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 174, in _create_connection
    return _ConnectionRecord(self)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 256, in __init__
    self.connection = self.__connect()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 316, in __connect
    connection = self.__pool._creator()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 80, in connect
    return dialect.connect(*cargs, **cparams)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 280, in connect
    return self.dbapi.connect(*cargs, **cparams)
sqlalchemy.exc.OperationalError: (OperationalError) unable to open database file None None
dpkg: error processing keystone (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 keystone
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: keystone 2012.1~e4~20120203.1574-0ubuntu3
ProcVersionSignature: Ubuntu 3.2.0-17.27-generic 3.2.6
Uname: Linux 3.2.0-17-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 1.93-0ubuntu2
Architecture: amd64
CheckboxSubmission: dd51e7fcfe82b504f848036cca204d88
CheckboxSystem: 7e42599bda39ea7ff8b528272b6ef52b
Date: Fri Mar 2 11:20:37 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64+mac (20111012)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 TERM=xterm-color
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: keystone
UpgradeStatus: Upgraded to precise on 2011-12-13 (79 days ago)

Sergio Rubio (rubiojr) wrote :
Sergio Rubio (rubiojr) wrote :

First clean keystone install.

Dave Walker (davewalker) wrote :

Thanks for this bug report. Today, keystone should have a major change, which has been held back until now. The 'upstream' of keystone has performed a rewrite, which should land today.

I'd be interested if you could try to reproduce this after it is uploaded.

Thanks.

Changed in keystone (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Sergio Rubio (rubiojr) wrote :

Thanks Dave,

Installing works now, but removing throws an error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  keystone
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 106 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 295329 files and directories currently installed.)
Removing keystone ...
dpkg: error processing keystone (--remove):
 subprocess installed pre-removal script returned error exit status 10
postinst called with unknown argument `abort-remove'
Errors were encountered while processing:
 keystone
E: Sub-process /usr/bin/dpkg returned an error code (1)

Sergio Rubio (rubiojr) wrote :
Download full text (3.2 KiB)

Also dpkg-reconfigure keystone and using sqlite3 throws the following error:

Traceback (most recent call last):
  File "/usr/bin/keystone-manage", line 28, in <module>
    cli.main(argv=sys.argv, config_files=config_files)
  File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 147, in main
    return run(cmd, (args[:1] + args[2:]))
  File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 133, in run
    return CMDS[cmd](argv=args).run()
  File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 35, in run
    return self.main()
  File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 56, in main
    driver.db_sync()
  File "/usr/lib/python2.7/dist-packages/keystone/identity/backends/sql.py", line 120, in db_sync
    migration.db_sync()
  File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration.py", line 50, in db_sync
    current_version = db_version()
  File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration.py", line 66, in db_version
    return db_version_control(0)
  File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration.py", line 72, in db_version_control
    CONF.sql.connection, repo_path, version)
  File "<string>", line 2, in version_control
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
    return f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 250, in version_control
    ControlledSchema.create(engine, repository, version)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 139, in create
    table = cls._create_table_version(engine, repository, version)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 180, in _create_table_version
    if not table.exists():
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 549, in exists
    self.name, schema=self.schema)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2274, in run_callable
    conn = self.contextual_connect()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2340, in contextual_connect
    self.pool.connect(),
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 210, in connect
    return _ConnectionFairy(self).checkout()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 371, in __init__
    rec = self._connection_record = pool._do_get()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 758, in _do_get
    return self._create_connection()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 174, in _create_connection
    return _ConnectionRecord(self)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 256, in __init__
    self.connection = self.__connect()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 316, in __connect
    connection = self.__pool._creator()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 80, in connect
    return dialect.connect(*cargs, **cparams)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 280, in connect
    return self...

Read more...

Sergio Rubio (rubiojr) wrote :

keystone:
  Installed: 2012.1~e4-0ubuntu1
  Candidate: 2012.1~e4-0ubuntu1
  Version table:
 *** 2012.1~e4-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status

Launchpad Janitor (janitor) wrote :

[Expired for keystone (Ubuntu) because there has been no activity for 60 days.]

Changed in keystone (Ubuntu):
status: Incomplete → Expired
Paul Belanger (pabelanger) wrote :
Download full text (3.6 KiB)

This package needs some serious testing, from what I see dbconfig-common is broken. Not only is dbconfig-common configuration skipped on initial installation, dpkg-reconfigure doesn't even work.

---
$ sudo dpkg-reconfigure keystone
keystone stop/waiting
dbconfig-common: writing config to /etc/dbconfig-common/keystone.conf
Replacing config file /etc/dbconfig-common/keystone.conf with new version
creating database keystone.db: success.
verifying database keystone.db exists: success.
Traceback (most recent call last):
  File "/usr/bin/keystone-manage", line 28, in <module>
    cli.main(argv=sys.argv, config_files=config_files)
  File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 148, in main
    return run(cmd, (args[:1] + args[2:]))
  File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 134, in run
    return CMDS[cmd](argv=args).run()
  File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 36, in run
    return self.main()
  File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 57, in main
    driver.db_sync()
  File "/usr/lib/python2.7/dist-packages/keystone/identity/backends/sql.py", line 135, in db_sync
    migration.db_sync()
  File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration.py", line 50, in db_sync
    current_version = db_version()
  File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration.py", line 66, in db_version
    return db_version_control(0)
  File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration.py", line 72, in db_version_control
    CONF.sql.connection, repo_path, version)
  File "<string>", line 2, in version_control
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
    return f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 250, in version_control
    ControlledSchema.create(engine, repository, version)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 139, in create
    table = cls._create_table_version(engine, repository, version)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 180, in _create_table_version
    if not table.exists():
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 549, in exists
    self.name, schema=self.schema)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2274, in run_callable
    conn = self.contextual_connect()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2340, in contextual_connect
    self.pool.connect(),
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 210, in connect
    return _ConnectionFairy(self).checkout()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 371, in __init__
    rec = self._connection_record = pool._do_get()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 758, in _do_get
    return self._create_connection()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 174, in _create_connection
    return _ConnectionRecord(self)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 256, in __init__
   ...

Read more...

Changed in keystone (Ubuntu):
status: Expired → Confirmed
James Page (james-page) wrote :

Marking fix released in trunk as we don't use dbconfig-common any longer but leave a task up for 12.04 which still does.

Changed in keystone (Ubuntu):
status: Confirmed → Fix Released
Changed in keystone (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers