Repository navigation
Description
Describe the bug
The inventory operator excludes StorageClasses without the akash.network label from inventory reporting and emits nothing when it does. /v1/inventory returns storage: [] with no signal at any log level.
Filed here because issue creation is restricted on akash-network/provider. This is the code-side follow-up to #645, which covers the documentation gap.
- Provider:
akash1sevd2ymtty3dpq9ycxgkhuzzk4fe6mchqdwd4e(au-syd) - provider-services: v0.16.4, chart 19.0.3
- Kubernetes: v1.34.8
Verified in source at v0.16.4.
operator/inventory/ceph.go:
for class, params := range scs {
if !params.isCeph {
continue
}
df, exists := res.clusters[params.clusterID]
if !exists || !params.isAkashManaged {
continue
}operator/inventory/rancher.go:
for class, params := range scs {
if params.isRancher && params.isAkashManaged {
res = append(res, inventory.Storage{ ... })
}
}The class is discovered and tracked — it just never reaches the response, and nothing says so.
The inconsistency
ceph.go already reports other missing configuration on the same object:
if sc.pool == "" {
log.Info("StorageClass does not have \"pool\" parameter set", "StorageClass", obj.Name)
}And rancher.go logs when a PV references a class it isn't tracking. So an operator is told about a missing pool parameter, and about a PV pointing at an untracked class — but not about the one condition that decides whether the class appears in inventory at all. Both files have a logger in scope at the filter site.
To Reproduce
- Create a StorageClass without the
akash.networklabel (all other configuration valid, PVCs binding normally) - Query
/v1/inventory storageis an empty array- Search the inventory-operator logs at any level — nothing references the class
Expected behavior
A log line when a discovered StorageClass is excluded, naming the class and the label:
StorageClass %q excluded from inventory: missing required label %q
Info would match the existing pool / clusterID messages in the same file; Warn reflects that an unlabelled class is almost always a misconfiguration. Either beats silence. Once per class per operator lifetime would be enough if log volume on repeated reconciles is a concern.
Additional context
Two things worth carrying into whatever wording is chosen.
Name the label explicitly. akash.network (a label) is easily confused with the documented akash.network/class and akash.network/persistent annotations — same namespace, different metadata type, different purpose. That confusion is the substance of #645.
Separate the two causes in ceph.go. The continue currently covers both !exists (cluster ID not in the df map) and !params.isAkashManaged. Different problems, different fixes; they shouldn't be silent in the same way or share a message.
On cost: root cause took 67 days to find on my provider, across two release lines, and was found by reading operator source rather than from any signal the software produced. #487 is a different operator on a different cluster with the identical symptom — their investigation covered RBAC verification, operator restarts, config comparison and full cluster reinstalls before stalling. Both cases look the same from outside: healthy Ceph, PVCs binding, clean logs, an empty array as the only observable.
Happy to open a PR if maintainers agree on the approach and preferred level.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsBacklog (not prioritized)
Activity