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

For Azure cloud prepare get the image from existing Machineset #594

Merged
merged 2 commits into from Feb 13, 2023

Conversation

aswinsuryan
Copy link
Contributor

@aswinsuryan aswinsuryan commented Feb 8, 2023

For Azure cloud prepare it uses a hard-coded path and infra id for the machine set. Now it is changed the image. from one of the existing worker nodes.

Signed-off-by: Aswin Suryanarayanan aswinsuryan@gmail.com

@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr594/aswinsuryan/azure-image

@aswinsuryan aswinsuryan force-pushed the azure-image branch 13 times, most recently from 5c6b986 to 570e71c Compare February 9, 2023 00:05
@aswinsuryan aswinsuryan marked this pull request as ready for review February 9, 2023 01:33
@nyechiel nyechiel added this to In progress in Submariner Project 0.15 via automation Feb 9, 2023
@nyechiel nyechiel added backport Mark an issue/pull request for backporting priority:high labels Feb 9, 2023
@nyechiel
Copy link
Member

nyechiel commented Feb 9, 2023

Setting priority as high and marking for backport, as currently all OpenShift 4.12 Azure based deployments are blocked without this fix.

skitt
skitt previously requested changes Feb 9, 2023
pkg/azure/ocpgwdeployer.go Outdated Show resolved Hide resolved
Submariner Project 0.15 automation moved this from In progress to In Review Feb 9, 2023
pkg/ocp/machinesets.go Outdated Show resolved Hide resolved
pkg/ocp/machinesets.go Outdated Show resolved Hide resolved
pkg/ocp/machinesets.go Outdated Show resolved Hide resolved
pkg/ocp/machinesets.go Outdated Show resolved Hide resolved
@skitt skitt dismissed their stale review February 9, 2023 16:12

My change request has been addressed.

Copy link
Member

@skitt skitt left a comment

Choose a reason for hiding this comment

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

Minor idiomatic change, but not worth respinning. I have another concern regarding GetWorkerNodeImage but it’s not specific to this PR, I’ll submit another PR for it.

pkg/azure/ocpgwdeployer.go Show resolved Hide resolved
Copy link
Contributor

@mkolesnik mkolesnik left a comment

Choose a reason for hiding this comment

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

Generally looks good, one suggestion if youre going to respin the PR, otherwise don't bother

pkg/ocp/machinesets.go Outdated Show resolved Hide resolved
Copy link
Member

@skitt skitt left a comment

Choose a reason for hiding this comment

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

This hasn’t been resolved (and I’d missed the mismatch in line 130, which means it needs to be resolved).

Comment on lines 128 to 130
image, imageErr := d.msDeployer.GetWorkerNodeImage(nil, nil, d.InfraID)
if imageErr != nil {
return errors.Wrap(err, "error retrieving worker node image")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
image, imageErr := d.msDeployer.GetWorkerNodeImage(nil, nil, d.InfraID)
if imageErr != nil {
return errors.Wrap(err, "error retrieving worker node image")
image, err := d.msDeployer.GetWorkerNodeImage(nil, nil, d.InfraID)
if err != nil {
return errors.Wrap(err, "error retrieving worker node image")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This lead to linting error

pkg/azure/ocpgwdeployer.go:133:3: ineffectual assignment to err (ineffassign)
err = d.deployDedicatedGWNode(machineSets, gatewayNodesToDeploy, image, status)

Hence reverting, Will fix the issue in line 132.

skitt
skitt previously approved these changes Feb 13, 2023
@skitt skitt enabled auto-merge (squash) February 13, 2023 13:57
Signed-off-by: Aswin Suryanarayanan <aswinsuryan@gmail.com>
@aswinsuryan aswinsuryan dismissed skitt’s stale review February 13, 2023 14:11

A suggested change was reverted after approval.

Comment on lines +128 to +131
image, imageErr := d.msDeployer.GetWorkerNodeImage(nil, nil, d.InfraID)
if imageErr != nil {
return errors.Wrap(imageErr, "error retrieving worker node image")
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
image, imageErr := d.msDeployer.GetWorkerNodeImage(nil, nil, d.InfraID)
if imageErr != nil {
return errors.Wrap(imageErr, "error retrieving worker node image")
}
var image string
image, err = d.msDeployer.GetWorkerNodeImage(nil, nil, d.InfraID)
if err != nil {
return errors.Wrap(err, "error retrieving worker node image")
}

@skitt skitt merged commit c36477e into submariner-io:devel Feb 13, 2023
Submariner Project 0.15 automation moved this from In Review to Done Feb 13, 2023
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr594/aswinsuryan/azure-image]

@skitt
Copy link
Member

skitt commented Feb 13, 2023

@aswinsuryan can you take care of the 0.13 and 0.12 backports?

@aswinsuryan
Copy link
Contributor Author

@aswinsuryan can you take care of the 0.13 and 0.12 backports?

It requires two other back ports to resolve conflicts,
Below is the first one
#597

It is not required in 0.12 as Azure support is added in 0.13

https://submariner.io/community/releases/#v0130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

7 participants