Skip to content
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

SPLAT-1811: Add vSphere multi disk support #1290

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vr4manta
Copy link
Contributor

@vr4manta vr4manta commented Sep 18, 2024

SPLAT-1811

Changes

  • Add logic for creating additional disks to new machines

Prerequisites

@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 Sep 18, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 18, 2024
Copy link
Contributor

openshift-ci bot commented Sep 18, 2024

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

Copy link
Contributor

openshift-ci bot commented Sep 18, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign radekmanak for approval. For more information see the Kubernetes Code Review Process.

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

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-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 18, 2024
@vr4manta vr4manta force-pushed the vsphere_disk branch 3 times, most recently from a542288 to b05d938 Compare September 18, 2024 16:55
@vr4manta vr4manta changed the title WIP: Vsphere disk SPLAT-1811: Vsphere disk Sep 23, 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 Sep 23, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 23, 2024

@vr4manta: This pull request references SPLAT-1811 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.

In response to this:

SPLAT-1811

Changes

  • Add logic for creating additional disks to new machines

Prerequisites

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.

@vr4manta vr4manta changed the title SPLAT-1811: Vsphere disk SPLAT-1811: Add vSphere multi disk support Sep 23, 2024
@vr4manta
Copy link
Contributor Author

/test all

Copy link
Contributor

openshift-ci bot commented Sep 23, 2024

@vr4manta: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-metal-ipi-virtualmedia da0d90c link false /test e2e-metal-ipi-virtualmedia
ci/prow/e2e-gcp-operator da0d90c link false /test e2e-gcp-operator
ci/prow/e2e-vsphere-ovn da0d90c link false /test e2e-vsphere-ovn
ci/prow/e2e-azure-operator da0d90c link false /test e2e-azure-operator
ci/prow/e2e-metal-ipi da0d90c link false /test e2e-metal-ipi
ci/prow/e2e-nutanix da0d90c link false /test e2e-nutanix
ci/prow/e2e-aws-ovn-upgrade da0d90c link true /test e2e-aws-ovn-upgrade
ci/prow/e2e-vsphere-ovn-upgrade da0d90c link false /test e2e-vsphere-ovn-upgrade
ci/prow/e2e-aws-operator da0d90c link true /test e2e-aws-operator
ci/prow/e2e-metal-ipi-upgrade da0d90c link false /test e2e-metal-ipi-upgrade
ci/prow/e2e-vsphere-ovn-serial da0d90c link false /test e2e-vsphere-ovn-serial
ci/prow/e2e-metal-ipi-ovn-dualstack da0d90c link false /test e2e-metal-ipi-ovn-dualstack
ci/prow/e2e-openstack da0d90c link false /test e2e-openstack
ci/prow/e2e-azure-ovn da0d90c link false /test e2e-azure-ovn
ci/prow/e2e-gcp-ovn da0d90c link false /test e2e-gcp-ovn
ci/prow/e2e-metal-ipi-ovn-ipv6 da0d90c link false /test e2e-metal-ipi-ovn-ipv6
ci/prow/e2e-aws-ovn da0d90c link true /test e2e-aws-ovn
ci/prow/e2e-vsphere-operator da0d90c link false /test e2e-vsphere-operator

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

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 24, 2024
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

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.

Comment on lines 464 to 465
// Currently, MAPI does not provide any API knobs to configure additional volumes for a VM.
// So, we are expecting the VM to have only one disk, which is OS disk.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment will need to be updated

func getAdditionalDiskSpecs(s *machineScope, devices object.VirtualDeviceList, datastore *object.Datastore) ([]types.BaseVirtualDeviceConfigSpec, error) {
var diskSpecs []types.BaseVirtualDeviceConfigSpec

klog.InfoS("About to iterate through disks", "disk", s.providerSpec.Disks)
Copy link
Contributor

Choose a reason for hiding this comment

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

Debug?


klog.InfoS("About to iterate through disks", "disk", s.providerSpec.Disks)

klog.Infof("Feature Gates: %v", s.featureGates)
Copy link
Contributor

Choose a reason for hiding this comment

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

Debug?

Comment on lines +1110 to +1113
if len(s.providerSpec.Disks) > 0 && !s.featureGates.Enabled(featuregate.Feature(apifeatures.FeatureGateVSphereMultiDisk)) {
return nil, machinecontroller.InvalidMachineConfiguration(
"machines cannot contain additional disks due to VSphereMultiDisk feature gate being disabled")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to happen at the providerSpec validation webhook level as well

@@ -547,7 +547,8 @@ func TestNodeGetter(t *testing.T) {
testEnv := &envtest.Environment{
CRDDirectoryPaths: []string{
filepath.Join("..", "..", "..", "install"),
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1", "zz_generated.crd-manifests")},
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1", "zz_generated.crd-manifests"),
filepath.Join("..", "..", "..", "third_party", "cluster-api", "crds")},
Copy link
Contributor

Choose a reason for hiding this comment

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

What new CRDs are needed?

Comment on lines +2634 to +2635
err = gates.Set(fmt.Sprintf("%v=%v", features.FeatureGateVSphereStaticIPs, tc.staticIPFeatureGateEnabled))
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, should inline this

Suggested change
err = gates.Set(fmt.Sprintf("%v=%v", features.FeatureGateVSphereStaticIPs, tc.staticIPFeatureGateEnabled))
if err != nil {
if err := gates.Set(fmt.Sprintf("%v=%v", features.FeatureGateVSphereStaticIPs, tc.staticIPFeatureGateEnabled)); err != nil {

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this related to this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants