Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 682808 - sys-apps/openrc-0.38.3-r1 - show current network interfaces if network cannot be started
Summary: sys-apps/openrc-0.38.3-r1 - show current network interfaces if network cannot...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-07 09:30 UTC by Martin Mokrejš
Modified: 2019-04-07 13:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2019-04-07 09:30:56 UTC
Hi,
  my virtual machine is being moved from old to new host. It turned out we cannot predict new interface names.

If I boot up on the new hypervisor with net.ifnames=0 the following trick does not give me the future interface name (or at least, it seems to be unchanged):

# udevadm test /sys/class/net/eth0 2>/dev/null |grep ID_NET_NAME_
ID_NET_NAME_MAC=enx525400d73a09
ID_NET_NAME_PATH=enp0s3
#


From rc.log I see only:

rc default logging started at Sun Apr  7 04:04:37 2019

 * Bringing up interface enp0s3
 *   Caching network module dependencies
 *   ERROR: interface enp0s3 does not exist
 *   Ensure that you have loaded the correct kernel module for your hardware
 * ERROR: net.enp0s3 failed to start
 * Bringing up interface eth0
 *   xx.xx.xx.xx/24 ...
 [ ok ]
 *   xxxx::1/48 ...
 [ ok ]
 *   Adding routes
 *     default via xx.xx.xx.xx ...
 [ ok ]
 [ ok ]
 *     default via xxxx::fe ...
 [ ok ]
 [ ok ]
 *   Waiting for IPv6 addresses (5 seconds) .
 [ ok ]




What am I asking for:

1. openrc could try to use `biosdevname -i eth0` if installed and include that in console output, which I can read on VNC console and even later in /var/log/rc.log.

2. openrc could just list all `ifconfig -a` interfaces

3. arguably it could pick the wired eth interfaces if there is only a single choice. I anyway keep settings for net.eth0 and for net.enp3s0 in /etc/conf.d/net (setting smae IP addresses for both, supposedly eiother one will be picked up), have modified /etc/rc.conf to 'rc_depend_strict="NO"' so that whichever network interface comes up will allow additonal services to be started (like sshd). I ran "rc-update add net.eth0 default" and "rc-update add net.enp3s0 default".






# emerge -pv openrc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-apps/openrc-0.38.3-r1::gentoo  USE="ncurses netifrc pam unicode -audit -debug -newnet (-prefix) (-selinux) -static-libs" 0 KiB


# emerge --info
Portage 2.3.51 (python 2.7.14-final-0, default/linux/amd64/17.0/no-multilib/hardened, gcc-7.3.0, glibc-2.28-r5, 5.0.7 x86_64)
=================================================================
System uname: Linux-5.0.7-x86_64-QEMU_Virtual_CPU_version_2.5+-with-gentoo-2.6
KiB Mem:     2047500 total,   1211388 free
KiB Swap:     556028 total,    556028 free
Timestamp of repository gentoo: Sat, 06 Apr 2019 00:30:01 +0000
Head commit of repository gentoo: fef17a8d569a1fc18c54240f6e1b6135f70f2550
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.8::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r4::gentoo, 2.31.1-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE IBM-J1.6 skype-eula Nero-EULA-US AdobeFlash-10.3 skype-4.0.0.7-copyright AdobeFlash-11.x"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://ftp.fi.muni.cz/pub/linux/gentoo/ rsync://gentoo.mirror.dkm.cz/gentoo/ ftp://gentoo.mirror.web4u.cz/"
LANG="en_US.utf8"
LC_ALL="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US en_GB cs cz"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X amd64 apache apache2 berkdb bzip2 cairo cgi cli cracklib crypt cryptlib cxx dbus device-mapper dhcp emboss fontconfig fortran gbm gd gdbm geoip gnutls gpm hardened iconv innodb ipv6 java jce jpeg jpg keymap ladspa lapack lcms libnotify libtirpc mmx mysql mysqli ncurses nfs nls nptl nptlonly pam pcre pdf perl php pie png python readline resolvconf seccomp server session spf sqlite sse sse2 ssl ssp suexec svg syslog tcpd threads tiff truetype udev unicode usb vhosts vim-syntax x11 xattr xml xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="alias authz_host authz_user auth_basic auth_digest authn_core authz_core autoindex cgi cgid deflate dir env expires filter headers ident include info imagemap mem_cache mime mime_magic negotiation remoteip setenvif socache_shmcb status userdir vhost_alias rewrite usertrack cache file_cache disk_cache charset_lite log_config log_forensic unixd" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4a" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php-7.1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS