-
Notifications
You must be signed in to change notification settings - Fork 9
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 - 6153] - Propagate the security index intitialized through the peercluster relation #517
[DPE - 6153] - Propagate the security index intitialized through the peercluster relation #517
Conversation
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.
Thank you @skourta for investigating and bringing up this solution for the issue. I think it is a valid approach and helps to set the security_index_initialized
more consistently on the peer-cluster applications.
There are only some minor things that need to be adjusted from my point of view. Good Job!
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.
Thanks Smail, great work!
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.
Re-approval after PR had already been reviewed from my-side previously.
Fixes #516
Summary
lib/charms/opensearch/v0/models.py
: Added a new attributesecurity_index_initialised
to thePeerClusterRelData
class to track the initialization status of the security index.lib/charms/opensearch/v0/opensearch_base_charm.py
: Added a new methodput_or_update_security_index_initialized
to set the security index initialization flag and notify the main orchestrator. This method is called in_post_start_init
to replace the direct setting of the flag. [1] [2]lib/charms/opensearch/v0/opensearch_relation_peer_cluster.py
: Added a method_get_security_index_initialised
to check the initialization status across clusters and a methodset_security_index_initialised
to update the status in the unit data bag. These methods are used to ensure consistent handling of the security index initialization. [1] [2]lib/charms/opensearch/v0/opensearch_relation_peer_cluster.py
: Updated methods_rel_data
,_on_peer_cluster_relation_changed
, and_set_security_conf
to incorporate the newsecurity_index_initialised
attribute and ensure the status is correctly propagated and logged. [1] [2] [3]