Re: [libvirt PATCH] qemu: Shorten domain name in virtiofsd log path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 07, 2022 at 02:14:30PM +0200, Ján Tomko wrote:
On a Thursday in 2022, Martin Kletzander wrote:
This helps when starting domains with long names which could possibly end up
creating too long of a name for the filesystem.

The path is not being saved in the domain config, so there is no need for
backwards compatibility.  User aliases will always start with "ua-" and the only
way paths could collide is to:

1) create a domain named e.g. "asdf-ua"
2) start the domain with virtiofsd debug logs
3) destroy the domain
4) restart libvirt daemon for domain IDs to start from 1 again
5) create a domain named "asdf"
6) add user alias for the virtiofs that is the same as was generated for the
  first domain, with the required "ua-" prefix
7) start the "asdf" domain

at which point the logs for the two domains would end up in the same logfile.

Since this is still better than what we had before I think it is not worth
fixing this peculiar scenario in this patch.


I don't think this is better. It does fix it for the strange use case
of using very long domain names, and I agree that people combining
domain names with "-ua" suffixes and no user aliases along with
exact same domain names without the -ua suffix, but using user aliases
are not worth worrying about.

But for the 99 % of reasonable users, this patch includes the domain ID
in the log path, so the path can change across restarts of the same domain.
I don't like including this transient identifier in the log path.
We also don't shorten the domain log, since we expect it to stay after
the domain stops running.


I think it is even better.  If you are looking at the virtiofsd debug
log then you probably want to look at the current run, you can see when
the file was created and open the newest one.  And if you need to look
at all the log files, then you can just:

cat $(ls -cr *-$domain-$alias-virtiofsd.log) | less

or similar.  But maybe my assumption about virtiofsd debug logs being
usable only in corner case scenarios is wrong.

I wouldn't hate domain logfiles including the id either.

Jano

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1817401
Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
src/qemu/qemu_virtiofs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux