Skip to content

E2E: Serial log collection fails because of wrong path #2463

@lentzi90

Description

@lentzi90

We are collecting serial logs for BareMetalHosts here:

serialLog := fmt.Sprintf("/var/log/libvirt/qemu/%s-serial0.log", VMName)

Unfortunately, the VMName ended up including the namespace at some point and that means we do not find the file.
It looks like this:

[2025-03-27T23:06:43.031Z]   �[1mSTEP:�[0m Dumping logs from the "clusterctl-upgrade-management-edqjap" workload cluster �[38;5;243m@ 03/27/25 23:06:42.351�[0m
[2025-03-27T23:06:43.031Z] Failed to get logs for Machine clusterctl-upgrade-management-edqjap-z5jd9, Cluster clusterctl-upgrade-8lq27e/clusterctl-upgrade-management-edqjap: error finding the serial log: stat /var/log/libvirt/qemu/clusterctl_upgrade_8lq27e/node_0-serial0.log: no such file or directory
[2025-03-27T23:06:43.031Z] Failed to get logs for Machine clusterctl-upgrade-management-edqjap-zfbkc-4fb8r, Cluster clusterctl-upgrade-8lq27e/clusterctl-upgrade-management-edqjap: error finding the serial log: stat /var/log/libvirt/qemu/clusterctl_upgrade_8lq27e/node_1-serial0.log: no such file or directory

NOTE: This is only an issue with clusterctl-upgrade tests from what I can tell. This means that special care should be taken to make sure we keep the other tests working when fixing clusterctl-upgrade!

/triage accepted
/help

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.triage/acceptedIndicates an issue is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions