-
Notifications
You must be signed in to change notification settings - Fork 4k
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
add init container when vpa recommender init from history provider #4102
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
Welcome @cswangzheng! |
I signed it |
Hi guys, are there any updates to this one? should we expect that to be merged soon? |
Hi @jbartosik @krzysied, can you help review this change? |
/assign @bskiba |
Hi @bskiba, can you help review this change? |
Hi @krzysied, would you please check the answer to your comment? |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cswangzheng, jbartosik 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 |
Now the test fails, it will pass after kubernetes#4102 merges
Now the test fails, it will pass after kubernetes#4102 merges
Now the test fails, it will pass after kubernetes#4102 merges
I am still getting "Error adding metric sample for container" in our logs.
I was under the assumption the fix to this bug was present in v0.10 |
It is: 49992e7 |
@jbartosik Do you have any idea why this is popping up in v0.11 ? |
No. If you'd like to discuss it please open an issue (& please link to this PR to make the conversation easier to follow) |
Now the test fails, it will pass after kubernetes#4102 merges
I am still getting "Error adding metric sample for container" in our logs. |
Which VPA version are you using? |
vpa-recommender:1.1.2
|
We are using vertical-pod-autoscaler for autoscaler. We use prometheus as history data provider.
Got Error adding metric sample for container
There are two related issues found:
#2010
#2512
After checking, we found the ContainerState is not initialized before LoadPods of RunOnce method.
Due to InitFromHistoryProvider is before RunOnce in main loop, the feeder.clusterState.AddSample will always got fail. The history data will not be added to the ClusterState.
The solution is init container in InitFromHistoryProvider after init pod in ClusterState. Since the request of container is unknown, give a nil as param. The resource request will be updated to right value in the LoadPods in RunOnce of main loop.