Skip to content

Commit

Permalink
different conf files
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Engel <[email protected]>
  • Loading branch information
engelmi committed Apr 25, 2024
1 parent 3d19f9a commit c4616bb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ def exec(ctrl: BluechiControllerMachine, _: Dict[str, BluechiAgentMachine]):
assert ctrl.wait_for_unit_state_to_be("bluechi-controller", "active")

original_cfg = ctrl.config.deep_copy()
original_cfg.file_name = "zzz-ctrl.conf"

# port contains an 'O' instead of a '0'
new_cfg = original_cfg.deep_copy()
new_cfg.file_name = "zzz1-ctrl.conf"
new_cfg.port = "542O"
ctrl.create_file(new_cfg.get_confd_dir(), new_cfg.file_name, new_cfg.serialize())
ctrl.systemctl.restart_unit("bluechi-controller")
assert ctrl.wait_for_unit_state_to_be("bluechi-controller", "failed")

# port out of range
new_cfg = original_cfg.deep_copy()
new_cfg.file_name = "zzz2-ctrl.conf"
new_cfg.port = "65538"
ctrl.create_file(new_cfg.get_confd_dir(), new_cfg.file_name, new_cfg.serialize())
# to ensure that a restart is possible, reset the lock due to too many failed attempts
Expand All @@ -35,6 +36,7 @@ def exec(ctrl: BluechiControllerMachine, _: Dict[str, BluechiAgentMachine]):

# valid config again
new_cfg = original_cfg.deep_copy()
new_cfg.file_name = "zzz3-ctrl.conf"
ctrl.create_file(new_cfg.get_confd_dir(), new_cfg.file_name, new_cfg.serialize())
# to ensure that a restart is possible, reset the lock due to too many failed attempts
ctrl.systemctl.reset_failed_for_unit("bluechi-controller")
Expand Down

0 comments on commit c4616bb

Please sign in to comment.