Merge "Update openrc files after overcloud service upgrade"

This commit is contained in:
Zuul 2020-06-17 19:09:44 +00:00 committed by Gerrit Code Review
commit bf1931f8ea
3 changed files with 25 additions and 0 deletions

View File

@ -1378,6 +1378,7 @@ class OvercloudServiceUpgrade(KollaAnsibleMixin, KayobeAnsibleMixin,
deployment.
* Perform a kolla-ansible upgrade of the overcloud services.
* Configure and upgrade kayobe extra services.
* Regenerate openrc files for the admin user.
This can be used in conjunction with the --tags and --kolla-tags arguments
to upgrade specific services.
@ -1409,6 +1410,13 @@ class OvercloudServiceUpgrade(KollaAnsibleMixin, KayobeAnsibleMixin,
self.run_kayobe_playbooks(parsed_args, playbooks,
extra_vars=extra_vars, limit="overcloud")
# Post-deployment configuration.
self.run_kolla_ansible_overcloud(parsed_args, "post-deploy")
# Create an environment file for accessing the public API as the admin
# user.
playbooks = _build_playbook_list("public-openrc")
self.run_kayobe_playbooks(parsed_args, playbooks, ignore_limit=True)
class OvercloudServiceDestroy(KollaAnsibleMixin, KayobeAnsibleMixin,
VaultMixin, Command):

View File

@ -1561,6 +1561,14 @@ class TestCase(unittest.TestCase):
"kayobe_action": "upgrade",
}
),
mock.call(
mock.ANY,
[
utils.get_data_files_path("ansible",
"public-openrc.yml"),
],
ignore_limit=True,
),
]
self.assertEqual(expected_calls, mock_run.call_args_list)
@ -1573,6 +1581,10 @@ class TestCase(unittest.TestCase):
mock.ANY,
"upgrade"
),
mock.call(
mock.ANY,
"post-deploy"
),
]
self.assertEqual(expected_calls, mock_kolla_run.call_args_list)

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Kayobe now updates ``openrc`` files when using the ``kayobe overcloud service
upgrade`` command.