#971 ipa-server-install can't cope with blank or erroneous lines in /etc/hosts
Closed: Fixed None Opened 13 years ago by jcholast.

ipa-server-install --setup-dns fails with:

2011-02-15 16:15:47,561 DEBUG list index out of range
  File "/usr/sbin/ipa-server-install", line 948, in <module>
    sys.exit(main())

  File "/usr/sbin/ipa-server-install", line 884, in main
    bind.create_instance()

  File "/usr/lib/python2.7/site-packages/ipaserver/install/bindinstance.py", line 300, in create_instance
    if not installutils.record_in_hosts(self.ip_address, self.fqdn):

  File "/usr/lib/python2.7/site-packages/ipaserver/install/installutils.py", line 162, in record_in_hosts
    hosts_ip = line.split()[0]

Example of said /etc/hosts:

1.2.3.4 host # this comment gets parsed as a hostname too!

# the blank line above causes trouble
someuglystuff
# the line above is erroneous and should be ignored

Metadata Update from @jcholast:
- Issue assigned to jcholast
- Issue set to the milestone: FreeIPA 2.0.2 RC2 (bug fixing)

7 years ago

Login to comment on this ticket.

Metadata