RFE: keystone-manage db_sync --check
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Wishlist
|
Richard |
Bug Description
In the automation of deployments and upgrades it would be useful to be able to check whether there are any database actions outstanding so that the action can be determined and executed.
Effectively I'm thinking something along the lines of this experience:
Operator (or automation tool) executes: keystone-manage db_sync --check
The tool checks the db state and returns whether there are any migrations to execute (ie --expand), whether there is a --migrate outstanding, whether there is a --contract outstanding, or any combination of the above. If there is nothing left to do, that should be reported too.
Ideally the output should take two forms:
1 - stdout messages... obviously this is useful when executing this by hand
2 - return codes... this is very useful when executing via automation tooling
The return codes need to be actionable - ie I must know which actions are required based on the return code with no ambiguity.
tags: | added: upgrades |
Changed in keystone: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
tags: | added: ops |
Changed in keystone: | |
assignee: | nobody → Richard (csravelar) |
Changed in keystone: | |
status: | Triaged → In Progress |
As an alternative option to return codes, if the stdout messages were consistent enough to be machine parseable then it would give us the same advantage.
An example:
# keystone-manage db_sync --check
keystone-manage version x.y.z db_sync --check
Check results:
+------ ----+-- ------- ---+ ----+-- ------- ---+ ----+-- ------- ---+
| Task | Status |
+------
| expand | complete |
| migrate | incomplete |
| contract | incomplete |
+------