Commit 555689a
committed
guestfs: fix dnsmasq check to avoid false positives in container environments
The dnsmasq configuration check was too strict and caused false positives on
systems where dnsmasq configuration directories exist but the service is not
actually running. This particularly affected systems with Incus installed
which creates /etc/dnsmasq.d/incus symlink for container networking without
running the dnsmasq systemd service.
The original check verified the existence of /etc/dnsmasq.conf and
/etc/dnsmasq.d directory and would fail if either existed regardless of
whether the dnsmasq service was actually running and conflicting with
libvirt networking.
Replace the filesystem-based checks with a simple service status check that
only fails if the dnsmasq service is actually active. This addresses the
root cause of the networking conflict which is the running dnsmasq service
not the presence of configuration files that may be used by other tools.
Remove the checks for configuration file existence and service enabled status
keeping only the check for active service state. The check now uses systemctl
is-active which returns zero only when the service is currently running and
will return non-zero for inactive not-found or any other non-active state.
This allows kdevops to run successfully on systems where dnsmasq directories
exist for other purposes such as Incus container networking while still
protecting against actual conflicts with running dnsmasq services.
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <[email protected]>1 parent be604b8 commit 555689a
1 file changed
+7
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 2 | + | |
37 | 3 | | |
38 | 4 | | |
39 | 5 | | |
40 | 6 | | |
41 | 7 | | |
42 | 8 | | |
43 | | - | |
| 9 | + | |
44 | 10 | | |
45 | 11 | | |
46 | 12 | | |
47 | 13 | | |
48 | | - | |
49 | 14 | | |
50 | | - | |
| 15 | + | |
51 | 16 | | |
52 | 17 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
58 | 21 | | |
59 | 22 | | |
60 | | - | |
61 | | - | |
| 23 | + | |
62 | 24 | | |
63 | 25 | | |
64 | 26 | | |
| |||
0 commit comments