Commit Graph

38 Commits

Author SHA1 Message Date
Corey Bryant ac87b4bce5 Add package-upgrade action
The package-upgrade action performs package upgrades for the current
OpenStack release.

The code path used is similar to the openstack-upgrade action, with the
difference being that package-upgrade will not execute if an openstack
upgrade is available (based on the openstack-origin setting).

This change includes a charm-helpers sync.

Change-Id: Ifd99ea307a6e4d1d034d7c1e494e2cd8abd894e9
2023-06-02 11:23:25 +01:00
Alex Kavanagh 2271a961b7 Add service user password rotation actions
This patch adds two actions:

 1. An action to list the service usernames that can be rotated.
 2. An action to rotate a service username that is on the list of
    usernames that can be rotated.

Change-Id: I3a8a6af7ec8b0ea32da04eff34fafd32f43cee0e
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1005
2023-02-24 18:57:02 +00:00
Tianqi c3587026cc Refactor admin password related actions code for better maintenance
Moved rotate-admin-password action to admin-password.py and made
changes to the unit test accordingly. Putting admin password
related actions together will reduce confusion and improve
maintainability

Change-Id: I27f8d3a279833dde5f6021e9d78a5ab2f05445b2
2022-03-28 18:21:31 -04:00
Pedro Castillo ae178d7471 Add rotate-admin-password action
This action allows the user to easily rotate the admin user's
password by replacing it with a randomly generated one.

Change-Id: I6ce69be15b11b00f804d3143d835ec3ce6515865
Related-Bug: #1927280
Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/720
2022-03-21 19:55:34 +00:00
Tianqi 4949830cea Add get-admin-password action with unit test
Implemented a new action to provide users the possibility of
retrieving Keystone service's admin password via juju action.
The result of this action is equivalent to running
“juju run --unit {keystone unit} leader-get admin_passwd”.

Closes-Bug: #1858657
Change-Id: I231c4b73016f7e7b4ba7f06219dd8e212402a339
2022-03-04 21:51:03 +00:00
Corey Bryant 4c316350cc Fix lint errors E741 and E741
hooks/keystone_utils.py:1606:9:
 E741 ambiguous variable name 'l'

actions/security_checklist.py:52:13:
 F523 '...'.format(...) has unused arguments at position(s): 0

Change-Id: I84f33cfd574483a36b8201a0a6b4f970f8cb8175
2020-05-21 13:55:29 -04:00
Frode Nordahl 3765c0b123
Unpin flake8 and fix lint
Change-Id: Iacae0fc791003d7f1730363f10f509434b0e671f
2020-03-10 13:39:41 +01:00
Chris MacNaughton 165e875e59 Correct token hashing check
When using the PKI token provider, it is necessary to
ensure that a secure hashing algorithm is used. The
charms never configure a PKI provider but the checklist
action is still a valid runtime check.

Change-Id: If0869124e4fcf7af68f636b9e4d3027c83407a4f
Closes-Bug: 1820813
Func-Test-PR: https://github.com/openstack-charmers/zaza/pull/200
2019-03-19 15:39:35 +01:00
Chris MacNaughton d8c406e405 Ensure Keystone sets check-max-request-body-size
Change-Id: I580669d82c3f37adceb75d5d6f368b09ea41b9da
Closes-Bug: #1819134
Func-Test-PR: https://github.com/openstack-charmers/zaza/pull/198
2019-03-11 12:36:54 +00:00
Zuul e363626820 Merge "Fix manager.py launch python version to match installed payload" 2019-03-07 17:01:09 +00:00
Alex Kavanagh 627ab761dd Fix manager.py launch python version to match installed payload
The manager.py helper is launched with either py2 or py3 depending on
the version of the payload.  However, it was using openstack-origin
rather than actually picking up the actual version of the installed
software.  This patch ensures that the manager.py is run with the
python version of the installed payload, which resolves a bug when
upgrading to rocky (which is the py2 to py3 transition of the payload).

Also fixes an os.execl() bug which changed behaviour from python2 to
python3.

Change-Id: I17255b84ca067886f866a5f8311dcab57fba6f14
Closes-bug: #1818988
2019-03-07 14:11:31 +00:00
Chris MacNaughton 3bd0997bf4 Add security checklist to Keystone
This charm adds the general ownership audits, as well
as keystone specific security checklist audits.

