Skip to content

[vsphere] create machineset spec based on machineset spec created at install time#669

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
rvanderp3:determine-workspace-from-cluster
Sep 21, 2021
Merged

[vsphere] create machineset spec based on machineset spec created at install time#669
openshift-merge-robot merged 1 commit into
openshift:masterfrom
rvanderp3:determine-workspace-from-cluster

Conversation

@rvanderp3
Copy link
Copy Markdown
Contributor

@rvanderp3 rvanderp3 commented Sep 14, 2021

The intent of this PR is to derive the Workspace for machinesets created during testing based on the compute machineset provisioned by the cluster at installation. The reason for this change is that a vCenter in IBM Cloud is being also used to run CI jobs from a shared lease pool to increase test coverage in some key configurations. Additionally, the vmTemplate can now be optionally defined as an environment variable in the e2e test script.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Sep 14, 2021

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 requested review from aravindhp and sebsoto September 14, 2021 20:57
@rvanderp3 rvanderp3 changed the title [vsphere] create machineset spec based on machineset spec created at install time [wip] [vsphere] create machineset spec based on machineset spec created at install time Sep 14, 2021
@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 14, 2021
@rvanderp3 rvanderp3 force-pushed the determine-workspace-from-cluster branch 3 times, most recently from 0a70bc4 to 44844d7 Compare September 15, 2021 15:15
@rvanderp3
Copy link
Copy Markdown
Contributor Author

Confirmed in both VMC and the IBM Cloud that the workspace properly populates based on the existing compute node workspace and that a windows machine is created. Also confirmed that the VM_TEMPLATE environment variable is able to override the default template.

@rvanderp3 rvanderp3 marked this pull request as ready for review September 15, 2021 15:27
@rvanderp3 rvanderp3 changed the title [wip] [vsphere] create machineset spec based on machineset spec created at install time [vsphere] create machineset spec based on machineset spec created at install time Sep 15, 2021
@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 Sep 15, 2021
@rvanderp3 rvanderp3 force-pushed the determine-workspace-from-cluster branch 2 times, most recently from c4e0c9c to a61eb83 Compare September 17, 2021 00:57
Copy link
Copy Markdown
Contributor

@sebsoto sebsoto left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Left a few requests

Comment thread test/e2e/providers/vsphere/vsphere.go Outdated
Comment thread test/e2e/providers/vsphere/vsphere.go Outdated
Comment thread test/e2e/providers/vsphere/vsphere.go Outdated
Comment thread test/e2e/providers/vsphere/vsphere.go Outdated
Comment on lines +93 to +94
templateSpec := machineSet.Spec.Template.Spec
providerSpecRaw := templateSpec.ProviderSpec.Value
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.

This can be simplified to providerSpecRaw := machineSet.Spec.Template.Spec.ProviderSpec.Value
Having the extra variable templateSpec is confusing as we are only interested in the ProviderSpec's value.

Comment thread test/e2e/providers/vsphere/vsphere.go Outdated
Comment on lines +91 to +126
providerSpec, err := newVSphereMachineProviderSpec(clusterID)
providerSpec, err := p.newVSphereMachineProviderSpec()
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'm not sure about making this a method and no longer passing in clusterID, seems like this is going to result in an extra API call.

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.

My rationale for that was that the cluster ID is no longer required in that method. Since we are importing the workspace from an existing machineset, we no longer need the cluster ID to produce a valid workspace as it's already embedded in the workspace we are importing.

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.

That is what I understood too. Are we missing something, @sebsoto? Where is the extra API call coming from?

Copy link
Copy Markdown
Contributor

@saifshaikh48 saifshaikh48 Sep 20, 2021

Choose a reason for hiding this comment

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

I think @sebsoto is referring to this added call in getWorkspaceFromExistingMachineSet() despite already getting the cluster ID here.

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.

@saifshaikh48 @sebsoto got it, I updated the PR to prevent the additional call.

@rvanderp3 rvanderp3 force-pushed the determine-workspace-from-cluster branch from a61eb83 to 47a9b77 Compare September 17, 2021 16:29
The intent of this PR is to derive the Workspace for machinesets
created during testing based on the compute machineset provisioned
by the cluster at installation. The reason for this change is that
a vCenter in IBM Cloud is being also used to run CI jobs from a
shared lease pool to increase test coverage in some key
configurations. Additionally, the vmTemplate can now be optionally
defined as an environment variable in the e2e test script.
@rvanderp3 rvanderp3 force-pushed the determine-workspace-from-cluster branch from 47a9b77 to c1bc14b Compare September 20, 2021 21:42
@rvanderp3
Copy link
Copy Markdown
Contributor Author

/hold
adding hold pending passing vsphere job

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 20, 2021
@rvanderp3
Copy link
Copy Markdown
Contributor Author

/cancel hold

@rvanderp3
Copy link
Copy Markdown
Contributor Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 21, 2021
@sebsoto
Copy link
Copy Markdown
Contributor

sebsoto commented Sep 21, 2021

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Sep 21, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rvanderp3, sebsoto

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 Sep 21, 2021
Copy link
Copy Markdown
Contributor

@saifshaikh48 saifshaikh48 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 working on this @rvanderp3

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 21, 2021
@openshift-merge-robot openshift-merge-robot merged commit 9b10a9b into openshift:master Sep 21, 2021
@sebsoto
Copy link
Copy Markdown
Contributor

sebsoto commented Sep 21, 2021

/cherry-pick release-4.8
/cherry-pick release-4.9
/cherry-pick community-4.8

@openshift-cherrypick-robot
Copy link
Copy Markdown

@sebsoto: new pull request created: #693

Details

In response to this:

/cherry-pick release-4.8
/cherry-pick release-4.9
/cherry-pick community-4.8

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.

@aravindhp
Copy link
Copy Markdown
Contributor

/cherry-pick release-4.9

@aravindhp
Copy link
Copy Markdown
Contributor

/cherry-pick community-4.8

@aravindhp
Copy link
Copy Markdown
Contributor

/cherry-pick release-4.7

@openshift-cherrypick-robot
Copy link
Copy Markdown

@aravindhp: new pull request created: #694

Details

In response to this:

/cherry-pick release-4.9

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.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@aravindhp: new pull request created: #695

Details

In response to this:

/cherry-pick community-4.8

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.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@aravindhp: #669 failed to apply on top of branch "release-4.7":

Applying: create machineset spec based on spec created at install time
Using index info to reconstruct a base tree...
M	test/e2e/providers/vsphere/vsphere.go
Falling back to patching base and 3-way merge...
Auto-merging test/e2e/providers/vsphere/vsphere.go
CONFLICT (content): Merge conflict in test/e2e/providers/vsphere/vsphere.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 create machineset spec based on spec created at install time
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Details

In response to this:

/cherry-pick release-4.7

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.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants