lp:~nick-moffitt/charms/precise/keystone/migrate-sqlite-to-mysql
- Get this branch:
- bzr branch lp:~nick-moffitt/charms/precise/keystone/migrate-sqlite-to-mysql
Branch merges
- Adam Gandelman: Pending requested
- OpenStack Charmers: Pending requested
-
Diff: 150 lines (+98/-0) (has conflicts)1 file modifiedhooks/keystone_hooks.py (+98/-0)
- Adam Gandelman (community): Needs Fixing
- charmers: Pending requested
-
Diff: 141 lines (+81/-14)1 file modifiedhooks/keystone-hooks (+81/-14)
Branch information
- Owner:
- Nick Moffitt
- Status:
- Development
Recent revisions
- 42. By Nick Moffitt
-
Moved sqlfairy installation insurance down to the db_changed hook, so that it happens only when it's needed.
This is in response to https://code.launchpad .net/~nick- moffitt/ charms/ precise/ keystone/ migrate- sqlite- to-mysql/ +merge/ 149334/ comments/ 327313 - 40. By Nick Moffitt
-
Automatically migrate the database schema and contents when moving from sqlite to mysql.
This change uses sqlfairy (http://
packages. ubuntu. com/precise/ libsql- translator- perl) to migrate the schema and then all rows from the default sqlite database over to the new database when the mysql relation fires for the first time. The rationale is that users may not realize that they're using sqlite until it's too late, and adding the relation caused a loss of all authentication data. The SQL generated from sqlfairy needed some manipulation in order to work.
In particular:* "UNIQUE `` (`name`)" commands needed a UID of some sort between the ``
for mysql to accept them
* As we're running these mysql 'LOAD DATA' commands from a remote
client, 'LOAD DATA INFILE' needed to become 'LOAD DATA LOCAL INFILE',
and the mysql client needed to be explicitly told to allow this
syntax.The install hook edits configuration entries, risking loss of idempotence. Instead of just re-running it in the upgrade hook, I've replicated the apt-get commands.
- 37. By Adam Gandelman
-
Merge support for Quantum service from p:~james-
page/charms/ precise/ keystone/ quantum- support. - 33. By Adam Gandelman
-
Merged config-changed support from lp:~gandelman-a/charms/precise/keystone/config-changed
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:~charmers/charms/precise/keystone/trunk