Package: openvswitch-switch
Version: 2.10.0+2018.08.28+git.8ca7c82b7d+ds1-12+deb10u2
Severity: normal

Hi,

I recently figured that openvswitch would not start. So I tried

# apt install --reinstall openvswitch-switch

and noticed, that it fails. From the journal:

May 30 00:14:17 debian ovs-ctl[21685]: install: fatal: unable to read 
dnsroots.global: file does not exist
May 30 00:14:17 debian ovsdb-server[21706]: 
ovs|00002|daemon_unix|EMER|/var/run/openvswitch/ovsdb-server.pid.tmp: create 
failed (No such file or directory)
May 30 00:14:17 debian ovs-ctl[21685]: ovsdb-server: 
/var/run/openvswitch/ovsdb-server.pid.tmp: create failed (No such file or 
directory)
May 30 00:14:17 debian ovs-ctl[21685]: Starting ovsdb-server ... failed!
May 30 00:14:17 debian systemd[1]: openvswitch-nonetwork.service: Main process 
exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited

I noticed that the supplied init script does not seem to create the required
directory under /run. Maybe something else is amiss as well, but after I
created the directory manually, openvswitch-switch started normally.


Cheers,
Toni



-- System Information:
Debian Release: 10.4
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'proposed-updates'), (90, 'testing'), (70, 
'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-9-amd64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages openvswitch-switch depends on:
ii  kmod                26-1
ii  lsb-base            10.2019051400
ii  netbase             5.6
ii  openvswitch-common  2.10.0+2018.08.28+git.8ca7c82b7d+ds1-12+deb10u2
ii  procps              2:3.3.15-2
ii  python              2.7.16-1
ii  uuid-runtime        2.33.1-0.1

openvswitch-switch recommends no packages.

openvswitch-switch suggests no packages.

-- Configuration Files:
/etc/init.d/openvswitch-switch changed:
(test -x /usr/sbin/ovs-vswitchd && test -x /usr/sbin/ovsdb-server) || exit 0
_SYSTEMCTL_SKIP_REDIRECT=yes
SYSTEMCTL_SKIP_REDIRECT=yes
. /lib/lsb/init-functions
. /usr/share/openvswitch/scripts/ovs-lib
test -e /etc/default/openvswitch-switch && . /etc/default/openvswitch-switch
set -vx
if [ ! -d /run/openvswitch ]; then
    mkdir /run/openvswitch
fi
network_interfaces () {
    INTERFACES="/etc/network/interfaces"
    [ -e "${INTERFACES}" ] || return
    bridges=`ifquery --allow ovs --list`
    [ -n "${bridges}" ] && $1 --allow=ovs ${bridges}
}
load_kmod () {
    ovs_ctl load-kmod || exit $?
}
start () {
    if [ ! -d /run/openvswitch ]; then
        mkdir /run/openvswitch
    fi
    if ovs_ctl load-kmod; then
        :
    else
        echo "Module has probably not been built for this kernel."
        echo "Please install Linux 3.3 or later with openvswitch kernel 
support."
        if test X"$OVS_MISSING_KMOD_OK" = Xyes; then
            # We're being invoked by the package postinst.  Do not
            # fail package installation just because the kernel module
            # is not available.
            exit 0
        fi
    fi
    set ovs_ctl ${1-start} --system-id=random
    if test X"$FORCE_COREFILES" != X; then
        set "$@" --force-corefiles="$FORCE_COREFILES"
    fi
    set "$@" $OVS_CTL_OPTS
    "$@" || exit $?
    if [ "$2" = "start" ] && [ "$READ_INTERFACES" != "no" ]; then
        network_interfaces ifup
    fi
}
stop () {
    [ "$READ_INTERFACES" != "no" ] && network_interfaces ifdown
    ovs_ctl stop
}
restart () {
    # OVS_FORCE_RELOAD_KMOD can be set by package postinst script.
    if [ "$1" = "--save-flows=yes" ] || \
        [ "${OVS_FORCE_RELOAD_KMOD}" = "no" ]; then
        start restart
    elif [ "${OVS_FORCE_RELOAD_KMOD}" = "yes" ]; then
        depmod -a
        if [ -e /sys/module/openvswitch ]; then
            LOADED_SRCVERSION=`cat /sys/module/openvswitch/srcversion \
                               2>/dev/null`
            LOADED_VERSION=`cat /sys/module/openvswitch/version \
                            2>/dev/null`
        elif [ -e /sys/module/openvswitch_mod ]; then
            LOADED_SRCVERSION=`cat /sys/module/openvswitch_mod/srcversion \
                               2>/dev/null`
            LOADED_VERSION=`cat /sys/module/openvswitch_mod/version \
                            2>/dev/null`
        fi
        SRCVERSION=`modinfo -F srcversion openvswitch 2>/dev/null`
        VERSION=`modinfo -F version openvswitch 2>/dev/null`
        ovs_ctl_log "Package upgrading:\n"\
                    "Loaded version: ${LOADED_VERSION} ${LOADED_SRCVERSION}.\n"\
                    "Version on disk: ${VERSION} ${SRCVERSION}."
        # If the kernel module was previously loaded and it is different than
        # the kernel module on disk, then do a 'force-reload-kmod'.
        if [ -n "${LOADED_SRCVERSION}" ] && [ -n "${SRCVERSION}" ] && \
            [ "${SRCVERSION}" != "${LOADED_SRCVERSION}" ]; then
            start force-reload-kmod
        else
            start restart
        fi
    else
        READ_INTERFACES="no" stop
        READ_INTERFACES="no" start
    fi
}
case $1 in
    start)
        start
        ;;
    stop | force-stop)
        stop
        ;;
    reload | force-reload)
        # The OVS daemons keep up-to-date.
        ;;
    restart)
        shift
        restart "$@"
        ;;
    status)
        ovs_ctl status
        exit $?
        ;;
    force-reload-kmod)
        start force-reload-kmod
        ;;
    load-kmod)
        load_kmod
        ;;
    *)
        echo "Usage: $0 
{start|stop|restart|force-reload|status|force-stop|force-reload-kmod|load-kmod}"
 >&2
        exit 1
        ;;
esac
exit 0


-- no debconf information

Reply via email to