Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache external tool versions #14815

Open
simondeziel opened this issue Jan 17, 2025 · 0 comments
Open

Cache external tool versions #14815

simondeziel opened this issue Jan 17, 2025 · 0 comments

Comments

@simondeziel
Copy link
Member

During its operation, the LXD daemon often end up checking the versions of external tools like apparmor_parser, dnsmasq, nft, xtables, QEMU, rsync, rbd and radosgw-admin. Doing those ${BIN} --version calls is not free so the obtained version information should be cached after the first version check or maybe at LXD daemon start.

The list of such version checks can be obtained with this git grep:

$ git grep 'Command.*"--version"'
lxd/apparmor/apparmor.go:       out, err := shared.RunCommand("apparmor_parser", "--version")
lxd/dnsmasq/dnsmasq.go: output, err := shared.RunCommandCLocale("dnsmasq", "--version")
lxd/firewall/drivers/drivers_nftables.go:       output, err := shared.RunCommandCLocale("nft", "--version")
lxd/firewall/drivers/drivers_xtables.go:        output, err := shared.RunCommandCLocale(cmd, "--version")
lxd/instance/drivers/driver_qemu.go:    out, err := exec.Command(qemuPath, "--version").Output()
lxd/rsync/rsync.go:     out, err := shared.RunCommand("rsync", "--version")
lxd/storage/backend_lxd.go:             out, err := exec.Command("virt-v2v-in-place", "--version").CombinedOutput()
lxd/storage/drivers/driver_ceph.go:             out, err := shared.RunCommand("rbd", "--version")
lxd/storage/drivers/driver_cephfs.go:           out, err := shared.RunCommand("rbd", "--version")
lxd/storage/drivers/driver_cephobject.go:               out, err := shared.RunCommand("radosgw-admin", "--version")
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

No branches or pull requests

1 participant