Change-Id: Iee093b36c54081f14a07c95e677ea08c72d72ca4
2019-03-07 06:54:40 +00:00
Alex Kavanagh 59561fdda0 Convert the charm to Python 3 only
Major changes:

 * decoupling the hooks/manager.py file from the charm.  It is now a
   script that is called from hooks/keystone_utils.py as it has to use
   the same Python version/libraries as the installed keystone payload
   software.  keystone_utils.py and manager.py communicate via a Unix
   Domain Socket using json, encoded to base64.
 * As Python3 requires absolute imports, the charmhelpers symlink has
   been removed from hooks, and the hooks and charmhelpers symlinks have
   been removed from the actions directory.  Instead, the path is
   adjusted so that the modules can be found.

Change-Id: I18996e15d2d08b1dacf0533132eae880cbb9aa32
2018-09-21 09:09:47 +00:00
James Page e8f1fdd8a1 Remove deploy from source support
Drop support for deployment from Git repositories, as deprecated
in the 17.02 charm release.  This feature is unmaintained and has
no known users.

Change-Id: Ic054e29ef55d8890a3130af16b48f105efcf8f6a
2018-01-12 10:42:25 +00:00
James Page d1fd13261f Re-license charm as Apache-2.0
All contributors to this charm have agreed to the switch
from GPL v3 to Apache 2.0; switch to Apache-2.0 license
as agreed so we can move forward with official project status.

Change-Id: Iaee75f59fe51f01da18aa2703a46c3885ade73c0
2016-07-03 16:39:47 +00:00
James Page 1f081a98ea Enhanced pause/resume with gated restarts
The existing pause/resume functionality is enhanced with
changed charm-helpers support to chech that the services
really are stopped and that paused units really stay
paused.  The restart_on_change decorator is gated
such that if the unit is 'paused' then the service
is not accidentally started.

Change-Id: Ie0c5e0249bde0839345ad66f7400522754aa91ca
2016-03-15 16:51:51 +00:00
Alex Kavanagh 86c7018113 Change pause/resume actions use (new) assess_status()
Implemented new is_paused() and assess_status() functions, and changed
the pause and resume actions to use them. Changed existing and added new
tests to verify functionality.
2016-01-13 15:13:10 +00:00
Liam Young ee6ed13e3d Fix action managed upgrades and unit tests 2015-10-19 13:33:33 +00:00
David Ames f41ef66186 [thedac, trivial] Add missing symlink for openstack-upgrade action 2015-10-08 15:30:32 -07:00
Corey Bryant 80dccdd02b Action-managed upgrade support. 2015-10-07 12:20:36 -04:00
Alberto Donato 022ecd6eb4 Add missing shebang. 2015-08-19 12:47:12 +03:00
Alberto Donato 5f42884323 Fix docstrings. 2015-08-19 12:14:40 +03:00
Alberto Donato e9f85d026d Add missing files, 2015-08-19 10:33:27 +03:00
Alberto Donato 324ae4684c Move actions to action.py 2015-08-19 09:22:21 +03:00
Alberto Donato 87bee36190 Fix name. 2015-08-17 12:52:12 +03:00
Alberto Donato bb4e25cbc9 Add missing link. 2015-08-14 11:33:51 +03:00
Alberto Donato 618def985f Fix import. 2015-08-14 11:24:16 +03:00
Alberto Donato d22f37968c Cleanups. 2015-08-14 09:34:34 +03:00
Alberto Donato d60601f717 Stop/start all services. 2015-08-13 13:35:30 +03:00
Alberto Donato 6de1e4362d Move charmheplers dir out of hooks. 2015-08-06 13:52:27 +02:00
Alberto Donato 45390b6d68 Add test. 2015-08-05 17:34:49 +02:00
Alberto Donato f9291fe5a3 Add actions. 2015-08-05 12:28:13 +02:00
Corey Bryant d6acd371ff Move config_changed into try block 2015-04-15 16:33:30 +00:00
Corey Bryant 9fcc96f782 Run config-changed hook after git-reinstall action installs from source 2015-04-13 23:52:09 +00:00
Corey Bryant f2411f672a Add unit tests for git-reinstall action 2015-03-19 19:37:39 +00:00
Corey Bryant ab643911a7 Minor updates to git-reinstall action 2015-03-18 18:52:09 +00:00
Corey Bryant 1f57af01da Change format of openstack-origin-yaml, use try/except in action, use git_src_dir in post install, update amulet tests. 2015-03-17 20:45:13 +00:00
Corey Bryant ece7c05e39 Add deploy from source action support and various fixups after rebase 2015-03-13 09:52:11 +00:00