-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/udev hotplug #264
base: master
Are you sure you want to change the base?
Feat/udev hotplug #264
Conversation
After some verification the ifupdown2-hotplug should call [email protected] if systemd is running. This mean ifup must be fixed first and used in ifupdown2-hotplug. I'll mark this PR as Draft until this is done (it's working but not as it should). |
1334553
to
8b36229
Compare
* remove check_program of ifup/ifdown, as ifup/ifdown are provided in ifupdown2 package too. (this seems to originated from udev package https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809171)
Hi, I'm super busy until the end of the month (currently working on the release of proxmox 8). I'll do tests and review in 2 weeks. Thanks ! |
@sohorx You should remove hotplug managment in ifupdown2/sbin/start-networking.
|
8b36229
to
5fca81f
Compare
I moved the default/networking env file handling in both the [email protected] and ifupdown2-hotplug to get close to the current approach (adding -v -d to our ifup ifdown on hotplug). To avoid disrupting existing configurations, I had to reimplement the exclusions var to the ifupdown2-hotplug. However, this variable seems somewhat unnecessary as it excludes interfaces that are already filtered by the @julienfortin, I would appreciate your thoughts on this matter. |
5fca81f
to
ed43a0c
Compare
* [email protected] is be able to show debug and verbose logs if set in the default file. (-d -v) * ifupdown2-hotplug load default before processing (excluding EXCLUDE_INTERFACES and adding -v -d --syslog on an init.d system.
The PR is missing the following:
I'm running some test on it, if you can add that change in the meantime that would be great |
Hi Julien, As far as I can tell, there don't seem to be any issues with this line in the current state of the branch. This is what I'm seeing in my branch: if self.op != 'query' and not utils.lockFile(self.args.lockfile):
log.error("Another instance of this program is already running.")
return Status.Client.STATUS_ALREADY_RUNNING Am I overlooking anything? |
@sohorx ohh yes I see, my bad, i applied your patch on top of my private branch which didn't contain the previous lockfile changes! |
This pull request (PR) is the second part of the changes originating from #235 (Part 1: #263).
The objective of this PR is to reintroduce udev hotplug capabilities without causing any breaking changes.
Since ifupdown2 does not support concurrent calls, I had to implement a workaround.
I achieved this by using the flock command to wait and lock the file directly from the shell script. Then, I passed the fd to ifupdown2.
flock man page:
(Initially, I attempted to use fcntl for obtaining information, but the implementation diverged at some point.
https://stackoverflow.com/questions/29611352/what-is-the-difference-between-locking-with-fcntl-and-flock)
@aderumier, please feel free to create issues or provide comments. Your input is highly appreciated.
Here's what you can expect from these changes in terms of handling: