This change adds a deploy step inject_files that adds a flexible way to inject files into the instance. Change-Id: I0e70a2cbc13744195c9493a48662e465ec010dbe Story: #2008611 Task: #41794
3.8 KiB
Built-in hardware managers
GenericHardwareManager
This is the default hardware manager for ironic-python-agent. It
provides support for hardware-inventory and the default deploy and clean
steps.
Deploy steps
deploy.write_image(node, ports, image_info, configdrive=None)-
A deploy step backing the
write_imagedeploy step of thedirect deploy interface <admin/interfaces/deploy.html#direct-deploy>. Should not be used explicitly, but can be overridden to provide a custom way of writing an image. deploy.erase_devices_metadata(node, ports)-
Erases partition tables from all recognized disk devices. Can be used with software RAID since it requires empty holder disks.
raid.apply_configuration(node, ports, raid_config, delete_existing=True)-
Apply a software RAID configuration. It belongs to the
raidinterface and must be used through theironic RAID feature <admin/raid.html>.
Injecting files
deploy.inject_files(node, ports, files, verify_ca=True)
This optional deploy step (introduced in the Wallaby release series)
allows injecting arbitrary files into the node. The list of files is
built from the optional inject_files property of the node
concatenated with the explicit files argument. Each item in
the list is a dictionary with the following fields:
path(required)-
An absolute path to the file on the target partition. All missing directories will be created.
partition-
Specifies the target partition in one of 3 ways:
- A number is treated as a partition index (starting with 1) on the root device.
- A path is treated as a block device path (e.g.
/dev/sda1or/dev/disk/by-partlabel/<something>. - If missing, the agent will try to find a partition containing the
first component of the
pathon the root device. E.g. for/etc/sysctl.d/my.conf, look for a partition containing/etc.
deleted-
If
True, the file is deleted, not created. Incompatible withcontent. content-
Data to write. Incompatible with
deleted. Can take two forms:- A URL of the content. Can use Python-style formatting to build a
node specific URL, e.g.
http://server/{node[uuid]}/{ports[0][address]}. - Base64 encoded binary contents.
- A URL of the content. Can use Python-style formatting to build a
node specific URL, e.g.
mode,owner,group-
Numeric mode, owner ID and group ID of the file.
dirmode-
Numeric mode of the leaf directory if it has to be created.
This deploy step is disabled by default and can be enabled via a
deploy template or via the ipa-inject-files-priority kernel
parameter.
Known limitations:
- Names are not supported for
ownerandgroup. - LVM is not supported.
Clean steps
deploy.erase_devices-
Securely erases all information from all recognized disk devices. Relatively fast when secure ATA erase is available, otherwise can take hours, especially on a virtual environment. Enabled by default.
deploy.erase_devices_metadata-
Erases partition tables from all recognized disk devices. Can be used as an alternative to the much longer
erase_devicesstep. deploy.erase_pstore-
Erases entries from pstore, the kernel's oops/panic logger. Disabled by default. Can be enabled via priority overrides.
raid.create_configuration-
Create a RAID configuration. This step belongs to the
raidinterface and must be used through theironic RAID feature <admin/raid.html>. raid.delete_configuration-
Delete the RAID configuration. This step belongs to the
raidinterface and must be used through theironic RAID feature <admin/raid.html>.