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 > CentOS > CentOS Development

 
 
LinkBack Thread Tools
 
Old 01-21-2009, 02:58 PM
Jesse Keating
 
Default Reset resolver before looking up IP address (bug 480858)

This patch now uses the existing isys call to reset the resolver.

I really have to start using -i with grep :/

--
Jes


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-21-2009, 03:09 PM
Jesse Keating
 
Default Reset resolver before looking up IP address (bug 480858)

On Wed, 2009-01-21 at 07:58 -0800, Jesse Keating wrote:
> This patch now uses the existing isys call to reset the resolver.
>
> I really have to start using -i with grep :/

I'm still not entirely happy with this, as I think there is a race
condition here. NM kicks things off as soon as the ifcfg-* file is
written out, which is done as part of self.write() in network.py. Just
after the ifcfg file is written, we try to construct the hosts file,
which relies on a working resolver. We don't actually block on the
network being up before we do the lookups.

I think what we really need to do here is split out the writing of the
ifcfg-* file from the rest of the files, and wait until network is up
before writing out the rest of the files. (actually writing out the
rest isn't really necessary during early network bring up I think, that
whole part can be delayed until the pre-install call where we write them
to the install filesystem).

David, what do you think?

--
Jesse Keating
Fedora -- Freedom˛ is a feature!
identi.ca: http://identi.ca/jkeating
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-21-2009, 04:59 PM
David Cantrell
 
Default Reset resolver before looking up IP address (bug 480858)

Jesse Keating wrote:
> On Wed, 2009-01-21 at 07:58 -0800, Jesse Keating wrote:
>> This patch now uses the existing isys call to reset the resolver.
>>
>> I really have to start using -i with grep :/
>
> I'm still not entirely happy with this, as I think there is a race
> condition here. NM kicks things off as soon as the ifcfg-* file is
> written out, which is done as part of self.write() in network.py. Just
> after the ifcfg file is written, we try to construct the hosts file,
> which relies on a working resolver. We don't actually block on the
> network being up before we do the lookups.
>
> I think what we really need to do here is split out the writing of the
> ifcfg-* file from the rest of the files, and wait until network is up
> before writing out the rest of the files. (actually writing out the
> rest isn't really necessary during early network bring up I think, that
> whole part can be delayed until the pre-install call where we write them
> to the install filesystem).
>
> David, what do you think?

We still need the call to reset the resolver simply because of how name
resolution works in glibc.

We could follow suit with NM and use libgio2 from glib2 to monitor
resolv.conf and hosts and reset when those change. I don't really want
to split out the writing of the config files from where they are, we
just need to listen to NM more closely and wait for things to finish on
its end. We've already got code to check the overall status of the
network connection. That combined with some libgio2 usage and sanity
checking of those files (maybe) could let us always have the resolver
reset once everything is in place.

--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-21-2009, 05:07 PM
Jesse Keating
 
Default Reset resolver before looking up IP address (bug 480858)

On Wed, 2009-01-21 at 07:59 -1000, David Cantrell wrote:
>
> We still need the call to reset the resolver simply because of how name
> resolution works in glibc.
>
> We could follow suit with NM and use libgio2 from glib2 to monitor
> resolv.conf and hosts and reset when those change. I don't really want
> to split out the writing of the config files from where they are, we
> just need to listen to NM more closely and wait for things to finish on
> its end. We've already got code to check the overall status of the
> network connection. That combined with some libgio2 usage and sanity
> checking of those files (maybe) could let us always have the resolver
> reset once everything is in place.

We were already calling the resolver reset, essentially in one location,
which was after we've monitored for NM to bring up the connection.
Unfortunately, within the call to bring up the NM connection, we call
network.write() which is where the trouble is. We use write() to tell
NM to bring up the connection, but within write, we're depending on
having a working connection.

--
Jesse Keating
Fedora -- Freedom˛ is a feature!
identi.ca: http://identi.ca/jkeating
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-21-2009, 05:32 PM
David Cantrell
 
Default Reset resolver before looking up IP address (bug 480858)

Jesse Keating wrote:
> On Wed, 2009-01-21 at 07:59 -1000, David Cantrell wrote:
>>
>> We still need the call to reset the resolver simply because of how name
>> resolution works in glibc.
>>
>> We could follow suit with NM and use libgio2 from glib2 to monitor
>> resolv.conf and hosts and reset when those change. I don't really want
>> to split out the writing of the config files from where they are, we
>> just need to listen to NM more closely and wait for things to finish on
>> its end. We've already got code to check the overall status of the
>> network connection. That combined with some libgio2 usage and sanity
>> checking of those files (maybe) could let us always have the resolver
>> reset once everything is in place.
>
> We were already calling the resolver reset, essentially in one location,
> which was after we've monitored for NM to bring up the connection.
> Unfortunately, within the call to bring up the NM connection, we call
> network.write() which is where the trouble is. We use write() to tell
> NM to bring up the connection, but within write, we're depending on
> having a working connection.

Correct, but that's more or less how we are feeding config data to NM
for the moment. Inside write(), where we depend on the network, we
should be waiting for NM rather than waiting in the one location.

I prefer the single write() function in the network.py file for
simplicity. All network information gets dumped out from there.

--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-21-2009, 05:48 PM
Jesse Keating
 
Default Reset resolver before looking up IP address (bug 480858)

On Wed, 2009-01-21 at 08:32 -1000, David Cantrell wrote:
> Correct, but that's more or less how we are feeding config data to NM
> for the moment. Inside write(), where we depend on the network, we
> should be waiting for NM rather than waiting in the one location.
>
> I prefer the single write() function in the network.py file for
> simplicity. All network information gets dumped out from there.

What about this. The first time we call write() we're writing so that
NetworkManager can be brought up, and if we have other information such
as DNS and whatnot, we write them out to resolv.conf. That should be
all we need to bringup and successfully use the network. The other
files, such as hosts and the udev policy file,
and /etc/sysconfig/network are only really useful to the /installed/
system, which we write out (twice right now) in pre-install (and again
in post-install).

What if we exit out of the write() call after having written the ifcfg-*
and /etc/resolv.conf files when we don't have an instPath (IE before
we've even talked to the repos), and only worry about writing those
other files when we're actually writing to the filesystem. This should
allow for networking to be up at the point we write out to the installed
filesystem (unless it wasn't a network install, in which point we never
got an IP address from the user to begin with).

I can work up a patch to this effect pretty quickly.

--
Jesse Keating
Fedora -- Freedom˛ is a feature!
identi.ca: http://identi.ca/jkeating
_______________________________________________
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 01:08 AM.

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