diff options
author | James Falcon <james.falcon@canonical.com> | 2021-10-27 09:43:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 08:43:34 -0600 |
commit | 1d01da5d9916d97ef463ba61a36b3f98f8911419 (patch) | |
tree | 1022c172c252082a02f89d0e54a42221dabc1851 /cloudinit/cmd | |
parent | 75b26b0afbb14cf613fe3b08c8bed050dec0b874 (diff) | |
download | vyos-cloud-init-1d01da5d9916d97ef463ba61a36b3f98f8911419.tar.gz vyos-cloud-init-1d01da5d9916d97ef463ba61a36b3f98f8911419.zip |
Add "install hotplug" module (SC-476) (#1069)
This commit removes automatically installing udev rules for hotplug
and adds a module to install them instead.
Automatically including the udev rules and checking if hotplug was
enabled consumed too many resources in certain circumstances. Moving the
rules to a module ensures we don't spend extra extra cycles on hotplug
if hotplug functionality isn't desired.
LP: #1946003
Diffstat (limited to 'cloudinit/cmd')
-rw-r--r-- | cloudinit/cmd/devel/hotplug_hook.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cloudinit/cmd/devel/hotplug_hook.py b/cloudinit/cmd/devel/hotplug_hook.py index d4f0547e..f6f36a00 100644 --- a/cloudinit/cmd/devel/hotplug_hook.py +++ b/cloudinit/cmd/devel/hotplug_hook.py @@ -8,6 +8,7 @@ import time from cloudinit import log from cloudinit import reporting +from cloudinit import stages from cloudinit.event import EventScope, EventType from cloudinit.net import activators, read_sys_net_safe from cloudinit.net.network_state import parse_net_config_data @@ -164,7 +165,9 @@ def is_enabled(hotplug_init, subsystem): subsystem) ) from e - return hotplug_init.update_event_enabled( + return stages.update_event_enabled( + datasource=hotplug_init.datasource, + cfg=hotplug_init.cfg, event_source_type=EventType.HOTPLUG, scope=scope ) |