openSUSE / orthos2

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

Hostnamefinder not working for non `10.161.x.x` networks #224

Open SchoolGuy opened 1 year ago

SchoolGuy commented 1 year ago

There are two problems: The hostnamefinder

  1. can only be utilized for 10.161.x.x networks.
  2. has a superfluous argument --arch that is not used and not required.
watologo1 commented 1 year ago

I implemented the hostname finder for 10.168. x86_64 as well. But only as Django script:

orthos2:~ # manage --help
...
[data]
    create_ansible_inventory
    dump_db
    find_hostname
    modif_provo
...
orthos2:~ # manage find_hostname
[orthos][II]: Found alternative settings: /etc/orthos2/settings
Checking for:
Domain: arch.suse.de
Architecture: x86_64

Found 218 used machines:
['abaco.arch.suse.de', 'acamar.arch.suse.de', 'acrux.arch.suse.de', 'acubens.arch.suse.de', 'albali.arch.suse.de', 'alchiba.arch.suse.de', ... 
Found 200 unused machine names:
['abert.arch.suse.de', 'achrid.arch.suse.de', 'alamak.arch.suse.de', 'alasco.arch.suse.de', 'ades.arch.suse.de', 'adler.arch.suse.de', ...

IMO this was enough for most requirements and the low-hanging fruit. Putting this into the orthos2 GUI with changing naming requirements for different archs/locations is a hard thing to do. Ideally, this is done through cobbler anyway.