diff --git a/deployment/puppet/octane_tasks/graphs/orig/upgrade-db-orig-rollback.yaml b/deployment/puppet/octane_tasks/graphs/orig/upgrade-db-rollback.yaml similarity index 100% rename from deployment/puppet/octane_tasks/graphs/orig/upgrade-db-orig-rollback.yaml rename to deployment/puppet/octane_tasks/graphs/orig/upgrade-db-rollback.yaml diff --git a/deployment/puppet/octane_tasks/graphs/orig/upgrade-db-orig.yaml b/deployment/puppet/octane_tasks/graphs/orig/upgrade-db.yaml similarity index 100% rename from deployment/puppet/octane_tasks/graphs/orig/upgrade-db-orig.yaml rename to deployment/puppet/octane_tasks/graphs/orig/upgrade-db.yaml diff --git a/deployment/puppet/octane_tasks/graphs/seed/upgrade-db-seed.yaml b/deployment/puppet/octane_tasks/graphs/seed/upgrade-db.yaml similarity index 100% rename from deployment/puppet/octane_tasks/graphs/seed/upgrade-db-seed.yaml rename to deployment/puppet/octane_tasks/graphs/seed/upgrade-db.yaml diff --git a/octane/commands/upgrade_db.py b/octane/commands/upgrade_db.py index 2a17eced..524865c6 100644 --- a/octane/commands/upgrade_db.py +++ b/octane/commands/upgrade_db.py @@ -65,14 +65,14 @@ def upgrade_db_with_graph(orig_id, seed_id): # If any failure try to rollback ONLY original environment. try: - deploy.execute_graph_and_wait("upgrade-db-orig", orig_id) - deploy.execute_graph_and_wait("upgrade-db-seed", seed_id) + deploy.execute_graph_and_wait("upgrade-db", orig_id) + deploy.execute_graph_and_wait("upgrade-db", seed_id) except Exception: cluster_graphs = deploy.get_cluster_graph_names(orig_id) - if "upgrade-db-orig-rollback" in cluster_graphs: + if "upgrade-db-rollback" in cluster_graphs: LOG.info("Trying to rollback 'upgrade-db' on the " "orig environment '%s'.", orig_id) - deploy.execute_graph_and_wait("upgrade-db-orig-rollback", orig_id) + deploy.execute_graph_and_wait("upgrade-db-rollback", orig_id) raise diff --git a/octane/tests/test_upgrade_db.py b/octane/tests/test_upgrade_db.py index abff594b..c0ff408c 100644 --- a/octane/tests/test_upgrade_db.py +++ b/octane/tests/test_upgrade_db.py @@ -44,66 +44,66 @@ def test_parser_exclusive_group(mocker, octane_app): # Orig is fine, seed is fine and there is no need to rollback. ( [ - ("upgrade-db-orig", False), - ("upgrade-db-seed", False), + ("upgrade-db", False), + ("upgrade-db", False), ], - ["upgrade-db-orig", "upgrade-db-orig-rollback", "upgrade-db-seed"], + ["upgrade-db", "upgrade-db-rollback", "upgrade-db"], None, ), # Orig is fine, seed fails and there is no rollback. ( [ - ("upgrade-db-orig", False), - ("upgrade-db-seed", True), + ("upgrade-db", False), + ("upgrade-db", True), ], - ["upgrade-db-orig", "upgrade-db-seed"], - "upgrade-db-seed", + ["upgrade-db", "upgrade-db"], + "upgrade-db", ), # Orig is fine, seed fails and rollback is fine. ( [ - ("upgrade-db-orig", False), - ("upgrade-db-seed", True), - ("upgrade-db-orig-rollback", False), + ("upgrade-db", False), + ("upgrade-db", True), + ("upgrade-db-rollback", False), ], - ["upgrade-db-orig", "upgrade-db-orig-rollback", "upgrade-db-seed"], - "upgrade-db-seed", + ["upgrade-db", "upgrade-db-rollback", "upgrade-db"], + "upgrade-db", ), # Orig is fine, seed fails and rollback fails too. ( [ - ("upgrade-db-orig", False), - ("upgrade-db-seed", True), - ("upgrade-db-orig-rollback", True), + ("upgrade-db", False), + ("upgrade-db", True), + ("upgrade-db-rollback", True), ], - ["upgrade-db-orig", "upgrade-db-orig-rollback", "upgrade-db-seed"], - "upgrade-db-orig-rollback", + ["upgrade-db", "upgrade-db-rollback", "upgrade-db"], + "upgrade-db-rollback", ), # Orig fails and there is no rollback. ( [ - ("upgrade-db-orig", True), + ("upgrade-db", True), ], - ["upgrade-db-orig", "upgrade-db-seed"], - "upgrade-db-orig", + ["upgrade-db", "upgrade-db"], + "upgrade-db", ), # Orig fails, rollback is fine. ( [ - ("upgrade-db-orig", True), - ("upgrade-db-orig-rollback", False), + ("upgrade-db", True), + ("upgrade-db-rollback", False), ], - ["upgrade-db-orig", "upgrade-db-orig-rollback", "upgrade-db-seed"], - "upgrade-db-orig", + ["upgrade-db", "upgrade-db-rollback", "upgrade-db"], + "upgrade-db", ), # Orig fails, rollback is also fails. ( [ - ("upgrade-db-orig", True), - ("upgrade-db-orig-rollback", True), + ("upgrade-db", True), + ("upgrade-db-rollback", True), ], - ["upgrade-db-orig", "upgrade-db-orig-rollback", "upgrade-db-seed"], - "upgrade-db-orig-rollback", + ["upgrade-db", "upgrade-db-rollback", "upgrade-db"], + "upgrade-db-rollback", ), ]) def test_upgrade_db_with_graph(mocker, calls, graph_names, catch):