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

Fix Alibaba cloud machinepool not creating instances with correct image ID #1795

Merged
merged 2 commits into from
Jun 27, 2022

Conversation

akhil-rane
Copy link
Contributor

@akhil-rane akhil-rane commented Jun 13, 2022

Currently, Alibaba machinepool actuator does not pull image ID from master machines before creating remote machinesets on the target cluster. With incorrect image ID new worker machine provisioning fails. This PR fixes it.

x-ref: https://issues.redhat.com/browse/HIVE-1612

@openshift-ci openshift-ci bot requested review from abutcher and dlom June 13, 2022 19:45
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 13, 2022
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 21, 2022
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 22, 2022
@akhil-rane akhil-rane changed the title fix alibaba machinepool Fix Alibaba cloud machinepool not creating instances with correct image ID Jun 22, 2022
@akhil-rane
Copy link
Contributor Author

@abutcher this looks good for a review

@abutcher
Copy link
Member

/assign @abutcher

@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #1795 (e0291fe) into master (6ac23a8) will decrease coverage by 0.01%.
The diff coverage is 5.00%.

❗ Current head e0291fe differs from pull request most recent head c18f5c6. Consider uploading reports for the commit c18f5c6 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1795      +/-   ##
==========================================
- Coverage   41.74%   41.72%   -0.02%     
==========================================
  Files         353      353              
  Lines       33082    33095      +13     
==========================================
  Hits        13810    13810              
- Misses      18115    18129      +14     
+ Partials     1157     1156       -1     
Impacted Files Coverage Δ
...ller/clusterrelocate/clusterrelocate_controller.go 56.09% <ø> (-0.09%) ⬇️
...g/controller/machinepool/machinepool_controller.go 47.98% <0.00%> (ø)
pkg/resource/apply.go 0.00% <0.00%> (ø)
pkg/controller/machinepool/alibabacloudactuator.go 48.61% <5.55%> (-13.21%) ⬇️
...g/controller/hibernation/hibernation_controller.go 65.34% <0.00%> (+0.36%) ⬆️

Copy link
Member

@abutcher abutcher left a comment

Choose a reason for hiding this comment

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

This is consistent with how we obtain the AMI ID in the AWS actuator. I'd like to see an error returned if an imageID is not present on the master machine but otherwise looks good.

logger.WithError(err).Warn("cannot decode AlibabaCloudMachineProviderSpec from master machine")
return "", errors.Wrap(err, "cannot decode AlibabaCloudMachineProviderSpec from master machine")
}
imageID := providerSpec.ImageID
Copy link
Member

Choose a reason for hiding this comment

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

We can probably expect providerSpec.ImageID to be set for the master machine but we should check that here and provide an error if not set similar to getAWSAMIID().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 24, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 24, 2022

@akhil-rane: The following test 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 74886bf link false /test e2e-azure

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.

@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 24, 2022
@abutcher
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2022
@abutcher
Copy link
Member

/unlgtm

@abutcher abutcher removed the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2022
github.com/onsi/gomega v1.17.0
github.com/openshift/api v0.0.0-20220427141643-6e7069f2fba2
github.com/onsi/gomega v1.18.1
github.com/openshift/api v0.0.0-20220531073726-6c4f186339a7
Copy link
Member

Choose a reason for hiding this comment

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

Sorry I missed this. This should line up with our apis submodule vendoring https://issues.redhat.com/browse/HIVE-1941

Copy link
Member

Choose a reason for hiding this comment

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

#1810 will enforce :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@abutcher done

@abutcher
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 27, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 27, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abutcher, akhil-rane

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:
  • OWNERS [abutcher,akhil-rane]

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 merged commit 30ef983 into openshift:master Jun 27, 2022
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.

None yet

3 participants