-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DPE-4251][DPE-4196][DPE-3603] Plugin Management Re-work (1/3): Plugin Manager handles the config changed before started #282
base: main
Are you sure you want to change the base?
Conversation
@carlcsaposs-canonical I have reshuffled the |
@phvalguima from the current diff, it seems like if there's an IP change and no config change, a warning message will be logged ip change should be supported during in-progress upgrade (so if only ip change, there shouldn't be a warning) |
39ddb84
to
3edb4d6
Compare
pipx install tox | ||
pipx install poetry | ||
- name: Run tests | ||
run: tox run -e unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temp.: Will revert it once the main integration tests pass and we are sure of the changes below (there are a lot of unit tests that will need to be updated here)
Introduction
This is part of a bigger set of changes happening across the plugin management modules.
The main goal is to: (1) curb the requirements for restart from any configuration changes; and (2) get a faster response time using cached entries wherever possible.
We ensure that any configuration changes that come from plugin management are applied via API before being persisted on config files. If the API responds with a
200
status, then we should only write the new value to the configuration and finish without a need for restart.In case the service is down and API is not available, we can assume we will eventually start the service back up. In this case, it suffices to write the config entries to the files and leave to the next start to pick them up.
This task is going to be divided into 3x parts:
{add,delete}_plugin
together and its equivalents inOpenSearchPluginConfig
class: from now on, we receive one big dictionary where akey: None
means we want to simply delete that entryPart 1/3
The current implementation of
plugin_manager.run
waits for the cluster to be started before processing its config changed. We relax this demand and open to the option where the cluster is not yet ready, so we can modify the configuration without issuing a restart request.#252 is closed with
OpenSearchPluginRelationsHandler
interface. It allows plugins to define how they will handle its relation(s).opensearch_backup
module extends this interface and defines a checker to process either small or large deployments details.Other relevant changes:
check_plugin_manager_ready
tocheck_plugin_manager_ready_for_api
check_plugin_manager_ready_for_api
/_cluster/settings
is available: apply the configs via API and do not add a restart requestupgrade_in_progress
check gets precedence and will continuously deferconfig-changed
event until upgrade is finished before calling the plugin managerOpenSearchKeyStoreNotReadyYetError
: responsible to identify the keystore has not been initialized yet across the cluster and hence, we cannot manage any plugins that use it; however, we always apply the config changes from that plugin.That still frees the config_changed to just call plugin_manager.run() before everything is set, as the run() method changes hard configuration only.
Closes #252, #280