Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 580846 - net-misc/netifrc udev helper net.sh tries to run openrc init scripts when booted with systemd
Summary: net-misc/netifrc udev helper net.sh tries to run openrc init scripts when boo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: netifrc Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-22 15:23 UTC by cronolio
Modified: 2016-10-20 06:32 UTC (History)
3 users (show)

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


Attachments
full journalctl -b output (journalctl -b.txt,62.60 KB, text/plain)
2016-04-22 15:23 UTC, cronolio
Details
full journalctl -b output (journalctl -b.txt,85.20 KB, text/plain)
2016-04-22 15:31 UTC, cronolio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cronolio 2016-04-22 15:23:01 UTC
Created attachment 431544 [details]
full journalctl -b output

today i update to sys-apps/gentoo-systemd-integration-6 and now into my log 
/etc/init.d/net.eth0[223]: net.eth0: not allowed to be hotplugged
systemd-udevd[180]: Process 'net.sh eth0 start' failed with exit code 1.
systemd-udevd[177]: Process 'net.sh wlan0 start' failed with exit code 1.
systemd-udevd[172]: Process '/usr/sbin/alsactl restore 0' failed with exit code 99.

now systemd handle openrc sript? how it setup?

emerge --info
Portage 2.2.26 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.3, glibc-2.22-r4, 4.5.2-gentoo x86_64)
=================================================================
System uname: Linux-4.5.2-gentoo-x86_64-Intel-R-_Celeron-R-_CPU_1037U_@_1.80GHz-with-gentoo-2.2
KiB Mem:     1881072 total,    386704 free
KiB Swap:    3145724 total,   3145724 free
Timestamp of repository gentoo: Fri, 22 Apr 2016 12:30:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=ivybridge -O2 -pipe -fomit-frame-pointer -mno-aes -mno-avx -mno-rdrnd -mno-f16c"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=ivybridge -O2 -pipe -fomit-frame-pointer -mno-aes -mno-avx -mno-rdrnd -mno-f16c"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
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"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac aacplus acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli colord cpudetection cracklib crypt cxx dbus dri dts dvd dvdr eds emboss encode evo exif faac fam ffmpeg firefox flac gdbm gif glamor gnome gnome-keyring gnome-online-accounts gstreamer gtk gtk3 iconv introspection ipv6 jpeg kdbus lcms libnotify libsecret lzma mad mmx mmxext mng modplug modules mp3 mp4 mpeg multilib musepack mysqli nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio rar readline sdl seccomp session spell sse sse2 sse3 ssl ssse3 startup-notification svg systemd theora tiff toolame touchscreen tracker truetype twolame udev udisks unicode upower usb v4l vdpau vorbis vpx wavpack wxwidgets x264 x265 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru ru_RU" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="i915 i965 intel modesetting" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 cronolio 2016-04-22 15:31:51 UTC
Created attachment 431554 [details]
full journalctl -b output
Comment 2 Mike Gilbert gentoo-dev 2016-04-22 16:43:46 UTC
This is in no way related to sys-apps/gentoo-systemd-integration-6. Updating summary.
Comment 3 cronolio 2016-04-22 17:35:58 UTC
you're coommit remove problem with "Process 'net.sh eth0 start' failed with exit code 1", but "systemd-udevd[179]: Process '/usr/sbin/alsactl restore 0' failed with exit code 99" still stay
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-04-22 17:37:16 UTC
netifrc DOES support systemd, that was the entire point of one of the GSOC2014 projects: https://wiki.gentoo.org/wiki/User:Rabisg/GSOC_14

https://github.com/gentoo/netifrc-systemd/commit/fd35d33e072ff9c91e23aa53d433e6184e8897e6

So I need some clarification, what fired the netifrc scripts? Was it systemd or a udev rule?
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2016-04-22 17:50:16 UTC
(In reply to Robin Johnson from comment #4)
> netifrc DOES support systemd, that was the entire point of one of the
> GSOC2014 projects: https://wiki.gentoo.org/wiki/User:Rabisg/GSOC_14
> 
> https://github.com/gentoo/netifrc-systemd/commit/
> fd35d33e072ff9c91e23aa53d433e6184e8897e6
> 
> So I need some clarification, what fired the netifrc scripts? Was it systemd
> or a udev rule?


FYI, Due to floppym's suggestion I already merged the commit into netifrc master..  

Back to the issue at hand, IIRC net.sh is the wrapper script that the udev rule calls, isn't it?  There isn't anything else it's used for is there?
Comment 6 Mike Gilbert gentoo-dev 2016-04-22 17:51:38 UTC
(In reply to Robin Johnson from comment #4)
> netifrc DOES support systemd, that was the entire point of one of the
> GSOC2014 projects: https://wiki.gentoo.org/wiki/User:Rabisg/GSOC_14
> 
> https://github.com/gentoo/netifrc-systemd/commit/
> fd35d33e072ff9c91e23aa53d433e6184e8897e6
> 
> So I need some clarification, what fired the netifrc scripts? Was it systemd
> or a udev rule?

That systemd support was sort of half-working.

The udev helper was never adjusted to properly work with systemd.
Comment 7 Ian Stakenvicius (RETIRED) gentoo-dev 2016-04-22 17:52:03 UTC
Also, for clarification, do I assume correctly that this is a system that has both systemd and openrc installed, perhaps in some sort of dual-boot situation?
Comment 8 Mike Gilbert gentoo-dev 2016-04-22 17:54:38 UTC
(In reply to salikov.alexey from comment #3)
> you're coommit remove problem with "Process 'net.sh eth0 start' failed with
> exit code 1", but "systemd-udevd[179]: Process '/usr/sbin/alsactl restore 0'
> failed with exit code 99" still stay

That's an alsa-related bug. Create a separate report for it.
Comment 9 Mike Gilbert gentoo-dev 2016-04-22 17:55:42 UTC
(In reply to Ian Stakenvicius from comment #7)
> Also, for clarification, do I assume correctly that this is a system that
> has both systemd and openrc installed, perhaps in some sort of dual-boot
> situation?

Yes. systemd and openrc are usually installed concurrently due to sys-apps/openrc being in @system.
Comment 10 Mike Gilbert gentoo-dev 2016-04-22 18:00:57 UTC
(In reply to Mike Gilbert from comment #6)
> That systemd support was sort of half-working.
> 
> The udev helper was never adjusted to properly work with systemd.

To expand on this: the systemd unit might work when manually enabled and started at boot.

There is currently nothing in place to make it work properly when devices are hotplugged.

udev_helper/net.sh implements the hotplug support for openrc; it would need to be adjusted to work under systemd.

I do not personally care about making netifrc hotplug work under systemd, but if someone else wants to make it work feel free. Just make sure you make it opt-in; it should not be enabled by default.
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-04-22 18:07:16 UTC
rabisg:
Are you around still, can you comment and/or add that hotplug piece?
Comment 12 Joakim Tjernlund 2016-04-27 20:50:48 UTC
It is also more than a year since there was a netifrc release ...
Comment 13 Richard Freeman gentoo-dev 2016-04-27 20:53:57 UTC
(In reply to Mike Gilbert from comment #9)
> (In reply to Ian Stakenvicius from comment #7)
> > Also, for clarification, do I assume correctly that this is a system that
> > has both systemd and openrc installed, perhaps in some sort of dual-boot
> > situation?
> 
> Yes. systemd and openrc are usually installed concurrently due to
> sys-apps/openrc being in @system.

Keep in mind the long-term plan of the openrc maintainers is to get it out of @system, so it wouldn't hurt to make that dependency explicit.