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
MGMT-16273: Allow installing on iSCSI disks on OCI #5728
MGMT-16273: Allow installing on iSCSI disks on OCI #5728
Conversation
@avishayt: This pull request references MGMT-16273 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.15.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/hold WIP |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #5728 +/- ##
==========================================
+ Coverage 67.93% 68.02% +0.09%
==========================================
Files 233 233
Lines 34391 34338 -53
==========================================
- Hits 23362 23357 -5
+ Misses 8954 8915 -39
+ Partials 2075 2066 -9
|
381e8c8
to
92ccb40
Compare
92ccb40
to
15dbe56
Compare
15dbe56
to
22b19a6
Compare
if disk.DriveType == models.DriveTypeMultipath { | ||
installerArgs = append(installerArgs, "--append-karg", "root=/dev/disk/by-label/dm-mpath-root", "--append-karg", "rw", "--append-karg", "rd.multipath=default") | ||
} else if disk.DriveType == models.DriveTypeISCSI { | ||
installerArgs = append(installerArgs, "--append-karg", "rd.iscsi.firmware=1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this PR looks like it's adding generic support for iSCSI on bare metal, I will mention here that auto-configuration via iBFT (used by rd.iscsi.firmware
) is not always a given. The other way iSCSI configuration is provided is via netroot=iscsi:...
(see dracut.cmdline(7)).
If we want to provide a nice UX for it, we could provide separate fields for e.g. server name, target name, initiator name, etc... and assemble the netroot
karg ourselves. This is similar to what blivet (Anaconda storage backend) does: https://github.com/storaged-project/blivet/blob/57f1382f19a1390dd2176e4f4772bab89380cfdf/blivet/devices/disk.py#L379-L394.
Alternatively, if the UX allows users to provide custom kargs, then we could skip this for now and users can always directly provide the netroot
karg themselves as an escape hatch (and having rd.iscsi.firmware=1
still hardcoded shouldn't hurt, though this code could also auto-detect if one of the custom kargs is netroot
and skip it I guess).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users can provides custom kargs to the installer though the API (https://github.com/openshift/assisted-service/blob/master/docs/user-guide/install-customization.md#set-the-installer-params). Maybe we can add a word about customizing iSCSI settings in our doc in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good point about generic support. I'll make this PR focused on OCI. We can explore generic support in the future if there is demand for it.
/test edge-e2e-oci-assisted |
/test edge-e2e-metal-assisted edge-e2e-oci-assisted |
22b19a6
to
1f120d2
Compare
@avishayt: This pull request references MGMT-16273 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.15.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1f120d2
to
4fb6988
Compare
Allow booting from iSCSI for x86_64 OpenShift versions at least 4.15.0 on the OCI platform.
4fb6988
to
200b930
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit, otherwise it looks good
@@ -147,8 +157,8 @@ func (v *validator) DiskIsEligible(ctx context.Context, disk *models.Disk, infra | |||
return notEligibleReasons, nil | |||
} | |||
|
|||
func (v *validator) IsValidStorageDeviceType(disk *models.Disk, hostArchitecture string) bool { | |||
return funk.ContainsString(v.getValidDeviceStorageTypes(hostArchitecture), string(disk.DriveType)) | |||
func (v *validator) IsValidStorageDeviceType(disk *models.Disk, hostArchitecture string, openshiftVersion string, ociPlatformType bool) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func (v *validator) IsValidStorageDeviceType(disk *models.Disk, hostArchitecture string, openshiftVersion string, ociPlatformType bool) bool { | |
func (v *validator) IsValidStorageDeviceType(disk *models.Disk, hostArchitecture string, openshiftVersion string, isISCSIEnabled bool) bool { |
nit: Even though this change is specific to oci, I would prefer to make the intention of this parameter clearer for this function and in getValidDeviceStorageTypes
. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's OK for now. The next big change to this code will probably be when iSCSI support will be generic, and this parameter will be removed.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adriengentil, avishayt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
/test edge-e2e-metal-assisted |
1 similar comment
/test edge-e2e-metal-assisted |
@avishayt: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
[ART PR BUILD NOTIFIER] This PR has been included in build ose-agent-installer-api-server-container-v4.15.0-202311280949.p0.gc6ba398.assembly.stream for distgit ose-agent-installer-api-server. |
Allow booting from iSCSI for x86_64 OpenShift versions at least 4.15.0 on the OCI platform.
List all the issues related to this PR
What environments does this code impact?
How was this code tested?
Checklist
docs
, README, etc)Reviewers Checklist