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-1410: Modified vSphere config provider to not lose AddressesFromPools when applying Failure Domains #273

Merged
merged 1 commit into from Feb 20, 2024

Conversation

vr4manta
Copy link
Contributor

@vr4manta vr4manta commented Jan 30, 2024

SPLAT-1410

Changes

  • Modified providerconfig/vsphere.go to keep CPMS machine provider spec networking in order to maintain the AddressesFromPool
  • Added log output of networking to allow improved debugging when log level >= 4.

Dependencies

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 30, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 30, 2024

@vr4manta: This pull request references SPLAT-1410 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.16.0" version, but no target version was set.

In response to this:

SPLAT-1410

Changes

  • Modified providerconfig/vsphere.go to keep CPMS machine provider spec networking in order to maintain the AddressesFromPool
  • Added log output of networking to allow improved debugging when log level >= 4.
  • Added log output to provider.go to log diff results of provider configs if not equal to improve debugging.

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 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 Jan 30, 2024
Copy link
Contributor

openshift-ci bot commented Jan 30, 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

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 30, 2024
}

// Set the network name for the device from FD.
networkSpec.Devices[0].NetworkName = topology.Networks[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

while not allowed now, i could see us supporting possibly multiple network devices in the future. should we initialize the network spec with any topology networks we find?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can do this. I didn't like hard coding this, but we were before. I'll update this and test out.

@vr4manta
Copy link
Contributor Author

/test all

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 31, 2024

@vr4manta: This pull request references SPLAT-1410 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.16.0" version, but no target version was set.

In response to this:

SPLAT-1410

Changes

  • Modified providerconfig/vsphere.go to keep CPMS machine provider spec networking in order to maintain the AddressesFromPool
  • Added log output of networking to allow improved debugging when log level >= 4.
  • Added log output to provider.go to log diff results of provider configs if not equal to improve debugging.

Dependencies

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
Copy link

openshift-ci-robot commented Jan 31, 2024

@vr4manta: This pull request references SPLAT-1410 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.16.0" version, but no target version was set.

In response to this:

SPLAT-1410

Changes


  • Modified providerconfig/vsphere.go to keep CPMS machine provider spec networking in order to maintain the AddressesFromPool
  • Added log output of networking to allow improved debugging when log level >= 4.
  • Added log output to provider.go to log diff results of provider configs if not equal to improve debugging.

Dependencies


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
Copy link

openshift-ci-robot commented Jan 31, 2024

@vr4manta: This pull request references SPLAT-1410 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.16.0" version, but no target version was set.

In response to this:

SPLAT-1410

Changes

  • Modified providerconfig/vsphere.go to keep CPMS machine provider spec networking in order to maintain the AddressesFromPool
  • Added log output of networking to allow improved debugging when log level >= 4.
  • Added log output to provider.go to log diff results of provider configs if not equal to improve debugging.

Dependencies

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
Copy link

openshift-ci-robot commented Jan 31, 2024

@vr4manta: This pull request references SPLAT-1410 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.16.0" version, but no target version was set.

In response to this:

SPLAT-1410

Changes

  • Modified providerconfig/vsphere.go to keep CPMS machine provider spec networking in order to maintain the AddressesFromPool
  • Added log output of networking to allow improved debugging when log level >= 4.

Dependencies

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-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 31, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 1, 2024
@openshift-ci openshift-ci bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 1, 2024
@vr4manta vr4manta force-pushed the SPLAT-1410 branch 2 times, most recently from 6f36330 to c686984 Compare February 1, 2024 13:04
@vr4manta vr4manta marked this pull request as ready for review February 1, 2024 13:06
@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 Feb 1, 2024
@openshift-ci openshift-ci bot requested review from damdo and vincepri February 1, 2024 13:10
@jcpowermac
Copy link

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 1, 2024
@jcpowermac
Copy link

/lgtm

@JoelSpeed
Copy link
Contributor

/retest
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 6, 2024
@vr4manta
Copy link
Contributor Author

vr4manta commented Feb 9, 2024

/test unit

@JoelSpeed
Copy link
Contributor

Unit test failed, looks like the injection isn't quite working as expected?

@vr4manta
Copy link
Contributor Author

/test unit

This works fine locally. I am not sure why it keeps failing in CI.

@vr4manta
Copy link
Contributor Author

/test unit

@vr4manta
Copy link
Contributor Author

vr4manta commented Feb 17, 2024

/test unit

This works fine locally. I am not sure why it keeps failing in CI.

Ok, i recreated the failure where static ip test fails. looking into fix now. (rebase was required)

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 17, 2024
@vr4manta
Copy link
Contributor Author

/retest-required

@vr4manta
Copy link
Contributor Author

@JoelSpeed The unit test are fixed. Ready for review.

Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this @vr4manta
I left a couple of little nit comments but these are not blocking. Thanks!

})

