Skip to content

Node descriptions containing both spaces and numbers prevent pillar creation #15540

@akibako

Description

@akibako

Description
While troubleshooting the issue outlined at #15521, I found that the root cause is that node descriptions which containing both spaces and numbers (specifically, a number that occurs after one or more spaces) result in an xargs parsing error which prevents the creation of the node's pillar. This prevents the node from being successfully added to the Grid. I have tested this with only Search and Fleet nodes, but I assume that other node types also fall victim.
Similarly, a description that contains spaces but no numbers will not fail so severely, but the node's description will only contain the characters before the first space, again due to xargs parsing.

To Reproduce

  1. Configure a Manager or ManagerSearch node.
  2. Configure a Search node "A" with a description that contains spaces and numbers, such as "Search Node 1"
  3. In SOC, approve the pending Search node "A". After about 15 seconds, the error "Unable to manage minion; ensure that salt is running on the manager node and check salt logs" will appear.
  4. While the Search node's salt keys have been successfully approved, the Search node will never appear in the Grid.
  5. Configure a Search node "B" with a description that does not contain any spaces, but may optionally contain numbers, such as "Search_Node_1"
  6. In SOC, approve the pending Search node "B". No error will occur and the node will show up in the Grid after a few minutes, as expected.

Expected behavior
Since descriptions commonly imply sentence-based text input that will likely include spaces and numbers, either accept descriptions with such strings, or clearly indicate in the cursor UI that spaces should not be used.

Additional context
The problem can alternately be reproduced and tracked down as follows:

Attempt to manually create a node pillar. The "/sbin/so-minion: line 136: export: `1': not a valid identifier" error is the smoking gun.

[admin@myManager ~]$ sudo so-minion -o=add -m=myNode_searchnode
The key glob 'myNode_searchnode' does not match any unaccepted keys.
Executing command with retry support: grep 'Authentication accepted from myNode_searchnode' /opt/so/log/salt/master
Results: yyyy-mm-dd HH:mm:ss,SSS [salt.channel.server:720 ][INFO    ][3789] Authentication accepted from myNode_searchnode (0)
Executing command with retry support: salt 'myNode_searchnode' test.ping
Results: myNode_searchnode:
    True (0)
/sbin/so-minion: line 136: export: `1': not a valid identifier
[admin@myManager ~]$

/opt/so/log/so-minion.log will show the error "Failed to source install variables", which pinpoints the problematic area in the code.

[2026-02-26 01:12:35] [INFO] Setting up minion files for myManager_manager
[2026-02-26 01:12:35] [INFO] Setting socore ownership on minion files
[2026-02-26 01:12:35] [INFO] Creating MANAGER configuration for minion myManager_manager
[2026-02-26 01:12:35] [INFO] Setting socore ownership on minion files
[2026-02-26 01:12:35] [INFO] Successfully created minion files for myManager_manager
[2026-02-26 01:12:35] [INFO] Successfully completed setup for minion myManager_manager
[2026-02-26 04:06:45] [INFO] Restarting minion myManager_manager
### Initial UI-based attempt to add the node
[2026-02-26 05:15:10] [INFO] Adding minion myNode_searchnode
[2026-02-26 05:15:10] [INFO] Starting minion addition process for myNode_searchnode
[2026-02-26 05:15:10] [INFO] Accepting minion myNode_searchnode
[2026-02-26 05:15:12] [INFO] Testing connection to minion myNode_searchnode
[2026-02-26 05:15:20] [INFO] Getting install info for minion myNode_searchnode
[2026-02-26 05:15:22] [ERROR] Failed to source install variables
[2026-02-26 05:15:22] [ERROR] Failed to get installation information
[2026-02-26 05:15:22] [ERROR] Failed to add minion myNode_searchnode
### Manual attempt to add the node pillar using so-minion
[2026-02-26 05:50:59] [INFO] Adding minion myNode_searchnode
[2026-02-26 05:50:59] [INFO] Starting minion addition process for myNode_searchnode
[2026-02-26 05:50:59] [INFO] Accepting minion myNode_searchnode
[2026-02-26 05:51:01] [INFO] Testing connection to minion myNode_searchnode
[2026-02-26 05:51:03] [INFO] Getting install info for minion myNode_searchnode
[2026-02-26 05:51:04] [ERROR] Failed to source install variables
[2026-02-26 05:51:04] [ERROR] Failed to get installation information
[2026-02-26 05:51:04] [ERROR] Failed to add minion myNode_searchnode

Line 136 of /sbin/so-minion is in the getinstallinfo() function. xargs parses /opt/so/install.txt on the minion. If the NODE_DESCRIPTION value within install.txt contains spaces and numbers, xargs will parse that string using the spaces as a delimiter, which causes export to fail because numbers cannot be used as a variable name.

127 function getinstallinfo() {
128         log "INFO" "Getting install info for minion $MINION_ID"
129         # Pull from file
130         INSTALLVARS=$(sudo salt "$MINION_ID" cp.get_file_str /opt/so/install.txt --out=newline_values_only)
131         if [ $? -ne 0 ]; then
132                 log "ERROR" "Failed to get install info from $MINION_ID"
133                 return 1
134         fi
135
136         export $(echo "$INSTALLVARS" | xargs)
137         if [ $? -ne 0 ]; then
138                 log "ERROR" "Failed to source install variables"
139                 return 1
140         fi
141 }

The cause of this parsing problem can be clearly seen by running a similar, pre-parsing command on the Manager:

[admin@myManager ~]$ sudo salt "myNode_searchnode" cp.get_file_str /opt/so/install.txt --out=newline_values_only | xargs
MAINIP=192.168.1.10 MNIC=ens18 NODE_DESCRIPTION=Search Node 1 ES_HEAP_SIZE=5300m PATCHSCHEDULENAME= INTERFACE=bond0 NODETYPE=SEARCHNODE CORECOUNT= LSHOSTNAME=myNode LSHEAP=500m CPUCORES=4 IDH_MGTRESTRICT= IDH_SERVICES=

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions