#1741 Issue closed: BUG in /usr/share/rear/rescue/GNU/Linux/310_network_devices.sh line 306:'Unexpected operational state 'unknown' for 'vnet0'.'

Labels: support / question, fixed / solved / done

slowguitar opened issue at 2018-02-27 10:02:

Dear all,

first: great Software! thanks for your work!

if i run rear on host with KVM this obove message appear.

Workaround

306        # BugError "Unexpected operational state '$state' for '$network_interface'."
307         echo "Unexpected operational state '$state' for '$network_interface'."

in file /usr/share/rear/rescue/GNU/Linux/310_network_devices.sh

I have test recovery; working fine with Workaround.

root@alpha:/etc/rear# /usr/sbin/rear -V
Relax-and-Recover 2.3-git.0.4e40a7b.unknown.changed / 2018-01-24

root@alpha:/etc/rear# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

root@alpha:/etc/rear# cat /etc/rear/local.conf
OUTPUT=ISO
BACKUP=NETFS
ISO_ISOLINUX_BIN=/usr/bin/syslinux
BACKUP_OPTIONS="rw,nfsvers=3,nolock"
NETFS_URL=nfs://192.168.200.20/backup/images
NETFS_PREFIX=/$(hostname)/
ISO_PREFIX=$(hostname)
BACKUP_PROG_EXCLUDE=('/tmp/*')

snip from logfile:

++ echo '2018-02-27 10:47:23.023952097 br0 has lower interface vnet0'
2018-02-27 10:47:23.023952097 br0 has lower interface vnet0
++ test 1
++ Print 'br0 has lower interface vnet0'
++ test 1
++ echo -e 'br0 has lower interface vnet0'
++ is_interface_up vnet0
++ local network_interface=vnet0
++ local sysfspath=/sys/class/net/vnet0
+++ cat /sys/class/net/vnet0/operstate
++ local state=unknown
++ '[' unknown = down ']'
++ '[' unknown = up ']'
++ BugError 'Unexpected operational state '\''unknown'\'' for '\''vnet0'\''.'
+++ CallerSource
+++ local this_script=/usr/share/rear/lib/_input-output-functions.sh
+++ local caller_source=/usr/share/rear/lib/_input-output-functions.sh
+++ local caller_source_lineno=298
+++ test /usr/share/rear/lib/_input-output-functions.sh = /usr/share/rear/lib/_input-output-functions.sh
+++ caller_source=/usr/share/rear/rescue/GNU/Linux/310_network_devices.sh
+++ caller_source_lineno=306
+++ test /usr/share/rear/rescue/GNU/Linux/310_network_devices.sh = /usr/share/rear/lib/_input-output-functions.sh
+++ test /usr/share/rear/rescue/GNU/Linux/310_network_devices.sh
+++ echo '/usr/share/rear/rescue/GNU/Linux/310_network_devices.sh line 306'
+++ return 0
++ local 'caller_source=/usr/share/rear/rescue/GNU/Linux/310_network_devices.sh line 306'
++ Error '

jsmeix commented at 2018-02-27 10:34:

This is a duplicate of
https://github.com/rear/rear/issues/1701
which is meanwhile fixed via some commits
in current ReaR GitHub upstream master code.

FYI:
How you could use the current ReaR GitHub master code:

Basically "git clone" it into a separated directory and then
configure and run ReaR from within that directory like:

# git clone https://github.com/rear/rear.git

# mv rear rear.github.master

# cd rear.github.master

# vi etc/rear/local.conf

# usr/sbin/rear -D mkbackup

Note the relative paths "etc/rear/" and "usr/sbin/".

gdha commented at 2018-02-27 11:30:

@slowguitar If you could confirm that with the latest git version it works that would be nice? Thank you.


[Export of Github issue for rear/rear.]