-
Notifications
You must be signed in to change notification settings - Fork 16
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
unable to escape NoStock error #167
Comments
In which region? |
cn-shanghai |
Thanks for reporting, we will fix it soon, the capacity information could be resolved: https://api.aliyun.com/api/Ecs/2014-05-26/DescribeAvailableResource?params={%22RegionId%22:%22cn-shanghai%22,%22InstanceChargeType%22:%22PostPaid%22,%22SpotStrategy%22:%22SpotAsPriceGo%22,%22DestinationResource%22:%22InstanceType%22}&tab=DEBUG |
Maybe I can try to fix it. |
@daimaxiaxie Is that ok? Maybe, you are alreay fixing |
/assign @jxs1211 My idea is: added |
Sorry, I don't get the point, if you don't set the |
Before set the offerings:
Call https://api.aliyun.com/api/Ecs/2014-05-26/DescribeAvailableResource?params={%22RegionId%22:%22cn-shanghai%22,%22InstanceChargeType%22:%22PostPaid%22,%22SpotStrategy%22:%22SpotAsPriceGo%22,%22DestinationResource%22:%22InstanceType%22}&tab=DEBUG to resolve the stock state @jxs1211 @daimaxiaxie |
There are two ways:
|
I prefer option 1 |
How about the offerings meet "AvailableZone": [{
"Status": "Available",
"StatusCategory": "WithStock",
"ZoneId": "cn-hangzhou-i",
"AvailableResources": {
"AvailableResource": [{
"Type": "InstanceType",
"SupportedResources": {
"SupportedResource": [{
"Status": "Available",
"StatusCategory": "ClosedWithStock",
"Value": "ecs.c5.2xlarge"
}]
}
}]
},
"RegionId": "cn-hangzhou"
} |
Check
We may need another filed to record the spot instance state, and set the corresponding offering. For example, spotInstanceTypesOfferings |
If we can get the available status from the why do we need |
What happened:
I used a very simple NodePool. No CapacityType is specified, but the InstanceType is specified. I only used one VSwitch, it is in zone cn-shanghai-b.
However, the provider failed to start the instance because there was no stock in zone B.
Then I added the log. Output InstanceType and CapacityType.
karpenter-provider-alibabacloud/pkg/providers/instance/instance.go
Lines 370 to 371 in a6c5b5f
The results show that it always tries only spot.
What you expected to happen:
OnDemand(postpaid) is available, and is expected to automatically fallback to OnDemand.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
git describe --tags --dirty --always
):The text was updated successfully, but these errors were encountered: