Open scaleoutsean opened 5 years ago
Your solidfire-gold-xfs storage class defines an IOPS level that falls in the range of the silver definition in the backend (silver ranges from 400 to 600, the sc defines 555). Your gold class does not specify any IOPS level, therefore all classes defined in the backend match. I guess that is why you see that "random" behaviour, there is nothing in the sc that would allow trident to choose a particular type so it spreads them across all.
solidfire-gold-xfs: I see there's logic to your theory (Trident picks a "range" in which IOPS "roughly" fits in), but IMO that's not how it's supposed to work - https://netapp-trident.readthedocs.io/en/stable-v19.07/kubernetes/concepts/objects.html#kubernetes-storageclass-objects says "Pool is capable of guaranteeing IOPS in this range". But even in that case, such behavior must be documented. I do have a SC with 555+ IOPS (gold, Min 600 IOPS), why doesn't it use that? If it cannot do that, I guess at least 50% of users would prefer to have Trident doesn't deliver those storage resources and then they could edit & resubmit or add needed QoS to my back-end definition (if it's not at all available). The current behavior is undocumented and silently introduces bad behavior - both of which seems wrong.
gold: also, that's a good point, but this randomness completely contradicts expected behavior of Element software. If I had a 3-pod stateful set of Cassandra nodes and Trident sprayed my PVs around all storage classes/SLAs, that would be worse than picking the lowest QoS and sticking with it (because at least all pods from Stateful Set would be equally slow, whereas now it's all over the place which doesn't make the whole set faster but it does waste Min IOPS allocated to all but the slowest Pod).
Your gold class does not specify any IOPS level, therefore all classes defined in the backend match.
I did few other tests (in one, I made the SC with IOPS 555 default SC) and when pod had no SC assignment, Trident would still assign a non-default class to each pod in Stateful Set (all 3 PVs). This is also unexpected. All right, maybe there's also some logic to it (can't meet the default QoS SLA, so let's round-robin around), but I don't like that logic.
Re: your solidfire-gold-xfs
storage class, I believe what you're saying is that you want the IOPS
parameter to mean "use any pool with minIOPS greather than or equal to this number", whereas today it means "use any pool where this number is between minIOPS and maxIOPS", and therefore silver
qualifies rather than gold
. I agree that would make more sense, especially when we say "guaranteeing IOPS" in the description. We'll have to figure out if we want to change the behavior or just the meaning to make it more clear.
Re: your gold
storage class, that's working as designed. Its definition (with only backendType
defined) says "any pool from a solidfire-san backend is viable".
@innergy it took me a while to figure out why I was extra confused when I reported this - even when there's a default storage class, K8s reports that all PVs use it:
But in reality they do not (this part we knew before); I have 2 classes and 1 in 3 got storage settings QoS from a non-default storage class.
If default SC is set, K8s shows PVCs and PVs are compliant and consistent whereas that's not necessarily true. When there's no default storage class, the behavior may be easier to spot (I haven't verified if in that case K8s would show different storage classes, but even if it did, users would probably be more curious what settings got applied.)
These screenshots are from a more recent release:
1)
solidfire-san
backend:2) Case A - create a storage class "solidfire-gold-xfs" (I forgot to change fsType but lets ignore that for a second):
Now a Stateful set created to make use of "solidfire-gold-xfs" storage class creates PVCs that result in "silver" QoS on Element storage. scaled to 2, maybe it'd get random after that.
3) Case B - create a SC "gold" which should supposedly map exactly to "gold" in backend.json:
Create a stateful set with 1 replica - the first volume gets
bronze
QoS. Scale it to 2, the next volume gets agold
, scale it to 3, the next volume gets abronze
, scale it to 4, it's asilver
.Element OS volumes: