-
Notifications
You must be signed in to change notification settings - Fork 14
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-2644] Test: network cut #139
[DPE-2644] Test: network cut #139
Conversation
src/charm.py
Outdated
# NOTE: integration with kafka-broker-rack-awareness charm. | ||
# Load current properties set in the charm workload and check | ||
# if rack.properties file exists | ||
# if rack.properties file exists. | ||
# Also, check if listeners changed (IP change) | ||
properties = safe_get_file(self.kafka_config.server_properties_filepath) | ||
if properties and ( | ||
self.kafka_config.rack_properties != [] | ||
(self.kafka_config.rack_properties != [] or not self.kafka_config.listeners_updated) | ||
and (set(self.kafka_config.server_properties) ^ set(properties)) | ||
): | ||
self._on_config_changed(event) | ||
self._restart(event) |
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.
suggestion: Could we move the self._on_config_changed(event)
alone to right before the final self._set_status(Status.ACTIVE)
?
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.
Not there, because the machine health check would return earlier. I can move it after broker active.
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.
Looks good!
* add network throttle test * [DPE-2644] Test: network cut (#139) * run _on_config_changed on update_status
* add network throttle test * [DPE-2644] Test: network cut (#139) * run _on_config_changed on update_status
* add network throttle test * [DPE-2644] Test: network cut (#139) * run _on_config_changed on update_status
Adds network cut, which includes an IP change to the unit.
update_status
triggers.