Merge pull request #16109 from hit1943/fix_crash_for_null_lables

osd: Exclude labels with a value of null from the topology string
This commit is contained in:
Travis Nielsen authored and GitHub committed 2025-07-30 16:40:39 -06:00
commit cc9da689f7
1 file changed
+1 -1
@@ -102,7 +102,7 @@ func extractTopologyFromLabels(labels map[string]string) (map[string]string, str
// for the topology affinity
for _, label := range allKubernetesTopologyLabels {
topologyID := kubernetesTopologyLabelToCRUSHLabel(label)
if value, ok := labels[label]; ok {
if value, ok := labels[label]; ok && value != "" {
topology[topologyID] = value
if topologyID != "host" {
topologyAffinity = formatTopologyAffinity(label, value)