Discovery Plugin / Capsule and DNS SRV Record
So I'm trying to get the SRV option working for identifying the capsule name for newly discovered hosts . Been hacking at it for a bit, and I know I'm close, but need to close this last gap./
Have the following for the SRV record
# cat /var/named/dynamic/db.example.com $TTL 10800 @ IN SOA capsule.example.com. root.example.com. ( 1 ;Serial 86400 ;Refresh 3600 ;Retry 604800 ;Expire 3600 ;Negative caching TTL ) @ IN NS capsule.example.com. capsule.example.com. IN A 192.168.250.2 _x-foreman._tcp SRV 0 5 9090 capsule.example.com.
And the following is returned when I query for it by the FQDN
# dig @192.168.250.2 srv _x-foreman._tcp [root@capsule ~]# dig @192.168.250.2 srv _x-foreman._tcp.example.com ; >> DiG 9.9.4-RedHat-9.9.4-29.el7_2.3 >> @192.168.250.2 srv _x-foreman._tcp.example.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER- opcode: QUERY, status: NOERROR, id: 41900 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;_x-foreman._tcp.example.com. IN SRV ;; ANSWER SECTION: _x-foreman._tcp.example.com. 10800 IN SRV 0 5 9090 capsule.example.com. ;; AUTHORITY SECTION: example.com. 10800 IN NS capsule.example.com. ;; ADDITIONAL SECTION: capsule.example.com. 10800 IN A 192.168.250.2 ;; Query time: 0 msec ;; SERVER: 192.168.250.2#53(192.168.250.2) ;; WHEN: Tue Aug 09 14:17:02 EDT 2016 ;; MSG SIZE rcvd: 132
But the capsule won't retrieve the record when it boots and pulls DHCP / DNS information.
The APPEND Line is as follows:
APPEND initrd=boot/fdi-image-rhel_7-img rootflags=loop root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nomodeset proxy.type=proxy
The documentation seems to contradict itself, or its incorrect and should read "The proxy.type variable must be set to proxy in this case":
As an alternative to the above procedure, you can omit the proxy.url variable from the PXE-boot template. In this case, the Discovery image searches the DNS configuration file for an SRV record named x-foreman.tcp. The proxy.url variable must be set to proxy in this case. The DNS server must also be suitably configured. For example, the following configuration statement specifies the Capsule to be used with HTTPS:
On the client side I've got the following as the only real error message:
"Could not determine instance type, add foreman.url or proxy.url kernel...."
Anything glaringly obvious to anyone? Thanks!
Responses