Skip to content

MGMT-18513: Add machine networks validation when iSCSI boot disk is in use - #6978

Merged
openshift-merge-bot[bot] merged 6 commits into
openshift:masterfrom
adriengentil:iscsi-machine-networks
Nov 13, 2024
Merged

openshift-merge-bot[bot] merged 6 commits into
openshift:masterfrom
adriengentil:iscsi-machine-networks

Conversation

@adriengentil

@adriengentil adriengentil commented Nov 8, 2024 •

Copy link
Copy Markdown
Contributor

In order to successfully install an OCP cluster using iSCSI boot disk,
we need to ensure that the machine networks doesn't belong the IP
addresses set on the network interface connected to the iSCSI
disk.

In a previous effort
(#6434), we ensured
that the iSCSI disk can be selected as installation disk only if the
machine has 2 network interfaces.

Example with SNO (same behavior with MNO+CMN), the iSCSI disk is connected through the subnet 192.168.11.0/24:
image
image

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 8, 2024
@openshift-ci

openshift-ci Bot commented Nov 8, 2024

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. api-review Categorizes an issue or PR as actively needing an API review. labels Nov 8, 2024
@openshift-ci

openshift-ci Bot commented Nov 8, 2024

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adriengentil

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 8, 2024
@adriengentil
adriengentil force-pushed the iscsi-machine-networks branch from 3b3391b to 0525314 Compare November 8, 2024 12:11
@adriengentil adriengentil changed the title iscsi machine networks MGMT-18513: Add machine networks validation when iSCSI boot disk is in use Nov 8, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 8, 2024
@openshift-ci-robot

openshift-ci-robot commented Nov 8, 2024 •

Copy link
Copy Markdown

@adriengentil: This pull request references MGMT-18513 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.18.0" version, but no target version was set.

Details

In response to this:

  • MGMT-18513: machine networks must not be part of iSCSI subnet
  • MGMT-18513: Add machine networks validation when iSCSI boot disk is in use

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot

openshift-ci-robot commented Nov 8, 2024 •

Copy link
Copy Markdown

@adriengentil: This pull request references MGMT-18513 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.18.0" version, but no target version was set.

Details

In response to this:

In order to successfully install an OCP cluster using iSCSI boot disk,
we need to ensure that the machine networks doesn't belong the IP
addresses set on the network interface connected to the iSCSI
disk.

In a previous effort
(#6434), we ensured
that the iSCSI disk can be selected as installation disk only if the
machine has 2 network interfaces.

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 openshift-eng/jira-lifecycle-plugin repository.

@adriengentil

Copy link
Copy Markdown
Contributor Author

/test edge-e2e-metal-assisted

@adriengentil
adriengentil force-pushed the iscsi-machine-networks branch from 0525314 to 2b4626f Compare November 8, 2024 13:55
@adriengentil

Copy link
Copy Markdown
Contributor Author

/test edge-lint edge-unit-test

@openshift-ci-robot

openshift-ci-robot commented Nov 8, 2024 •

Copy link
Copy Markdown

@adriengentil: This pull request references MGMT-18513 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.18.0" version, but no target version was set.

Details

In response to this:

In order to successfully install an OCP cluster using iSCSI boot disk,
we need to ensure that the machine networks doesn't belong the IP
addresses set on the network interface connected to the iSCSI
disk.

In a previous effort
(#6434), we ensured
that the iSCSI disk can be selected as installation disk only if the
machine has 2 network interfaces.

Example with SNO (same behavior with MNO+CMN), the iSCSI disk is connected through the subnet 192.168.11.0/24:
image
image

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 openshift-eng/jira-lifecycle-plugin repository.

@adriengentil

Copy link
Copy Markdown
Contributor Author

/test edge-e2e-metal-assisted

@codecov

codecov Bot commented Nov 8, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 97.10145% with 2 lines in your changes missing coverage. Please review.

Project coverage is 68.86%. Comparing base (e8321ae) to head (7843794).
Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
internal/network/utils.go 87.50% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6978      +/-   ##
==========================================
+ Coverage   68.82%   68.86%   +0.04%     
==========================================
  Files         251      251              
  Lines       37630    37684      +54     
==========================================
+ Hits        25897    25952      +55     
+ Misses       9416     9412       -4     
- Partials     2317     2320       +3     
Files with missing lines Coverage Δ
internal/host/hostcommands/install_cmd.go 86.28% <100.00%> (-0.39%) ⬇️
internal/host/refresh_status_preprocessor.go 94.39% <100.00%> (+0.07%) ⬆️
internal/host/statemachine.go 100.00% <100.00%> (ø)
internal/host/validation_id.go 90.90% <100.00%> (ø)
internal/host/validator.go 81.80% <100.00%> (+0.34%) ⬆️
internal/network/machine_network_cidr.go 60.59% <100.00%> (+4.92%) ⬆️
internal/network/utils.go 44.48% <87.50%> (+2.59%) ⬆️

... and 9 files with indirect coverage changes

@adriengentil
adriengentil force-pushed the iscsi-machine-networks branch from 2b4626f to 1d0ee57 Compare November 8, 2024 16:50
@openshift-ci openshift-ci Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 8, 2024
@adriengentil

Copy link
Copy Markdown
Contributor Author

/cc @rccrdpccl @AlonaKaplan @eifrach

@adriengentil
adriengentil marked this pull request as ready for review November 8, 2024 16:51
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 8, 2024
@openshift-ci
openshift-ci Bot requested a review from mlorenzofr November 8, 2024 16:51
…n use

In order to successfully install an OCP cluster using iSCSI boot disk,
we need to ensure that the machine networks doesn't belong the IP
addresses set on the network interface connected to the iSCSI
disk.

In a previous effort
(openshift#6434), we ensured
that the iSCSI disk can be selected as installation disk only if the
machine has 2 network interfaces.
@adriengentil
adriengentil force-pushed the iscsi-machine-networks branch from 1d0ee57 to 25d8677 Compare November 8, 2024 16:53
@rccrdpccl

Copy link
Copy Markdown
Contributor

/retest

Comment thread internal/host/validator.go Outdated
Comment thread internal/host/validations_test.go
Comment thread internal/host/validator.go Outdated
Comment thread swagger.yaml Outdated
Comment thread models/host_validation_id.go Outdated
HostValidationIDNoIPCollisionsInNetwork HostValidationID = "no-ip-collisions-in-network"

// HostValidationIDIscsiHostNetworkInterfaceDoesNotBelongToMachineCidr captures enum value "iscsi-host-network-interface-does-not-belong-to-machine-cidr"
HostValidationIDIscsiHostNetworkInterfaceDoesNotBelongToMachineCidr HostValidationID = "iscsi-host-network-interface-does-not-belong-to-machine-cidr"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really think that a short name will help here

Comment thread internal/host/validator.go Outdated
Comment thread internal/host/hostcommands/install_cmd.go Outdated
Comment thread internal/network/utils_test.go
Comment thread internal/network/utils_test.go
Comment thread internal/host/transition_test.go

@eifrach eifrach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Work, small changes just to make it easier to read / deubg

I also want you to add deubg output for the Expect I didn't comment on all of them.

Comment on lines 534 to 536

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's check if it's ClusterManagedNetworking retrun true
cause we allow only one network

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why? It was not there before?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore it - It OK
you can have different host network form ISCSI network

@adriengentil
adriengentil force-pushed the iscsi-machine-networks branch from 2965621 to 6f6bfc5 Compare November 12, 2024 14:57
@openshift-ci

openshift-ci Bot commented Nov 12, 2024

Copy link
Copy Markdown
Contributor

@adriengentil: all tests passed!

Full PR test history. Your PR dashboard.

Details

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-sigs/prow repository. I understand the commands that are listed here.

@rccrdpccl

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2024
@openshift-merge-bot
openshift-merge-bot Bot merged commit 086bd74 into openshift:master Nov 13, 2024
@openshift-bot

Copy link
Copy Markdown
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-agent-installer-api-server
This PR has been included in build ose-agent-installer-api-server-container-v4.18.0-202411131039.p0.g086bd74.assembly.stream.el9.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants