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 > Redhat > Fedora User

LinkBack Thread Tools
Old 01-02-2012, 11:36 AM
Radek Vykydal
Default Reprompt for network configuration if error during NFS install

I am in doubts whether the fix is worth the risk of breaking something
else. The code for network setup in loader is fragile using all the
*_set and other flags, and it is easy to break some unpredicted path
of installation. Also we are going to get rid of all this code in loader
in Fedora.

It seems to me that the real problem here is that the fail of
network activation ([Retry]) should be handled in readNetConfig,
but this would probably need some significant code consolidation /

of both uses of the readNetConfig (STEP_NETWORK and
kickstartNetworUp -> activateDevice). My opinion on fixing this is:

Your patch assumes that rc == LOADER_ERROR for
rc = installMethods[validMethods[loaderData->method]].prompt(loaderData);
means fail of network configuration (for all installMethods,
although looking at the code perhaps we can get
this rc actually (incidentally?) only for nfs mehtod), but I am not
sure if resetting the flags (e.g. in case when network was
brought up successfully, but the url or nfs server address was
actually wrong and then fixed by user in reiteration of STEP_METHOD)
won't change behaviour or cause problems in following

Sorry for my sceptic reply but this is just my experience, I've seen
(and made myself) similar patches fixing something in one place
and breaking something else. These changes are very difficult to

On 12/22/2011 06:22 PM, Mark Hamzy wrote:

For https://bugzilla.redhat.com/show_bug.cgi?id=758450 , the following is the proposed patch.

loader/loader.c | 15 +++++++++++++++
loader/net.c | 3 +++
loader/nfsinstall.c | 3 ++-
3 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/loader/loader.c b/loader/loader.c
index c60795f..ba85734 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1441,6 +1441,21 @@ static void doLoaderMain(struct loaderData_s *loaderData,
if (rc == LOADER_BACK)

+ if (rc == LOADER_ERROR) {
+ needsNetwork = 1;
+ /* Don't retry the same failed settings. Clear ipinfo-set
+ * so the user can enter new data */
+ loaderData->ipinfo_set = 0;
+#ifdef ENABLE_IPV6
+ loaderData->ipv6info_set = 0;
+ loaderData->netDev_set = 0;
+ logMessage(DEBUGLVL, "in STEP_METHOD, retry (LOADER_ERROR)");
+ break;
+ }
class = installMethods[validMethods[loaderData->method]].type;
dir = 1;
diff --git a/loader/net.c b/loader/net.c
index d556554..31d8205 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -655,6 +655,8 @@ int configureTCPIP(char * device, iface_t * iface,

#ifdef ENABLE_IPV6
+ logMessage(DEBUGLVL, "in configureTCPIP() iface->ipv4method = %d, FL_NOIPV4(flags) = %ld", iface->ipv4method, FL_NOIPV4(flags));
+ logMessage(DEBUGLVL, "in configureTCPIP() iface->ipv6method = %d, FL_NOIPV6(flags) = %ld", iface->ipv6method, FL_NOIPV6(flags));
/* If the user provided any of the following boot paramters, skip
* prompting for network configuration information:
* ip=<val> ipv6=<val>
@@ -671,6 +673,7 @@ int configureTCPIP(char * device, iface_t * iface,
logMessage(DEBUGLVL, "in configureTCPIP(), detected network boot args, skipping form");
+ logMessage(DEBUGLVL, "in configureTCPIP() iface->ipv4method = %d, FL_NOIPV4(flags) = %ld", iface->ipv4method, FL_NOIPV4(flags));
if (iface->ipv4method> IPV4_UNUSED_METHOD || FL_NOIPV4(flags)) {
skipForm = 1;
diff --git a/loader/nfsinstall.c b/loader/nfsinstall.c
index f46e79e..f02ab16 100644
--- a/loader/nfsinstall.c
+++ b/loader/nfsinstall.c
@@ -257,7 +257,8 @@ int promptForNfs(struct loaderData_s *loaderData) {
newtWinMessage(_("Error"), _("OK"),
_("The URL provided does not contain an installable tree."));
- continue;
+ loaderData->instRepo = NULL;
+ return LOADER_ERROR;


Anaconda-devel-list mailing list

Thread Tools

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

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