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:
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)
|
||||
|
||||
Reference in new issue
Block a user