summaryrefslogtreecommitdiff
path: root/udev
Commit message (Collapse)AuthorAgeFilesLines
* Add "install hotplug" module (SC-476) (#1069)James Falcon2021-10-271-6/+0
| | | | | | | | | | | 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
* Initial hotplug support (#936)James Falcon2021-07-191-0/+6
| | | | | | | | | | | | | | | | | | Adds a udev script which will invoke a hotplug hook script on all net add events. The script will write some udev arguments to a systemd FIFO socket (to ensure we have only instance of cloud-init running at a time), which is then read by a new service that calls a new 'cloud-init devel hotplug-hook' command to handle the new event. This hotplug-hook command will: - Fetch the pickled datsource - Verify that the hotplug event is supported/enabled - Update the metadata for the datasource - Ensure the hotplugged device exists within the datasource - Apply the config change on the datasource metadata - Bring up the new interface (or apply global network configuration) - Save the updated metadata back to the pickle cache Also scattered in some unrelated typing where helpful
* azure: add udev rules to create cloud-init Gen2 disk name symlinksChad Smith2018-11-081-1/+17
| | | | | | | | | | | | | | | | | Cloud-init delivers udev rules on Azure to create the following symlinks: - /dev/disk/cloud/azure_root - /dev/disk/cloud/azure_root-part# - /dev/disk/cloud/azure_resource - /dev/disk/cloud/azure_resource-part# Cloud-init cc_disk_setup expects presence of these dev links in order to setup the mounted ephemeral disks. Gen1 instances udev rules match based only a DEVICE_ID attribute that no longer exists on Gen2 instances. Supplement existing Gen1 rules with matches on specitic SCSI target/lun path 0:0:0 and 0:0:1 and generate links for azure_root and azure_resource respectively. LP: #1797480
* remove blocking udev functionalityScott Moser2016-05-272-80/+0
| | | | | This didn't really work. See bug for more info. LP: #1577844
* improve how cloud-init-wait waitsScott Moser2016-03-291-8/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of sleep and check loop, use 'udevadm settle' to wait. since we run from a udev event, this is sufficient. udev settle will exit when either of a.) the file exists b.) the udev event queue has all been processed. c.) timeout is reached. Since cloud-init-wait is being run as a udev event, 'b' cannot be satisfied until it finishes. Thus, this essentially becomes a inotify based wait for the file /run/cloud-init/network-config-ready and no loops are needed.
| * improve how cloud-init-wait waitsScott Moser2016-03-281-8/+5
|/ | | | | | | | | | | | since we run from a udev event, this is sufficient. udev settle will exit when either of a.) the file exists b.) the udev event queue has all been processed. Since cloud-init-wait is being run as a udev event, 'b' cannot be satisfied until it finishes. Thus, this essentially becomes a inotify based wait for the file /run/cloud-init/network-config-ready and no loops are needed.
* fix creation of network-config-ready and dont bother waiting on loScott Moser2016-03-201-0/+4
|
* remove the 'find_name' function that was here.Scott Moser2016-03-181-18/+0
| | | | | | | I had left this in to commit it, it was my first pass at cloud-init doing the naming itself. That design was then replaced with the idea for cloud-init to instead write systemd.rules files.
* commit the systemd waiting mechanismScott Moser2016-03-183-18/+92
| | | | | | | Note, still broken as cloud-init local is not going to ever touch the CI_NET_READY file (/run/cloud-init/network-config-ready). So as this is , it will actually just block for 60 seconds and go on.
* add this, its getting moved, but i wanted some of the content storedScott Moser2016-03-181-0/+18
|
* Add udev rules for Azure ephemeral disks.Daniel Watkins2015-07-211-0/+18
And install them in the Debian packaging.