fix(logging): stop losing admin-vm logs across offline reboots#1396
Merged
brianmcgillion merged 1 commit intotiiuae:mainfrom Sep 12, 2025
Merged
fix(logging): stop losing admin-vm logs across offline reboots#1396brianmcgillion merged 1 commit intotiiuae:mainfrom
brianmcgillion merged 1 commit intotiiuae:mainfrom
Conversation
vunnyso
requested changes
Sep 10, 2025
brianmcgillion
approved these changes
Sep 10, 2025
Signed-off-by: Everton de Matos <everton.dematos@tii.ae>
208d00d to
2c830de
Compare
vunnyso
approved these changes
Sep 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Fixes loss of
admin-vmlogs when they are generated while the Internet is down and the VM reboots before connectivity returns.The root cause was that we were persisting Alloy’s state (
/var/lib/private/alloy) onadmin-vm, which includes theloki.source.journal cursor. The source advanced its cursor pre-reboot even though some entries had not yet reachedloki.write(where the WAL append happens). After reboot, the persisted cursor skipped those entries, so nothing was resent.Type of Change
Related Issues / Tickets
https://jira.tii.ae/browse/SSRCSP-7024
Checklist
make-checksand it passesTesting Instructions
Applicable Targets
aarch64aarch64x86_64x86_64x86_64Installation Method
nixos-rebuild ... switchTest Steps To Verify:
cat /etc/common/device-id(and write down the id)ssh ghaf@admin-vmsudo logger --priority=user.info --tag=myjob "logtest0 - admin"ssh ghaf@admin-vmsudo logger --priority=user.info --tag=myjob "logtest1 - admin"logtest0 - adminlogtest1 - admin