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

[JUJU-5140] Write controller configuration file #59

Merged
merged 3 commits into from
Jan 16, 2024
Merged

Conversation

manadart
Copy link
Member

@manadart manadart commented Jan 15, 2024

Introduction of the configuration file as per specification

This patch ensures:

  • that upon installation, the configuration file exists at the specified path and;
  • when the dbcluster relation data for the application has a changed value for db-bind-addresses, the new value is written to the configuration file.

To verify:

  • charmcraft pack this charm.
  • Bootstrap a new LXD controller using --controller-charm-path <path-to-packed-artefact>.
  • juju enable-ha.
  • Once all units have joined the relation, ssh to the controller machine and check /var/lib/juju/agents/controller-0/agent.conf. It should be populated along the lines of:
db-bind-addresses:
  controller/0: 10.246.27.181
  controller/1: 10.246.27.53
  controller/2: 10.246.27.12

Copy link
Member

@SimonRichardson SimonRichardson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a unit test to ensure the file is correctly written.

When the application data-bag value for cluster bind-addresses changes,
this value is updated in the configuration file.
ensure that the published Docker image is found.
@manadart manadart merged commit 27133e3 into main Jan 16, 2024
9 checks passed
@manadart manadart deleted the write-config-file branch January 16, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants