freeipa

FreeIPA is an integrated Identity and Authentication solution for Linux/UNIX networked environments.  |  http://www.freeipa.org/

#971 ipa-server-install can't cope with blank or erroneous lines in /etc/hosts

Created 6 years ago by jcholast
Modified 4 months ago

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
4 months ago

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

Login to comment on this ticket.

defect

Installation

1

0

cancel