Skip to content

Conversation

@everton-dematos
Copy link
Contributor

Description of Changes

This PR fixes an issue where net-vm logs were missing in Grafana, while logs from other VMs on the same device were still present (https://jira.tii.ae/browse/SSRCSP-7542).

In net-vm, the hostname is set dynamically and is later exposed by journald as __journal__hostname, which is used by alloy.service to label and ship logs. In some cases, alloy.service was starting before the dynamic hostname was set, leading to inconsistent or missing net-vm logs when filtering by machine/device identifier.

To avoid this race, alloy.service is now started after the dynamic hostname setter service, but only when that service is enabled.

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

https://jira.tii.ae/browse/SSRCSP-7542

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

  1. Log into net-vm
  2. Generate any traceable log:
    2.1. [ghaf@ghaf-0013702975:~]$ logger "testing this PR"
  3. Search on Grafana for the log
    3.1. Plese note that the host on Grafana should be set as the dynamic hosname (e.g., ghaf-0013702975)
    3.2. You should be able to visualize all the logs from net-vm (using the dynamic hostname), including the new generated log:
image

@brianmcgillion brianmcgillion merged commit c13c6c9 into tiiuae:main Jan 16, 2026
32 checks passed
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.

3 participants