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

Implement TemplateNodeInfo for magnum cloudprovider #6890

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

b0e
Copy link

@b0e b0e commented Jun 4, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Implement TempalteNodeInfo() for the cluster-autoscaler magnum cloud provider

Which issue(s) this PR fixes:

Haven't found any.

Special notes for your reviewer:

Scaling up a nodegroup from zero didn't work because TemplateNodeInfo was not implemented.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 4, 2024
Copy link

linux-foundation-easycla bot commented Jun 4, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jun 4, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @b0e!

It looks like this is your first PR to kubernetes/autoscaler 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/autoscaler has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 4, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @b0e. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 4, 2024
@k8s-ci-robot k8s-ci-robot requested a review from x13n June 4, 2024 12:00
@k8s-ci-robot k8s-ci-robot added the area/provider/magnum Issues or PRs related to the Magnum cloud provider for Cluster Autoscaler label Jun 4, 2024
@b0e b0e force-pushed the implement-templateNodeInfo-for-cloudprovider-magnum branch from 804b9fc to b3fd828 Compare June 4, 2024 13:14
@Shubham82
Copy link
Contributor

@b0e you have to sign the CLA before the PR can be reviewed.
See the following document to sign the CLA: Signing Contributor License Agreements(CLA)

@Shubham82
Copy link
Contributor

To check EasyCLA

/easycla

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jun 11, 2024
@modzilla99
Copy link
Contributor

modzilla99 commented Jul 10, 2024

Hi @BigDarkClown @x13n,
sorry for pinging you, but would you please have a look at this PR?

Fixes #6018

Thank you!

@x13n
Copy link
Member

x13n commented Jul 11, 2024

Cloud provider specific changes should be reviewed by dedicated OWNERS. @tghartland can you take a look?

/assign tghartland

@k8s-ci-robot
Copy link
Contributor

@x13n: GitHub didn't allow me to assign the following users: tghartland.

Note that only kubernetes members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

Cloud provider specific changes should be reviewed by dedicated OWNERS. @tghartland can you take a look?

/assign tghartland

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.

@modzilla99
Copy link
Contributor

@tghartland would you please take a look at this?

@tghartland
Copy link
Contributor

Hi, I think I was away for a while when this came in, I must have missed it when I got back.

Sorry for the long delay, I'll take a look at it this week.

@tghartland
Copy link
Contributor

I had some problems getting a working test environment going, but I've tested scaling up from 0 and that works and gives the expected number of nodes for the resources of pending pods and nodegroup flavor size.

While scaling down I saw some odd issues (master nodegroup going to a bad state) though it might just be more problems from my test environment. I want to take another look at that, but I am travelling from today until Tuesday so it will have to wait.

The diff looks fine, I don't see anything in there that would be causing the scale down issues but I need the time to double check.

@modzilla99
Copy link
Contributor

Thanks for the quick response. We've been using the patchset for quite a while now and haven't encountered problems with the master NG. But to be fair, we don't use the main heat stack for scaling and always create another NG. But yeah heat does some weird stuff sometimes.

@modzilla99
Copy link
Contributor

While scaling down I saw some odd issues (master nodegroup going to a bad state) though it might just be more problems from my test environment.

What we've encountered though is that on scale down one node will be removed at a time and not in a batch.

@tghartland
Copy link
Contributor

I've managed to get my devstack environment set to the stable magnum version, and that doesn't have the master nodegroup issue I saw when scaling down.
Everything is working as expected in my testing now.

About your point on batching, the core autoscaler makes multiple requests for single nodes when doing a scale down.

I1103 13:16:01.052902       1 magnum_manager_impl.go:390] manager deleting node: k8s-cluster-3cwfpqnz4qll-node-4
I1103 13:16:01.052947       1 magnum_manager_impl.go:400] resizeOpts: node_group=f5cff265-6baf-4cc1-93fd-803ec976e6cf, node_count=1, remove=[282037cd-4e08-4d65-920d-f4b22b0f3987]
I1103 13:16:06.157309       1 magnum_manager_impl.go:390] manager deleting node: k8s-cluster-3cwfpqnz4qll-node-3
I1103 13:16:06.157314       1 magnum_manager_impl.go:400] resizeOpts: node_group=f5cff265-6baf-4cc1-93fd-803ec976e6cf, node_count=0, remove=[fed68301-d2d8-4b69-a629-5a33d59a07ae]

And magnum is able to handle those requests in parallel, I see it deleting both nodes at the same time:

LAST SEEN   TYPE      REASON                    OBJECT                                 MESSAGE
44m         Normal    DeletingNode              node/k8s-cluster-3cwfpqnz4qll-node-3   Deleting node k8s-cluster-3cwfpqnz4qll-node-3 because it does not exist in the cloud provider
44m         Normal    DeletingNode              node/k8s-cluster-3cwfpqnz4qll-node-4   Deleting node k8s-cluster-3cwfpqnz4qll-node-4 because it does not exist in the cloud provider

In the first implementation of the magnum provider, it did wait and try to batch up those into one request to openstack, but that was before the magnum resize API was available. Once magnum could handle multiple requests at the same time, it was a lot easier to let it handle that as the code in the provider was very awkward.

@tghartland
Copy link
Contributor

Thanks for your contribution!

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

@tghartland: changing LGTM is restricted to collaborators

In response to this:

Thanks for your contribution!

/lgtm
/approve

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.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: b0e, tghartland
Once this PR has been reviewed and has the lgtm label, please assign aleksandra-malinowska 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

@tghartland
Copy link
Contributor

@x13n the CI bot never likes me, could you set this PR as ready to merge?

@Shubham82
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 4, 2024
@Shubham82
Copy link
Contributor

Thanks for your contribution!

/lgtm /approve

giving LGTM as the Owner approves PR, but labels are not applied.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 4, 2024
@Shubham82
Copy link
Contributor

@x13n the CI bot never likes me, could you set this PR as ready to merge?

@tghartland, IMO, it is because you are not in k8s org.

cc @x13n please approve this PR.
Thanks!

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 7, 2024
@Shubham82
Copy link
Contributor

@b0e, please resolve the merge conflict.

@b0e b0e force-pushed the implement-templateNodeInfo-for-cloudprovider-magnum branch from b3fd828 to a249ca9 Compare November 7, 2024 16:07
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 7, 2024
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 7, 2024
@Shubham82
Copy link
Contributor

cc @tghartland
PTAL (if all is good after rebasing, then we can merge this)

Thanks!

@Shubham82
Copy link
Contributor

As the owner of Magnum cloud provider in CA, it would be good if you could join k8s Org (become a member) so that you can easily approve the PR related to Magnum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler area/provider/magnum Issues or PRs related to the Magnum cloud provider for Cluster Autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants