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

fix: Make sure pebble layer is applied before restarting #570

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

saltiyazan
Copy link
Contributor

@saltiyazan saltiyazan commented Dec 19, 2024

Description

This is draft | Not ready for review: There is more into this PR trying to figure out why would the restart be attempted in the first place.

Turns out the intermittent integration test error

- Start service "vault" (service start attempt: exited quickly with code 1, will restart)
----- Logs from task 1 -----
2024-12-18T14:26:23Z INFO Most recent service output:
    error loading configuration from /vault/config/config.hcl: stat /vault/config/config.hcl: no such file or directory
    error loading configuration from /vault/config/config.hcl: stat /vault/config/config.hcl: no such file or directory
2024-12-18T14:26:23Z ERROR service start attempt: exited quickly with code 1, will restart
-----

Is not caused by the file not being properly copied, but by trying to "restart" the service before the pebble plan being applied, this explains why vault is looking for the config on the default path.

This still wierd since we check if _vault_service_is_running() before restarting.

In this PR we double check the pebble layer before generating the config and therefore potentially restarting the service.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that validate the behaviour of the software
  • I validated that new and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have bumped the version of any required library.

@saltiyazan saltiyazan requested a review from a team as a code owner December 19, 2024 10:38
@saltiyazan saltiyazan marked this pull request as draft December 19, 2024 10:51
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.

1 participant