#5627 ipa host-del fails with --updatedns option if ost does not have a dns record
Closed: Fixed None Opened 8 years ago by ofayans.

-bash-4.3$ ipa host-find
---------------
2 hosts matched
---------------
  Host name: vm-058-238.abc.idm.lab.eng.brq.redhat.com
  Principal name: host/vm-058-238.abc.idm.lab.eng.brq.redhat.com@DOM-058-238.ABC.IDM.LAB.ENG.BRQ.REDHAT.COM
  Password: False
  Member of host-groups: ipaservers
  Keytab: True
  Managed by: vm-058-238.abc.idm.lab.eng.brq.redhat.com
  SSH public key fingerprint: 8D:13:37:BC:E7:6D:4E:C7:6B:61:77:E2:8D:58:62:18 (ssh-ed25519), 4C:F3:56:37:95:37:04:FA:9B:84:9E:BE:08:0E:56:D0 (ssh-rsa),
                              4A:A9:E7:C3:4A:8C:DE:3B:BB:54:9B:D3:B4:10:2A:B2 (ecdsa-sha2-nistp256)

  Host name: vm-063.abc.idm.lab.eng.brq.redhat.com
  Principal name: host/vm-063.abc.idm.lab.eng.brq.redhat.com@DOM-058-238.ABC.IDM.LAB.ENG.BRQ.REDHAT.COM
  Password: False
  Keytab: True
  Managed by: vm-063.abc.idm.lab.eng.brq.redhat.com
  SSH public key fingerprint: 1D:11:04:50:8F:59:18:83:BB:F2:D6:90:B0:B2:4C:CA (ssh-rsa), E8:0D:91:0F:F0:9E:A5:B2:21:41:D8:13:DE:3E:C7:DC (ecdsa-sha2-nistp256),
                              F3:53:25:87:52:6A:A5:A7:13:C1:17:ED:7B:AE:E8:23 (ssh-ed25519)
----------------------------
Number of entries returned 2
----------------------------
-bash-4.3$ ipa host-del --updatedns vm-063.abc.idm.lab.eng.brq.redhat.com
ipa: ERROR: vm-063.abc.idm.lab.eng.brq.redhat.com: host not found

If ipa does not find the corresponding DNS A record for the host it should not fail to delete the host entry, should just show a warning that the operation would not affect DNS


This ticket is just about changing error message to warning.

The error message is plainly wrong. It seems that the host is not there but in fact NotFound was raised because of the DNS NotFound. Expected output is: "host deleted, dns not deleted" or something like that.

Devel note: host-mod and host-add with updatedns will fail, with the same NotFound error. Should be this fixed too?

master:

  • b23ad42 host-del --updatedns: print warnings instead of error

Leaving ticket opened, host-mod and host-del should be fixed too

Closing ticket, I opened separate tickets for host-add and host-mod issues:

  • 5816

  • 5817

Metadata Update from @ofayans:
- Issue assigned to mbasti
- Issue set to the milestone: FreeIPA 4.4

7 years ago

Login to comment on this ticket.

Metadata