You are not logged in.

#1 2013-05-01 02:06:16

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,298
Website

[solved] systemd refuses to let go of old interface name

I'm installing a fresh system, trying to do everything the "new" way but systemd isn't making it easy for me to like it.

One thing I refuse to use is "persistent" network naming; so I created the symlink to /dev/null in /etc/udev/rules.d/80-net-name-slot.rules

That's all fine, the interface is now eth0 as it should be. I updated my netctl config to use eth0 as the interface, but systemd refuses to let go:

After issuing 'netctl start natures-adm', I get this error:

May 01 11:59:20 apoc.example.com systemd[1]: Job sys-subsystem-net-devices-enp9s0.device/start timed out.
May 01 11:59:20 apoc.example.com systemd[1]: Timed out waiting for device sys-subsystem-net-devices-enp9s0.device.
May 01 11:59:20 apoc.example.com systemd[1]: Dependency failed for A basic dhcp ethernet connection.

According to the error, systemd is being too smart for it's own good and waiting for the old enp9s0 interface, which never comes because it's now eth0 (which is ready and waiting).

[root@apoc ~]# cat /etc/netctl/natures-adm 
Description='A basic dhcp ethernet connection'
Interface=eth0
Connection=ethernet
IP=dhcp
## for DHCPv6
IP6=dhcp
## for IPv6 autoconfiguration
#IP6=stateless

So how do I tell systemd to do what netctl is expecting instead of second guessing everything?

===EDIT===
It appears systemd is "holding on" due to this file: /etc/systemd/system/netctl\@natures\\x2dadm.service
Is this "normal"?

Last edited by fukawi2 (2013-05-01 04:57:38)

Offline

#2 2013-05-01 04:07:48

sullivanva
Member
From: Herndon, VA USA
Registered: 2005-07-21
Posts: 126

Re: [solved] systemd refuses to let go of old interface name

I ran into the same issue with the - being translated into \\x2d.  You have to disable that and rename your file from natures-adm to natures_adm.

I wish I could tell you for certain how I disabled the old one, but I don't remember exactly.  I installed systemd-ui from AUR, and was able to select the mangled name and disable it, but it crashes.  You also have to systemctl daemon-reload, and then reboot.


--HAPS

Offline

#3 2013-05-01 04:57:28

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,298
Website

Re: [solved] systemd refuses to let go of old interface name

That's a bit.... immature. But OK, I've renamed all my profiles to have no hyphens or underscores. Thank-you. Seems to be working OK now neutral

Last edited by fukawi2 (2013-05-01 04:57:53)

Offline

#4 2013-05-01 05:13:24

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [solved] systemd refuses to let go of old interface name

fukawi2 wrote:

That's a bit.... immature.

Immature?

Offline

#5 2013-05-01 05:16:35

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,298
Website

Re: [solved] systemd refuses to let go of old interface name

WonderWoofy wrote:
fukawi2 wrote:

That's a bit.... immature.

Immature?

systemd (?) can't handle a hyphen.... That's something pretty basic.

Offline

#6 2013-05-01 05:24:07

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [solved] systemd refuses to let go of old interface name

Read the docs.  Hyphens are treated in a special way, and mean something very specific.

I know you hate systemd, you have said as much many many times.  But please read the docs before making these assumptions that it must suck.


Edit: I just thought there was someting in the response above that post that somehow offended you.  This statement makes a bit more sense now.

Last edited by WonderWoofy (2013-05-01 05:25:01)

Offline

#7 2013-05-01 05:25:30

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,298
Website

Re: [solved] systemd refuses to let go of old interface name

I'm not going to argue, we don't agree, but that's fine. Your suggestion is duly noted though.

EDIT: As per my first post, I am trying to figure out systemd and trying to like it, but it really makes it hard to.

Last edited by fukawi2 (2013-05-01 05:29:13)

Offline

#8 2013-05-03 17:28:27

sullivanva
Member
From: Herndon, VA USA
Registered: 2005-07-21
Posts: 126

Re: [solved] systemd refuses to let go of old interface name

Part of the problem is that the netctl examples have the - in them.  If you follow the netctl wiki it doesn't warn you.  Not a big deal in the end.


--HAPS

Offline

#9 2013-05-03 17:52:31

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [solved] systemd refuses to let go of old interface name

sullivanva wrote:

Part of the problem is that the netctl examples have the - in them.  If you follow the netctl wiki it doesn't warn you.  Not a big deal in the end.

Please feel free to edit the wiki and add the relevant information.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#10 2013-05-03 18:27:27

Raynman
Member
Registered: 2011-10-22
Posts: 1,094

Re: [solved] systemd refuses to let go of old interface name

fukawi2 wrote:

===EDIT===
It appears systemd is "holding on" due to this file: /etc/systemd/system/netctl\@natures\\x2dadm.service
Is this "normal"?

This was a service file corresponding to your old natures-adm profile mentioning enp9s0? Then either you forgot to update a service file you created, or netctl generated it (so you were not aware it was created) without cleaning it up. You should blame yourself or netctl (which is still in beta), respectively.

sullivanva linked your problem to encoded hyphens, without really explaining the connection. It seems unlikely that this really is the cause. Or a part of netctl responsible for generating service files fails to take this encoding into account, but I think netctl users are also expected to understand the correspondence between service files and profiles and be able manage them.

Last edited by Raynman (2013-05-03 18:30:47)

Offline

#11 2013-05-05 23:51:54

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,298
Website

Re: [solved] systemd refuses to let go of old interface name

Raynman wrote:

This was a service file corresponding to your old natures-adm profile mentioning enp9s0? Then either you forgot to update a service file you created, or netctl generated it (so you were not aware it was created) without cleaning it up. You should blame yourself or netctl (which is still in beta), respectively.

netctl created it; after creating a new profile (without hyphens) that file was gone anyway.

I have since read through all of the (published) "how to" docs from Lennart about systemd. Some things make more sense, but no explanation about why a hyphen should be special.

Offline

#12 2013-05-07 00:51:23

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [solved] systemd refuses to let go of old interface name

The info about the special treatment of hyphens can be found on the systemd.mount man page in the description section.

Offline

Board footer

Powered by FluxBB