~txiao/charm-storage-connector:defer_restart

Last commit made on 2023-02-28
Get this branch:
git clone -b defer_restart https://git.launchpad.net/~txiao/charm-storage-connector
Only Tianqi Xiao can upload to this branch. If you are Tianqi Xiao please log in for upload directions.

Branch merges

Branch information

Name:
defer_restart
Repository:
lp:~txiao/charm-storage-connector

Recent commits

6fb1834... by Tianqi Xiao

Add defer methods for better handling service restarts

- Make use of charmhelpers policy_rcd script to block automatic stop, restarts, try-restarts action for all charm managed services, including iscsid open-iscsi, and multipathd.
- Handles deferred restarts triggered by both charm and non-charm events
- Display the queue of deferred service restarts in charm status message
and periodic updates
- Add `enable-auto-restarts` config option to give user option to allow automatic restarts action if needed (the default value is False)
- Add `restart-services` action to restart charm managed service. The
operator can choose to restart either all deferred services or a specific
set of services.
- Add `show-deferred-restarts` action to show all deferred restart events
with the timestamp and reason
- Add `iscsi-discovery-and-login` action that allow operator to manually
run iscsiadm discovery and login when needed
- Remove `restart-iscsi-services` action in favor of the new
`restart-services` action
- Better handling different types of iscsi discovery and login failures.
If failed because session already present, ignore the error; otherwise
change charm status to blocked.
- Add unittests and functional tests for the new and modified methods
- Rework functional tests logic to make each test case independent of each other.

fd35567... by Mert Kirpici

Close LP #1998094

Reviewed-on: https://code.launchpad.net/~mertkirpici/charm-storage-connector/+git/charm-storage-connector/+merge/433728
Reviewed-by: Ramesh Sattaru <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: Erhan Sunar <email address hidden>

8f56548... by Mert Kirpici

tox: move flake8 config comments to new line

flake8 6.0.0 does not like it when the inline comments are on the same
line as the ignored rule.

Works-on: 1998094
Signed-off-by: Mert Kırpıcı <email address hidden>

01ffcc9... by Mert Kirpici

Close LP #1966618

Reviewed-on: https://code.launchpad.net/~mertkirpici/charm-storage-connector/+git/charm-storage-connector/+merge/431367
Reviewed-by: Eric Chen <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: Erhan Sunar <email address hidden>

2b20d3f... by Mert Kirpici

tests/unit/nrpe: test non default check value

Works-on: 1966618
Signed-off-by: Mert Kırpıcı <email address hidden>

abfb8e8... by Mert Kirpici

nrpe: remove nagios user creation

Signed-off-by: Mert Kırpıcı <email address hidden>

b9500cc... by Mert Kirpici

Partial LP #1966618

Reviewed-on: https://code.launchpad.net/~mertkirpici/charm-storage-connector/+git/charm-storage-connector/+merge/430920
Reviewed-by: Eric Chen <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: Erhan Sunar <email address hidden>

e29e1b3... by Mert Kirpici

charm: implement nrpe interface

Works-on: 1966618
Signed-off-by: Mert Kırpıcı <email address hidden>

5bcebb7... by Mert Kirpici

lib/metrics: rename to metrics_utils

Also introduce a new namespace package lib.storage_connector for more
expressive import statements. e.g.

  from storage_connector import metrics_utils

Works-on: 1966618
Signed-off-by: Mert Kırpıcı <email address hidden>

1cee24e... by Mert Kirpici

tests/unit: ensure correct types

ops 1.5.3 introduces stricter type checking, these tests were overlooked
in the past

Signed-off-by: Mert Kırpıcı <email address hidden>