From 052f9ded8895154ac2e0b7a2199fd54c1e626aef Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Fri, 21 Sep 2018 16:05:04 +0000 Subject: [PATCH] Add database access details to UpgradeCommands docstring Per the original Nova code, these checks need to be able to run on n-1 database data, so they can't rely on the service's object model for database access. Add details about that to the docstring for UpgradeCommands. Also removes a nova-ism from the check docstring. Change-Id: I4fe84988397ae9bd2305811f10fa3d1449c4ac9f --- oslo_upgradecheck/upgradecheck.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/oslo_upgradecheck/upgradecheck.py b/oslo_upgradecheck/upgradecheck.py index 89eb628..f2279d8 100644 --- a/oslo_upgradecheck/upgradecheck.py +++ b/oslo_upgradecheck/upgradecheck.py @@ -68,6 +68,11 @@ class UpgradeCommands(object): This class should be inherited by a class in each project that provides the actual checks. Those checks should be added to the _upgrade_checks class member so that they are run when the ``check`` method is called. + + The subcommands here must not rely on the service object model since they + should be able to run on n-1 data. Any queries to the database should be + done through the sqlalchemy query language directly like the database + schema migrations. """ _upgrade_checks = () @@ -81,9 +86,8 @@ class UpgradeCommands(object): """Performs checks to see if the deployment is ready for upgrade. These checks are expected to be run BEFORE services are restarted with - new code. These checks also require access to potentially all of the - Nova databases (nova, nova_api, nova_api_cell0) and external services - such as the placement API service. + new code. + :returns: Code """ return_code = Code.SUCCESS