openSUSE / orthos2

Orthos is a machine administration tool.
GNU General Public License v2.0
14 stars 12 forks source link

Preserve IPs of the managed hosts in the Orthos database #253

Open SchoolGuy opened 3 months ago

SchoolGuy commented 3 months ago

Cobbler can manage the DNS of one or more networks. Currently, the DNS needs to be manually maintained if Orthos is managing a network which means that every new host that is added to Orthos needs to be added to the DNS first.


As Orthos is not aware of the concept of a "Network" we will need a new model called "Network" that has the following attributes:

The Machine model needs to be enabled so support two new flags: disable_ipv4 & disable_ipv6

The same two flags that the machine has need to be added to the "BMC" model with the addition of the ipv4 and ipv6 fields.


The hard part is the logic of what address is offered for a particular host. We have of course several options for this but the most important part is that an administrator can always override the offer and specify the needed address. I have not listed the options in my head because none of them are fitting enough to be written down.


Migration:

  1. Automatic: Collect the remaining addresses from DNS and enter them into the database.
  2. Manual: Copy the zonefile for IPv4 and IPv6 and remove all machines that are now generated by Cobbler.
  3. Manual: Add an include to the remaining machines.
SchoolGuy commented 3 months ago

@hreinecke proposed the following:

A field is added to the newly planned "Network" model that saves the highest IP that has been handed out by Orthos. This means that this pointer will rise until it has exhausted the subnet. After that, the pointer resets to the start of the subnet to then find wholes that can be filled.

He further mentioned that there is no need to keep the machine and BMC grouped together as such we need exactly one IP per request to the recommendation algorithm.

Regarding migration: We internally have a big subnet and I should attempt to use a range in that subnet that is unused according to the current historic way to allocate IPs.