#8726 Provide a better error message with updatedns and FQDN Is not provided
Closed: fixed by frenaud. Opened by rcritten.

Issue

The --updatedns option for host-mod requires a FQDN otherwise an obscure error message is shown, 'idnsname' is required.

What it means is that a FQDN isn't key[0] so the zone can't be determined.

Steps to Reproduce

1.
$ ipa host-mod client --platform=linux --updatedns
ipa: ERROR: 'idnsname' is required


Metadata Update from @antorres:
- Issue assigned to antorres

Could you provide more info on how to reproduce? I can't reproduce it:

[root@master ~]# ipa host-add client.ipa.local --ip-address=10.0.139.223
-----------------------------
Added host "client.ipa.local"
-----------------------------
  Host name: client.ipa.local
  Principal name: host/client.ipa.local@IPA.LOCAL
  Principal alias: host/client.ipa.local@IPA.LOCAL
  Password: False
  Keytab: False
  Managed by: client.ipa.local
[root@master ~]# ipa host-mod client --platform=linux --updatedns
----------------------
Modified host "client"
----------------------
  Host name: client.ipa.local
  Platform: linux
  Principal name: host/client.ipa.local@IPA.LOCAL
  Principal alias: host/client.ipa.local@IPA.LOCAL
  Password: False
  Keytab: False
  Managed by: client.ipa.local

I tried again with a pretty recent master (d8b8f54bceb585b5c9b14c1d03e77a4c2cad3ae9) and I can reproduce this exactly as I reported it.

I don't know if using local as the tld is related or not but it's a special zone for use with multicast DNS. I use .test instead and that's where I the failure.

PR https://github.com/freeipa/freeipa/pull/5826

master:

  • 3a4939fa390667e964248bbc3ec4a050910ae6c8 host: try to resolve FQDN before command execution
  • 3e77d3132fe44cc2ec579b0e41f92d9a7a558d4c ipatests: test host update using shortname

ipa-4-9:

  • 48370cb3e8fa928dcc51406a4a5e7dbe5bf8243f host: try to resolve FQDN before command execution
  • 27a65a1a352b50304fa6765a535443993b445044 ipatests: test host update using shortname

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata