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

🐛 Create journald persistent path #1324

Merged
merged 2 commits into from
Apr 19, 2023
Merged

Conversation

Itxaka
Copy link
Member

@Itxaka Itxaka commented Apr 19, 2023

Journald will not save any logs to disk if it finds that there is no /var/log/journal directory created (wut?) so make sure to create the dir during initramfs stage so the logs are persisted across reboots

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #597

Journald will not save any logs to disk if it finds that there is no
/var/log/journal directory created (wut?) so make sure to create the dir
during initramfs stage so the logs are persisted across reboots

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
@Itxaka Itxaka requested a review from a team April 19, 2023 14:23
@Itxaka Itxaka changed the title 🐛 Create journald persisten path 🐛 Create journald persistent path Apr 19, 2023
@netlify
Copy link

netlify bot commented Apr 19, 2023

Deploy Preview for kairos-io canceled.

Name Link
🔨 Latest commit 9c910a8
🔍 Latest deploy log https://app.netlify.com/sites/kairos-io/deploys/644008bde547e70008643a8e

mauromorales
mauromorales previously approved these changes Apr 19, 2023
Copy link
Member

@mauromorales mauromorales left a comment

Choose a reason for hiding this comment

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

Great finding!!!

@codecov-commenter
Copy link

Codecov Report

Merging #1324 (e8cd0a6) into master (7bb9af9) will decrease coverage by 1.69%.
The diff coverage is 44.50%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master    #1324      +/-   ##
==========================================
- Coverage   22.79%   21.10%   -1.69%     
==========================================
  Files          22       16       -6     
  Lines        1610     1284     -326     
==========================================
- Hits          367      271      -96     
+ Misses       1179      962     -217     
+ Partials       64       51      -13     
Impacted Files Coverage Δ
internal/agent/config.go 0.00% <ø> (ø)
internal/agent/interactive_install.go 0.00% <ø> (ø)
internal/agent/notify.go 0.00% <0.00%> (ø)
internal/agent/recovery.go 0.00% <ø> (ø)
internal/agent/reset.go 0.00% <0.00%> (ø)
internal/agent/upgrade.go 0.00% <0.00%> (ø)
pkg/config/config.go 0.00% <0.00%> (-51.36%) ⬇️
internal/agent/install.go 5.10% <21.21%> (+5.10%) ⬆️
pkg/config/collector/options.go 64.51% <37.50%> (ø)
pkg/config/collector/collector.go 61.13% <61.13%> (ø)
... and 2 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mudler
Copy link
Member

mudler commented Apr 19, 2023

Good catch! I'm guessing if this instead should be a .keep file in our overlay, but dynamically seems much better, so we detect the OS instead

@mudler mudler merged commit 28dc374 into kairos-io:master Apr 19, 2023
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.

🐛 system logs should persist reboot
4 participants