main: log VM startup time at process start#7977
Closed
phip1611 wants to merge 2 commits intocloud-hypervisor:mainfrom
Closed
main: log VM startup time at process start#7977phip1611 wants to merge 2 commits intocloud-hypervisor:mainfrom
phip1611 wants to merge 2 commits intocloud-hypervisor:mainfrom
Conversation
7e6008f to
87897df
Compare
87897df to
d8cd351
Compare
phip1611
commented
Apr 9, 2026
d8cd351 to
3d97deb
Compare
phip1611
commented
Apr 9, 2026
| } | ||
|
|
||
| info!("{} starting", env!("BUILD_VERSION")); | ||
| info!("Starting Cloud Hypervisor {}", env!("BUILD_VERSION"),); |
Member
Author
There was a problem hiding this comment.
FYI: the new wording better aligns with e6b1e51
likebreath
reviewed
Apr 9, 2026
| epoll = { workspace = true } | ||
| event_monitor = { path = "../event_monitor" } | ||
| hypervisor = { path = "../hypervisor" } | ||
| jiff = { workspace = true } |
Member
There was a problem hiding this comment.
Can we explore alternative and avoid bring new dependency?
Member
Author
There was a problem hiding this comment.
I see your concern - I also thought about this first! I tried - but handling calendar time is inherently complex. jiff is already in the dependency tree and doesn't increase the binary size
9a62ecd to
95bf49a
Compare
phip1611
commented
Apr 9, 2026
|
|
||
| let epoch = epoch.trim(); | ||
| if epoch.is_empty() || epoch == "0" { | ||
| // In that case, the information is useless to users. |
Member
Author
There was a problem hiding this comment.
Open discussion: is there a better option? Something like "unknown"? Printing "1970-01-01" feels weird
3ba87c9 to
9525d93
Compare
9525d93 to
14312b2
Compare
# About and Motivation In production, the version string tells operators which binary is running, but it does not tell them when a specific cloud-hypervisor process actually started. That distinction matters when correlating logs across libvirt, OpenStack, journald, and other host-side components for a single VM launch. A dedicated startup timestamp gives every process instance an explicit wall-clock anchor in the log stream. This adds jiff as a runtime dependency for timestamp formatting. It is already transitively part of the build and does not increase the binary size therefore. On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
Without this: - `cargo build` - `CH_EXTRA_VERSION=foo cargo build` (no effect) On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
3b6e8f0 to
c948cdf
Compare
Member
Author
|
I'm closing this to reduce PR pressure on the project for now. We might need absolute timestamps (we need to design this first) |
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.
main: log VM startup time at process start
About and Motivation
In production, the version string tells operators which binary is
running, but it does not tell them when a specific cloud-hypervisor
process actually started.
That distinction matters when correlating logs across libvirt,
OpenStack, journald, and other host-side components for a single VM
launch. A dedicated startup timestamp gives every process instance an
explicit wall-clock anchor in the log stream.
This adds jiff as a runtime dependency for timestamp formatting. It is
already transitively part of the build and does not increase the binary
size therefore.