From 60eac9864320ea128e67b6fa8e1e6f7c0fd5e7f9 Mon Sep 17 00:00:00 2001
From: Brian Christiansen <brian@schedmd.com>
Date: Wed, 7 Jun 2017 14:29:11 -0600
Subject: [PATCH] Fix updating node features with no feature plugin

When not using a nodefeatureplugin the new feature string should just be
duplicated and returned.

Continuation of 6690685a08
---
 src/common/node_features.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/common/node_features.c b/src/common/node_features.c
index 0bc73e68fb8..6fec8f0892f 100644
--- a/src/common/node_features.c
+++ b/src/common/node_features.c
@@ -421,6 +421,10 @@ extern char *node_features_g_node_xlate2(char *new_features)
 	START_TIMER;
 	(void) node_features_g_init();
 	slurm_mutex_lock(&g_context_lock);
+
+	if (!g_context_cnt)
+		new_value = xstrdup(new_features);
+
 	for (i = 0; i < g_context_cnt; i++) {
 		if (new_value)
 			tmp_str = xstrdup(new_value);
-- 
GitLab