DNS/DHCP setup for deploying new computers?

ttblum
Beiträge: 97
Registriert: 23 Jun 2017, 14:18
Wohnort: Cleveland, Ohio USA

DNS/DHCP setup for deploying new computers?

Beitrag von ttblum »

It looks like the opsi PXE client needs the computer's DNS name to match it's IP address.

However, when I have a brand new computer it doesn't have any DNS records yet.

I've configured my router to register DHCP clients in DNS, but the opsi PXE clients all identify themselves as 'opsi-client'. This may not work for deploying many new computers at once if they all have the same name.

Is there a better way I should be doing this?
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: DNS/DHCP setup for deploying new computers?

Beitrag von m.radtke »

Hi
easy way:
Cant you enter the client into the DNS before you deploy them?

Less easy way:
Use the client netboot CD to register the client to the opsi server.

Cheers
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
uncle_scrooge
Beiträge: 650
Registriert: 21 Feb 2012, 12:03
Wohnort: Mainz

Re: DNS/DHCP setup for deploying new computers?

Beitrag von uncle_scrooge »

@Mathias
This isn't just a DNS issue.
If one boots from CD or ISO he will be presented with a mask for setting IP-address, gateway, whatever. And the client name.
But if you boot the current bootcd image from within the PXE menu this mask is missing. Leaving you unable to change the client name.
And the client you just started gets registered as 'opsi client' in both DNS and OPSI.
Would consider it a bug. Or a major annoyance, if you like.
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: DNS/DHCP setup for deploying new computers?

Beitrag von n.wenselowski »

Hi,
uncle_scrooge hat geschrieben:@Mathias
If one boots from CD or ISO he will be presented with a mask for setting IP-address, gateway, whatever. And the client name.
But if you boot the current bootcd image from within the PXE menu this mask is missing. Leaving you unable to change the client name.
And the client you just started gets registered as 'opsi client' in both DNS and OPSI.
Would consider it a bug. Or a major annoyance, if you like.
Do you boot with DHCP from the CD?
If I remember correctly the mask is only shown if some information is missing.


Kind regards

Niko

Code: Alles auswählen

import OPSI
uncle_scrooge
Beiträge: 650
Registriert: 21 Feb 2012, 12:03
Wohnort: Mainz

Re: DNS/DHCP setup for deploying new computers?

Beitrag von uncle_scrooge »

Booting from CD/ISO-image always leaves the information for 'config server' empty. Neither the CD nor a DHCP server knows anything about it.
So the input mask is always displayed.

Booting the bootcd image from within the PXE menu is a different beast.
As you can see in the append line
append initrd=miniroot-x64.bz2 video=vesa:ywrap,mtrr vga=791 quiet splash --no-log console=tty1 console=ttyS0 service=https://192.100.100.223:4447/rpc
the config server is given as a parameter. If a DHCP server provides all further needed information, the initial input mask is not displayed.
Omitting 'service=https://192.100.100.223:4447/rpc' gets you to the same behaviour as booting from CD/ISO.

There should be another input mask where I would be able to change the default client name 'opsi-client'.
ttblum
Beiträge: 97
Registriert: 23 Jun 2017, 14:18
Wohnort: Cleveland, Ohio USA

Re: DNS/DHCP setup for deploying new computers?

Beitrag von ttblum »

This is what's in my /tftpboot/linux/pxelinux.cfg/default.menu:

Code: Alles auswählen

append initrd=miniroot-x64.bz2 video=vesa:ywrap,mtrr vga=791 lang=en quiet splash --no-log console=tty1 console=ttyS0
I'll try the ISO to see if I'm able to change the hostname there.
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: DNS/DHCP setup for deploying new computers?

Beitrag von m.radtke »

it shoud be

Code: Alles auswählen

append initrd=miniroot.bz2 video=vesa:ywrap,mtrr vga=791 quiet splash --no-log console=tty1 console=ttyS0 service=https://10.100.1.30:4447/rpc
the service is missing.

cant tell why
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
ttblum
Beiträge: 97
Registriert: 23 Jun 2017, 14:18
Wohnort: Cleveland, Ohio USA

Re: DNS/DHCP setup for deploying new computers?

Beitrag von ttblum »

I still get the error message:

Code: Alles auswählen

Backend I/O error:  Cannot update the dhcpd configuration for client test-opsi.xxxxx.com:  ip address unknown and failed to get host by name
This is happening when I boot from PXE or from CD.

Note that I'm running the DHCP for this network on my router, and the DNS is running on my Windows server. I'm not running either dhcpd or DNS on the opsi server itself.

When I turn the machines on they don't have IP addresses assigned to them yet, so I'm not able to set DNS A records ahead of time.
uncle_scrooge
Beiträge: 650
Registriert: 21 Feb 2012, 12:03
Wohnort: Mainz

Re: DNS/DHCP setup for deploying new computers?

Beitrag von uncle_scrooge »

That's a different one. Looks like a misconfiguration.
Please provide content of /etc/opsi/backendManager/dispatch.conf
ttblum
Beiträge: 97
Registriert: 23 Jun 2017, 14:18
Wohnort: Cleveland, Ohio USA

Re: DNS/DHCP setup for deploying new computers?

Beitrag von ttblum »

Ok, here is my /etc/opsi/backendManager/dispatch.conf :

Code: Alles auswählen

# -*- coding: utf-8 -*-
# = = = = = = = = = = = = = = = = = = = = = = =
# =      backend dispatch configuration       =
# = = = = = = = = = = = = = = = = = = = = = = =
#
# This file configures which methods are dispatched to which backends.
# Entries has to follow the form:
# <regular expression to match method name(s)> : <comma separated list of backend name(s)>
#
# Backend names have to match a backend configuraton file basename <backend name>.conf beneath /etc/opsi/backends.
# For every method executed on backend dispatcher the first matching regular expression will be decisive.
#
# Typical configurations:
#    file, opsipxeconfd and dhcpd backend:
#       backend_.*         : file, opsipxeconfd, dhcpd
#       host_.*            : file, opsipxeconfd, dhcpd
#       productOnClient_.* : file, opsipxeconfd
#       configState_.*     : file, opsipxeconfd
#       .*                 : file
#
#    jsonrpc, opsipxeconfd and dhcpd backend:
#       backend_.*         : jsonrpc, opsipxeconfd, dhcpd
#       .*                 : jsonrpc
#
#    file as main backend, mysql as hw/sw invent and license management backend, opsipxeconfd and dhcpd backend:
#       backend_.*         : file, mysql, opsipxeconfd, dhcpd
#       host_.*            : file, opsipxeconfd, dhcpd
#       productOnClient_.* : file, opsipxeconfd
#       configState_.*     : file, opsipxeconfd
#       license.*          : mysql
#       softwareLicense.*  : mysql
#       audit.*            : mysql
#       .*                 : file
#

backend_.*         :file, opsipxeconfd, dhcpd, mysql
host_.*            :file, opsipxeconfd, dhcpd
productOnClient_.* :file, opsipxeconfd
configState_.*     :file, opsipxeconfd

license.*:mysql
softwareLicense.*:mysql
audit.*:mysql
.*:file
Antworten