Skip to content
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

Update controller configuration path #69

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def _controller_config_path(self) -> str:
the local controller ID, then use it to construct a config path.
"""
controller_id = self._config_change_socket.get_controller_agent_id()
return f'/var/lib/juju/agents/controller-{controller_id}/agent.conf'
return f'/var/lib/juju/agents/controller-{controller_id}/controller.conf'

def _request_config_reload(self):
"""Send a reload request to the config reload socket"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def test_dbcluster_relation_changed_write_file(
self.harness.update_relation_data(
relation_id, harness.charm.app.name, {'db-bind-addresses': json.dumps(bound)})

file_path = '/var/lib/juju/agents/controller-0/agent.conf'
file_path = '/var/lib/juju/agents/controller-0/controller.conf'
self.assertEqual(mock_open.call_count, 2)

# First call to read out the YAML
Expand Down
Loading