[WIP] Add support to configure hosts automatically / host discovery #9

Open
opened 2021-11-20 11:24:45 +00:00 by ungleich-gitea · 0 comments

Objective

Be able to boot/netboot a host and have it automatically configured with cdist.

Methods for discovery

ICMP6

In the PoC cdist scan we uses scapy/ icmp6 on the IPv6 all hosts multicast group. This is rather reliable to find "all active hosts" on a layer 2 segment. However this requires root privileges. In theory we could drop root rights, but then would need some kind of --user argh. It is not clear whether this could not be solved nicer, as it is not clear whether icmp6 needs raw socket access.

This might actually easy be separately using pipes:

sudo cdist scan | ...

And cdist scan output would be interpreted as a regular user.

ping/icmp

Similar idea on broadcasting, untested.

Host lists / patterns

  • If we have lists or patterns, we could scan for those
  • Could be related to the inventory

Inventory only (?)

  • Advantage: easy to implement
  • Disadvantage: no dynamic discovery, but could do alive discovery only

Operational challenges

  • It has to be decided, when a configuration (or even installation run is triggered
  • Scan might output link local addresses
    ** We might need to maps this to other name(s) used usually in the manifest
  • The configuration interval might be different from the scan interval

Steps

(tbd)

## Objective Be able to boot/netboot a host and have it automatically configured with cdist. ## Methods for discovery ### ICMP6 In the PoC `cdist scan` we uses scapy/ icmp6 on the IPv6 all hosts multicast group. This is rather reliable to find "all active hosts" on a layer 2 segment. However this requires root privileges. In theory we could drop root rights, but then would need some kind of `--user` argh. It is not clear whether this could not be solved nicer, as it is not clear whether icmp6 needs raw socket access. This might actually easy be separately using pipes: ``` sudo cdist scan | ... ``` And `cdist scan` output would be interpreted as a regular user. ### ping/icmp Similar idea on broadcasting, untested. ### Host lists / patterns * If we have lists or patterns, we could scan for those * Could be related to the inventory ### Inventory only (?) * Advantage: easy to implement * Disadvantage: no dynamic discovery, but could do alive discovery only ## Operational challenges * It has to be decided, when a configuration (or even installation run is triggered * Scan might output link local addresses ** We might need to maps this to other name(s) used usually in the manifest * The configuration interval might be different from the scan interval ## Steps (tbd)
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#9
No description provided.