Skip to content

Commit 626b28c

Browse files
committed
PodmanDNSPlugin: Support Ubuntu, Debian
Signed-off-by: Zack Cerza <zack@redhat.com>
1 parent dfac66a commit 626b28c

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

ceph_devstack/requirements.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,24 @@ async def check(self):
191191

192192

193193
class PodmanDNSPlugin(FixableRequirement):
194-
dns_plugin_path = "/usr/libexec/cni/dnsname"
195-
check_cmd = ["test", "-x", dns_plugin_path]
196194
suggest_msg = "Could not find the podman DNS plugin"
197-
fix_cmd = ["sudo", "dnf", "install", "-y", dns_plugin_path]
195+
196+
def __init__(self):
197+
os_type = self.host.os_type()
198+
if os_type == "centos":
199+
dns_plugin_path = "/usr/libexec/cni/dnsname"
200+
self.check_cmd = ["test", "-x", dns_plugin_path]
201+
self.fix_cmd = ["sudo", "dnf", "install", "-y", dns_plugin_path]
202+
elif os_type in ["ubuntu", "debian"]:
203+
dns_plugin_path = "/usr/lib/cni/dnsname"
204+
self.check_cmd = ["test", "-x", dns_plugin_path]
205+
self.fix_cmd = [
206+
"sudo",
207+
"apt",
208+
"install",
209+
"-y",
210+
"golang-github-containernetworking-plugin-dnsname",
211+
]
198212

199213

200214
class FuseOverlayfsPresence(FixableRequirement):

0 commit comments

Comments
 (0)