Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: libvirtd initscript doesnt need firewalld (Read 2213 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

libvirtd initscript doesnt need firewalld

Hi everyone!

I've been working with libvirtd and minikube and for some weird reason (I dont know why) firewalld doesnt provide an IP to the VM. So i stopped firewalld, I edited the file /etc/init.d/libvirtd and removed "need firewalld" option then I started libvirtd services and works fine finally the VM gets IP without problem.
Speaking in IRC channel @Dudemanguy  commented that the runit version of libvirtd doesnt have firewalld as a dependency.

So with this: It is possible to remove it?

Thanks for advanced.

Re: libvirtd initscript doesnt need firewalld

Reply #1
I've been working with libvirtd and minikube and for some weird reason (I dont know why) firewalld doesnt provide an IP to the VM. So i stopped firewalld, I edited the file /etc/init.d/libvirtd and removed "need firewalld" option then I started libvirtd services and works fine finally the VM gets IP without problem.
Speaking in IRC channel @Dudemanguy  commented that the runit version of libvirtd doesnt have firewalld as a dependency.

So with this: It is possible to remove it?
Please try 'want firewalld' instead of 'need firewalld', i.e. make it an optional soft dependency. If it works, well change it to that otherwise we'll remove it.

Re: libvirtd initscript doesnt need firewalld

Reply #2
Please try 'want firewalld' instead of 'need firewalld', i.e. make it an optional soft dependency. If it works, well change it to that otherwise we'll remove it.

I did this:

Code: [Select]
 
#!/usr/bin/openrc-run
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

description="Virtual Machine Management daemon (libvirt)"

LIBVIRTD_OPTS=${LIBVIRTD_OPTS:-"${LIBVIRTD_OPTS}"}
LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"}

command="/usr/bin/libvirtd"
command_args="-d ${LIBVIRTD_OPTS}"
start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab"
pidfile="/run/libvirtd.pid"
retry="${LIBVIRTD_TERMTIMEOUT}"

depend() {
need virtlogd
use dbus virtlockd
after ntp-client ntpd nfs nfsmount portmap rpc.statd iptables ip6tables ebtables corosync sanlock cgconfig xenconsoled
want firewalld
use avahi-daemon
use iscsid
use ceph
}

start_pre() {
# Test configuration directories in /etc/libvirt/ to be either not
# present or a directory, i.e. not a regular file, bug #532892

checkpath --directory /etc/libvirt/lxc || return 1
checkpath --directory /etc/libvirt/nwfilter || return 1
checkpath --directory /etc/libvirt/qemu || return 1
checkpath --directory /etc/libvirt/storage || return 1
}

$ sudo rc-service libvirtd start
libvirtd          | * Caching service dependencies ...    [ ok ]
virtlogd         | * Starting virtlogd ...
firewalld       | * Starting firewalld ...                            [ ok ]
libvirtd          | * Starting libvirtd ...                               [ ok ]

But my VM doesnt provied IP. I reverted the changes and works fine. So i believe we can remove it

Re: libvirtd initscript doesnt need firewalld

Reply #3
@nous so? what do you think?


 

Re: libvirtd initscript doesnt need firewalld

Reply #5
I did this:

Code: [Select]
 
#!/usr/bin/openrc-run
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

description="Virtual Machine Management daemon (libvirt)"

LIBVIRTD_OPTS=${LIBVIRTD_OPTS:-"${LIBVIRTD_OPTS}"}
LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"}

command="/usr/bin/libvirtd"
command_args="-d ${LIBVIRTD_OPTS}"
start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab"
pidfile="/run/libvirtd.pid"
retry="${LIBVIRTD_TERMTIMEOUT}"

depend() {
need virtlogd
use dbus virtlockd
after ntp-client ntpd nfs nfsmount portmap rpc.statd iptables ip6tables ebtables corosync sanlock cgconfig xenconsoled
want firewalld
use avahi-daemon
use iscsid
use ceph
}

start_pre() {
# Test configuration directories in /etc/libvirt/ to be either not
# present or a directory, i.e. not a regular file, bug #532892

checkpath --directory /etc/libvirt/lxc || return 1
checkpath --directory /etc/libvirt/nwfilter || return 1
checkpath --directory /etc/libvirt/qemu || return 1
checkpath --directory /etc/libvirt/storage || return 1
}

$ sudo rc-service libvirtd start
libvirtd          | * Caching service dependencies ...    [ ok ]
virtlogd         | * Starting virtlogd ...
firewalld       | * Starting firewalld ...                            [ ok ]
libvirtd          | * Starting libvirtd ...                               [ ok ]

But my VM doesnt provied IP. I reverted the changes and works fine. So i believe we can remove it


Did you write this as a package?