Skip to content

Commit

Permalink
OCPBUGS-48256: Run iscsiadm for agent-based iSCSI installations
Browse files Browse the repository at this point in the history
The agent-based installer currently runs iscsistart to ensure it
can boot off of an iSCSI target. However, in order to access the
final rhcos image written to the the target by coreos-installer,
iscsiadm must be run which will start iscsid. See
https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/managing_storage_devices/configuring-an-iscsi-initiator_managing-storage-devices#configuring-an-iscsi-initiator_managing-storage-devices
for more info.
  • Loading branch information
bfournie committed Jan 17, 2025
1 parent 358ca0f commit 4cebd5d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions data/data/agent/systemd/units/iscsiadm.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Ensure iscsid is started and iSCSI sessions are managed
After=iscsistart.service

[Service]
Type=oneshot
ExecStart=-/usr/sbin/iscsiadm -m session -P3

[Install]
WantedBy=multi-user.target
4 changes: 3 additions & 1 deletion docs/user/agent/agent-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ step is required because the agent-tui and nmstate libraries are too big to fit
* install-status - determines the current install status and writes it out to /etc/issue.d/
* apply-host-config - applies root device hints and roles specified in agent-config.yaml
* start-cluster-installation - calls assisted-service REST-API to start cluster installation when all hosts are in ready state and have passed validations
* iscsistart - calls the iscsistart utility which allows an iSCSI session to be started for booting off an iSCSI target
* iscsiadm - calls the iscsiadm utility that will start iscsid to manage the iSCSI session needed to install the final rhcos image

## Add-nodes workflow

Expand All @@ -47,4 +49,4 @@ agent-interactive-console service because the disk images generated in the facto
so no connectivity checks to the release image is needed.

* load-config-iso@ - detects the config image has been mounted and copies the cluster configuration files from the config image to the host. It also enables start-cluster-installation which is disabled by default in the unconfigured-ignition. The actual service is created when the config image is mounted as a device and its name will be load-config-iso@<dev-name>.service e.g [email protected]
* agent-check-config-image - if the config image has not been mounted, it displays a message to the console asking for the config image to be mounted in order to start the cluster installation.
* agent-check-config-image - if the config image has not been mounted, it displays a message to the console asking for the config image to be mounted in order to start the cluster installation.
Binary file modified docs/user/agent/agent_installer_services-install_workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pkg/asset/agent/image/ignition.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ func getDefaultEnabledServices() []string {
"oci-eval-user-data.service",
"iscsistart.service",
"set-hostname.service",
"iscsiadm.service",
}
}

Expand Down

0 comments on commit 4cebd5d

Please sign in to comment.