IPs are not registered in freeipa with novajoin

Bug #1704233 reported by Szilvia Racz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
novajoin
Confirmed
Medium
Unassigned

Bug Description

We are using novajoin in tripleo overcloud installation. Not all of the IP addresses are defined in our templates (neither pre-registered in DNS), and we would like to register the correct IPs in freeipa DNS on the fly during the installation. It's not very trivial to achieve this, we ended up using tricky customizations without touching the official yaml workflow.

Also there are couple of problems when the host is enrolled during cloud-init:
1. only works with cloud-init version which is not officially available on CentOS
2. it is unpredictable whether enrollment is successful at cloud-init time, since the network may not be ready when vendordata provided job runs
3. the enrollment picks up the first IP address which may not be the correct one according to the final hosts file created
We have found it better to curl the OTP token at later stage and register it with the correct IP based on role type.

It would be great if DNS registration could be solved in future versions.

Changed in novajoin:
status: New → Confirmed
Revision history for this message
Juan Antonio Osorio Robles (juan-osorio-robles) wrote :

Point #1 is being addressed, and a newer CentOS version will include a newer cloud-init.

can you ellaborate more on point #2?

Picking up a correct IP (at least in TripleO) is tricky, since network isolation means that there are several valid IPs for that node. On the other hand, we do create (in the overcloud deployment) several "sub-hosts" for the specific networks that could be associated with the IPs. perhaps, we could specify in the metadata which interface to get the IP from, and use that in the cloud-init script? What do you think?

Changed in novajoin:
importance: Undecided → Medium
Revision history for this message
Szilvia Racz (sziike) wrote :
Download full text (4.9 KiB)

#2: this is what happens on different hosts:

Sep 7 13:30:57 localhost systemd: Starting Initial cloud-init job (pre-networking)...
Sep 7 13:31:07 localhost systemd: Started Initial cloud-init job (pre-networking).
Sep 7 13:31:07 localhost systemd: Starting Initial cloud-init job (metadata service crawler)...
Sep 7 13:31:11 localhost dhclient[1793]: DHCPREQUEST on eno1 to 255.255.255.255 port 67 (xid=0x5371f3d4)
Sep 7 13:31:11 localhost dhclient[1793]: DHCPACK from 192.168.34.21 (xid=0x5371f3d4)
Sep 7 13:31:17 localhost systemd: Started Initial cloud-init job (metadata service crawler).

Sep 7 13:30:48 localhost systemd: Starting Initial cloud-init job (pre-networking)...
Sep 7 13:30:58 localhost systemd: Started Initial cloud-init job (pre-networking).
Sep 7 13:30:58 localhost systemd: Starting Initial cloud-init job (metadata service crawler)...
Sep 7 13:31:02 localhost dhclient[1859]: DHCPREQUEST on eno1 to 255.255.255.255 port 67 (xid=0x1c002ffc)
Sep 7 13:31:02 localhost dhclient[1859]: DHCPACK from 192.168.34.21 (xid=0x1c002ffc)
Sep 7 13:31:08 localhost systemd: Started Initial cloud-init job (metadata service crawler).

Sep 7 13:31:03 localhost systemd: Starting Initial cloud-init job (pre-networking)...
Sep 7 13:31:06 localhost systemd: Started Initial cloud-init job (pre-networking).
Sep 7 13:31:06 localhost systemd: Starting Initial cloud-init job (metadata service crawler)...
Sep 7 13:31:09 localhost systemd: Started Initial cloud-init job (metadata service crawler).
Sep 7 13:31:20 localhost dhclient[1908]: DHCPREQUEST on eno1 to 255.255.255.255 port 67 (xid=0x3a5e2888)
Sep 7 13:31:20 localhost dhclient[1908]: DHCPACK from 192.168.34.21 (xid=0x3a5e2888)

Sep 7 13:31:27 localhost systemd: Starting Initial cloud-init job (pre-networking)...
Sep 7 13:31:30 localhost systemd: Started Initial cloud-init job (pre-networking).
Sep 7 13:31:30 localhost systemd: Starting Initial cloud-init job (metadata service crawler)...
Sep 7 13:31:33 localhost systemd: Started Initial cloud-init job (metadata service crawler).
Sep 7 13:31:43 localhost dhclient[1919]: DHCPREQUEST on eno1 to 255.255.255.255 port 67 (xid=0x4e1fba9e)
Sep 7 13:31:43 localhost dhclient[1919]: DHCPACK from 192.168.34.21 (xid=0x4e1fba9e)

Sep 7 13:30:12 localhost systemd: Starting Initial cloud-init job (pre-networking)...
Sep 7 13:30:21 localhost systemd: Started Initial cloud-init job (pre-networking).
Sep 7 13:30:21 localhost systemd: Starting Initial cloud-init job (metadata service crawler)...
Sep 7 13:30:26 localhost dhclient[1809]: DHCPREQUEST on eno1 to 255.255.255.255 port 67 (xid=0x4a9c74c)
Sep 7 13:30:26 localhost dhclient[1809]: DHCPACK from 192.168.34.21 (xid=0x4a9c74c)
Sep 7 13:30:32 localhost systemd: Started Initial cloud-init job (metadata service crawler).

Sep 7 13:30:59 localhost systemd: Starting Initial cloud-init job (pre-networking)...
Sep 7 13:31:09 localhost systemd: Started Initial cloud-init job (pre-networking).
Sep 7 13:31:09 localhost systemd: Starting Initial cloud-init job (metadata service crawler)...
Sep 7 13:31:14 localhost dhclient[1837]: DHCPREQUEST on eno1 to 255.255.255.255 port 67 (xid=0x2c8336cf)
S...

Read more...

Revision history for this message
Szilvia Racz (sziike) wrote :

Hi Guys,

This is how we do it with the operator yaml workflow:
https://github.com/wignerdc/tripleo-freeipa-integration

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.