[systemd-devel] sshd.service fails on boot when primary listener is a bridge (br0) instead of real interface (eth0). What dependency is needed?

lyndat3 at your-mail.com lyndat3 at your-mail.com
Fri Apr 10 15:52:13 PDT 2015


My /etc/systemd/system/sshd.service has a

  After=network-online.target

dependency.

When my ethernet interface, eno1, is the primary 'net listener,

	cat /etc/sysconfig/network/ifcfg-eno1
		STARTMODE='auto'  
		BOOTPROTO='static'
		IPADDR='192.168.1.1/24'

sshd, listening on 192.168.1.1, has no problems on boot.

But, if I switch to using a bridge interface, br0, with eno1 as the real interface assigned to it,

	cat /etc/sysconfig/network/ifcfg-eno1 
		STARTMODE='auto'
		BOOTPROTO='none'

	cat /etc/sysconfig/network/ifcfg-br0
		STARTMODE='auto'
		BOOTPROTO='static'
		BRIDGE='yes'
		BRIDGE_PORTS='eno1'
		IPADDR0='192.168.1.1/24'

sshd fails on boot

	journalctl -b | grep -i sshd
		...
		Apr 10 15:30:49 xen01 sshd[1345]: error: Bind to port 22 on 192.168.1.1 failed: Cannot assign requested address.
		...

Apparently, network-online waits for *real* interfaces only.

Once at the shell, br0 is fully up.  sshd can be started, and it functions normally.

What dependency do I need to add to my sshd unit to get it to wait for br0 being fully up?

LT



More information about the systemd-devel mailing list