forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
launcher: fix prints for the domain events
In the previous version, the launcher was storing the previous status and reason values from the domain, and then fetching the new state. However, the domain status was always empty in the eventCallback when it was called by the case 'eventChan' because the domain is constructed by the function NewDomainFromName which doesn't populate the Status field. This resulted in wrong prints. For example, we were always printing the domain status, even if it didn't changed with verbosity:2, and the old status and reason were always empty strings. Example of the print when the domain pass from Paused to Running because the migration completed: - old wrong print: {"component":"virt-launcher","level":"info","msg":"kubevirt domain status: Paused(3):Migration(2)","pos":"client.go:296","timestamp":"2025-01-09T12:31 :55.568979Z"} [...] {"component":"virt-launcher","level":"info","msg":"kubevirt domain status: Running(1):Unknown(2)","pos":"client.go:296","timestamp":"2025-01-09T12:31 :55.572320Z" - new correct print: {"component":"virt-launcher","level":"info","msg":"kubevirt domain status: Running(Paused) reason: Unknown(Migration)","pos":"client.go:251","timestamp ":"2025-01-09T12:26:18.616955Z"} Signed-off-by: Alice Frosi <[email protected]>
- Loading branch information
Showing
2 changed files
with
37 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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