Comment 9 for bug 1528275

Revision history for this message
Albert Syriy (asyriy) wrote : Re: [Bug 1528275] Re: [ubuntu_bootstrap] Sometimes discovered slave is unavailable via SSH

You are correct, udev comes when interface has been up (activated).
There is a moment at live-boot when file system has been mounted and
interfaces' config files are formed.
At that time interfaces could be renamed easily, but udev rules are called
much more later.

Don't think it's a good idea take from non-LTS distributive systemd. It's
not stable enough yet.

Albert Syriy,

Software Engineer,
Mirantis

On Tue, Dec 22, 2015 at 3:17 PM, Artem Panchenko <email address hidden>
wrote:

> >The udev events (to rename interfaces) are sent too late, when all
> services have been started and running and when the interface eth0 is
> up.
>
> yes, networking is started simultaneously with udev and it's a problem,
> but it could be easily fixed by patching upstart config. I just modified
> '/etc /init/networking.conf' and configured it to 'start on (started
> udev)' to fix that. However it doesn't solve interfaces naming issue,
> according to the logs I see that kernel (e1000 driver) sets 'eth0' up
> (probably due to network boot) before udev is started , so it is unable
> to rename it. I thought that newer udev (not only its rules, but also
> the code) could handle such situations and rename enabled interfaces too
> (there are a bunch of bugs about that in 15.04/15.10, for example bug
> #1473542). But maybe I'm wrong.
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1528275
>
> Title:
> [ubuntu_bootstrap] Sometimes discovered slave is unavailable via SSH
>
> Status in Fuel for OpenStack:
> Confirmed
>
> Bug description:
> Sometimes discovered slave nodes are unavailable via SSH, because the
> daemon is stopped (see attached screenshot). I happens because SSH is
> restarted when network interface state is changed. Currently we have a
> hack in our Ubuntu bootstrap for enabling predictable interface naming
> (which is not fully supported by Ubuntu 14.04) - we perform `ifdown
> eth0` on startup and re-trigger udev events:
>
> https://github.com/openstack/fuel-
> agent/commit/2f18b7596bc7da79d2f28c34f42620b2090d8a35
>
> According to the logs it causes SSH daemon failure:
>
> syslog:
>
> 2015-12-21T12:19:22Z notice let-rename[1074]: The old interface name is
> eth0
> 2015-12-21T12:19:22Z notice let-rename[1075]: The MAC address of the
> interface is 64:4d:0c:1e:26:2b
> 2015-12-21T12:19:22Z warning kernel: [ 10.267017] init:
> network-interface (eth0) pre-start process (523) killed by TERM signal
> ...
> 2015-12-21T12:19:22Z info kernel: [ 10.436180] systemd-udevd[501]:
> renamed network interface eth0 to enp0s3
> 2015-12-21T12:19:22Z notice let-rename[1195]: New interface name is
> enp0s3
>
> auth.log:
>
> 2015-12-21T12:19:22Z info sshd[786]: Server listening on 0.0.0.0 port
> 22.
> 2015-12-21T12:19:22Z info sshd[786]: Server listening on :: port 22.
> 2015-12-21T12:19:22Z info sshd[786]: Received signal 15; terminating.
>
> I tried to reproduce it manually on already bootstrapped node
> (restarted enp0s3 interface a lot of times), but with no luck - SSH
> daemon hasn't died. So I believe we get some kind of race condition
> while disabling network interface on startup. IMHO we could try to
> backport 'udev' from Ubuntu vivid (which seems supports predictable
> interface naming) and configure upstart to run 'networking' after
> 'udev' in order to get rid from 'let-rename'. If it doesn't work, then
> one more hack is needed in rc.local - check that SSH is running.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/fuel/+bug/1528275/+subscriptions
>