Project

General

Profile

Actions

Bug #24087

open

Accepting multiple nodes with the same hostname should refuse all theses nodes

Added by Elaad FURREEDAN 3 months ago. Updated 11 days ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Web - Nodes & inventories
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
I was bothered the first time
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Priority:
22
Name check:
To do
Fix check:
To do
Regression:
No

Description

Summary

This ticket follow this correction: https://issues.rudder.io/issues/22197
When we have the setting node_accept_duplicated_hostname set to false and have at least two nodes with the same hostname in pending nodes, if we try to accept these nodes, we are accepting them in batch, so the first one is accepted, but then the following nodes are not accepted with an error message:

Error when trying to add node with id 'f2a41fc4-665e-4771-b93c-b5f329656ee2' <- There is already a node with hostname 'accept_new_server:check_hostname_unicity' in Rudder. You can not add it again.

How to reproduce

  1. make sure that the setting node_accept_duplicated_hostname set to false (by default it is set to false, it can be modified only through API)
  2. On both nodes, create a file like so:
    root@agent2:~# cat /var/rudder/hooks.d/override-hostname.sh 
    #!/bin/sh
    echo '{"rudder_override_hostname": "toto.local.rudder"}'
    
  3. chmod +x /var/rudder/hooks.d/override-hostname.sh
  4. If there are already accepted, you can delete them on the node page
  5. Re-send the inventory on the server with the command: rudder agent inventory
  6. The nodes should appear on Pending nodes page
  7. Select the nodes and try to accept them
  8. Witness that only one node was accepted

Ideas

I don't think it is the right way to do, we should refuse to accept all the selected nodes (with duplicated hostname) with an error message, and not only accepted one node and refuse the other, because the user should be able to choose from which node he wants to accept


Files

clipboard-202401251846-yrkee.png (169 KB) clipboard-202401251846-yrkee.png Elaad FURREEDAN, 2024-01-25 18:46
Actions #1

Updated by Vincent MEMBRÉ 3 months ago

  • Target version changed from 7.3.11 to 7.3.12
Actions #2

Updated by Vincent MEMBRÉ 2 months ago

  • Target version changed from 7.3.12 to 7.3.13
Actions #3

Updated by Vincent MEMBRÉ about 2 months ago

  • Target version changed from 7.3.13 to 7.3.14
Actions #4

Updated by Vincent MEMBRÉ 11 days ago

  • Target version changed from 7.3.14 to 7.3.15
  • Priority changed from 23 to 22
Actions

Also available in: Atom PDF