It("contains an AddressesFromPools block", func() {
Expect(providerConfig.providerConfig.Network.Devices[0].AddressesFromPools).To(Not(BeEmpty()))
Copy link
Member

Choose a reason for hiding this comment

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

Quite recently we started adding the optionalDescription in the Gomega assertions (e.g. in .To()).

So I'd be nice if all the assertions you are adding (e.g. .To(), .ToNot(), Should() etc.) have a failure description, so then if they fail they provide more context in the error: e.g.

Suggested change
Expect(providerConfig.providerConfig.Network.Devices[0].AddressesFromPools).To(Not(BeEmpty()))
Expect(providerConfig.providerConfig.Network.Devices[0].AddressesFromPools).To(Not(BeEmpty()), "expected AddressesFromPools to not be empty as a static IPPool has been configured")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good. I"ll add this in.


It("returns networking with AddressesFromPools and the configured network name from failure domain", func() {
expected, err := providerConfig.InjectFailureDomain(providerConfig.ExtractFailureDomain())
Expect(err).To(BeNil())
Copy link
Member

Choose a reason for hiding this comment

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

Here we normally prefer to use:

Suggested change
Expect(err).To(BeNil())
Expect(err).To(Not(HaveOccurred()))

As that provides a nicer output:

    Unexpected error:
        <*errors.errorString | 0xc00002c5d0>:
        this is a very bad error
        {
            s: "this is a very bad error",
        }
    occurred

as opposed to:

    Expected
        <*errors.errorString | 0xc0000a0590>:
        this is a very bad error
        {
            s: "this is a very bad error",
        }
    to be nil

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. I'll update this as well.

Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 19, 2024
Copy link
Contributor

openshift-ci bot commented Feb 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damdo

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 /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 Feb 19, 2024
Copy link
Contributor

openshift-ci bot commented Feb 19, 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-azure-ovn-etcd-scaling 3ec4939 link false /test e2e-azure-ovn-etcd-scaling
ci/prow/e2e-vsphere-multi-zone-operator 3ec4939 link false /test e2e-vsphere-multi-zone-operator
ci/prow/e2e-vsphere-ovn-etcd-scaling 3ec4939 link false /test e2e-vsphere-ovn-etcd-scaling
ci/prow/e2e-gcp-ovn-etcd-scaling 3ec4939 link false /test e2e-gcp-ovn-etcd-scaling
ci/prow/e2e-openstack-operator-zone 3ec4939 link false /test e2e-openstack-operator-zone
ci/prow/e2e-vsphere-operator 3ec4939 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/test-infra repository. I understand the commands that are listed here.

@vr4manta
Copy link
Contributor Author

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Feb 20, 2024
@vr4manta
Copy link
Contributor Author

/test e2e-aws-ovn

@damdo
Copy link
Member

damdo commented Feb 20, 2024

/retest-required

@openshift-merge-bot openshift-merge-bot bot merged commit 20911c8 into openshift:main Feb 20, 2024
18 of 24 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-cluster-control-plane-machine-set-operator-container-v4.16.0-202402210139.p0.g20911c8.assembly.stream.el9 for distgit ose-cluster-control-plane-machine-set-operator.
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
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants