FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 10-30-2009, 10:20 PM
David Cantrell
 
Default Do not modify /etc/hosts from setup package (#530343).

Adding the user-specified hostname to the 127.0.0.1 line is breaking
virt systems, among other things. I'm not entirely sure we need this
functionality anymore (faking the hostname as 127.0.0.1).

This reverts the changes done in
1aa67d5a2cdacd45f92ba15aa9392ba7191a49c7, but looking at the comments
for #506384, you'll see the same complaints as #530343 has are present.
---
network.py | 23 -----------------------
1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/network.py b/network.py
index 248255a..cb2a8e7 100644
--- a/network.py
+++ b/network.py
@@ -677,29 +677,6 @@ class Network:
if domainname:
self.domains = [domainname]

- # /etc/hosts
- # update lines for 127.0.0.1 and ::1 with hostname if the file exists
- if instPath and os.path.isfile(instPath + "/etc/hosts"):
- of = open(instPath + "/etc/hosts", "r")
- updatedlines = []
- update = False
- for line in of:
- line = line.strip()
- if line.startswith('127.0.0.1') or line.startswith('::1'):
- if self.hostname not in line.split():
- line += " %s" % self.hostname
- update = True
- updatedlines.append(line)
- of.close()
-
- if update:
- nf = open(instPath + "/etc/hosts", "w")
- upd_comment = "# hostname %s added to /etc/hosts by anaconda
" % self.hostname
- nf.write(upd_comment + '
'.join(updatedlines) + '
')
- nf.close()
- log.info("/etc/hosts updated with hostname %s" % self.hostname)
-
-
# /etc/resolv.conf
if (not instPath) or (not os.path.isfile(instPath + '/etc/resolv.conf')) or flags.livecdInstall:
if os.path.isfile('/etc/resolv.conf') and instPath != ':
--
1.6.2.5

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 11-02-2009, 11:09 PM
David Cantrell
 
Default Do not modify /etc/hosts from setup package (#530343).

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 1 Nov 2009, Jeremy Katz wrote:


On Fri, Oct 30, 2009 at 6:20 PM, David Cantrell <dcantrell@redhat.com> wrote:

Adding the user-specified hostname to the 127.0.0.1 line is breaking
virt systems, among other things. *I'm not entirely sure we need this
functionality anymore (faking the hostname as 127.0.0.1).


Can you try booting a system with the hostname set to something which
is unresolvable and see if httpd and/or sendmail hang/take forever on
startup? I think those were the main things which were unhappy at one
point with not being able to resolve the hostname.



Looks like those hangs are finally gone. Both sendmail and httpd start up
just fine with the /etc/hosts file as provided by the setup RPM and hostname
set to 'unreachablehost' (which is not configured on my LAN to resolve to
anything).

Tried this with the latest rawhide tree.

- --
David Cantrell <dcantrell@redhat.com>

Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrvdMcACgkQ5hsjjIy1VknYHACbBfRh7o4veh fA++aykTefWY3G
VTsAn3PzOfO9HhG7jLGoHyJt6La+laE9
=mlcI
-----END PGP SIGNATURE-----_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 11-03-2009, 09:43 PM
David Cantrell
 
Default Do not modify /etc/hosts from setup package (#530343).

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 2 Nov 2009, Jeremy Katz wrote:


On Mon, Nov 2, 2009 at 7:09 PM, David Cantrell <dcantrell@redhat.com> wrote:

On Sun, 1 Nov 2009, Jeremy Katz wrote:

On Fri, Oct 30, 2009 at 6:20 PM, David Cantrell <dcantrell@redhat.com> wrote:

Adding the user-specified hostname to the 127.0.0.1 line is breaking
virt systems, among other things. *I'm not entirely sure we need this
functionality anymore (faking the hostname as 127.0.0.1).


Can you try booting a system with the hostname set to something which
is unresolvable and see if httpd and/or sendmail hang/take forever on
startup? *I think those were the main things which were unhappy at one
point with not being able to resolve the hostname.


Looks like those hangs are finally gone. *Both sendmail and httpd start up
just fine with the /etc/hosts file as provided by the setup RPM and hostname
set to 'unreachablehost' (which is not configured on my LAN to resolve to
anything).


Hooray! And some of the last vestiges of severe "WTF" inspiring code
can go away.

Thanks for double-checking it


It is always nice to see minus signs in patches.

- --
David Cantrell <dcantrell@redhat.com>

Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrwsioACgkQ5hsjjIy1VknhcACfWRp6fOLq31 iwjikb4yuTIA9g
eXkAn3pK/jK8Q67Pa2rPRWD8pAisCRC8
=+saW
-----END PGP SIGNATURE-----_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org