udev needs to be triggered if rules are written to a new file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| cloud-init |
Undecided
|
Robert Schweikert |
Bug Description
On a VM with many interfaces it is possible that udev is slow. This may lead to the situation that 70-persistent-
The user can already specify an optional rules file with the "netrules_path". However this will not have any effect when the file gets written as udev is not re-triggered. When the user configures a custom file (which logically should be something like 71-persistent-
Changed in cloud-init: | |
assignee: | nobody → Robert Schweikert (rjschwei) |
Changed in cloud-init: | |
status: | New → In Progress |
Robert Schweikert (rjschwei) wrote : | #2 |
Well, the way I see, based on investigation and input from others at SUSE we have 2 options. We can set the default file name for the netrules_path to something safe (80-pesistent-
If we stay with the current intend, i.e. netrules_path is configurable then we want the updates in MP.
I have no strong opinion either way.
The image used that created this problem does have persistent names and systemd, yes. It also has a "large" number of network interfaces.
The way the systemd dependencies are setup today cloud-init-
"After=
but I am not certain that will not create a cycle as cloud-init-
"Before=
If we can avoid cycles, then the best solution, IMHO, is the change in order in cloud-init-
Ryan Harper (raharper) wrote : | #3 |
I'm still a little confused around the presence of 75-persistent-
Putting that aside, I do think using a higher number (as you suggest 80-persistent-
I don't think we need to prevent netrules_path from being configured; in Ubuntu Xenial, we still utilize our on known value. You can be the path in your Distro class as part of the renderer config.
% git diff cloudinit/
diff --git a/cloudinit/
index 1bfe047..b48d40e 100644
--- a/cloudinit/
+++ b/cloudinit/
@@ -36,6 +36,8 @@ class Distro(
tz_local_fn = '/etc/localtime'
renderer_
+ 'netrules_path':
+ 'etc/udev/
Robert Schweikert (rjschwei) wrote : | #4 |
I have updated the code. The current implementation works in the customer case. Also should not call settle in general, only when we get into the situation where things are "racy".
But I am having difficulties sorting out the tests and could use some help. Ryan, Dan, can you help me with the tests?
Thanks
Robert Schweikert (rjschwei) wrote : | #5 |
Still need help with the tests, Ryan, Dan?
Thanks
Ryan Harper (raharper) wrote : Re: [Bug 1817368] Re: udev needs to be triggered if rules are written to a new file | #6 |
On Fri, May 31, 2019 at 10:56 AM Robert Schweikert <
<email address hidden>> wrote:
> Still need help with the tests, Ryan, Dan?
>
Thanks for the ping. We've not completely forgotten =)
Ryan
>
> Thanks
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> udev needs to be triggered if rules are written to a new file
>
> To manage notifications about this bug go to:
> https:/
>
This bug is fixed with commit b3a87fc0 to cloud-init on branch master.
To view that commit see the following URL:
https:/
Changed in cloud-init: | |
status: | Incomplete → Fix Committed |
This bug is believed to be fixed in cloud-init in version 19.2-1. If this is still a problem for you, please make a comment and set the state back to New
Thank you.
Changed in cloud-init: | |
status: | Fix Committed → Fix Released |
I think we're in conflict with 75-persistent- net-generator. rules; as both cloud-init and that rule are attempting to map a MAC and interface name. This is going to be trouble, as you've seen.
Even if we sorted the race, if users may be confused as to the two files, or the interleaved values etc.
Does the image have systemd and persistent net naming enabled?
In cases like this, cloud-init has introduced logic to check if an in-image file is present and renames, or deletes it if it's taking an expected action (like generating persistent net rules for network config it has discovered).