summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2007-05-30 18:37:40 +0000
committerJeremy Katz <katzj@redhat.com>2007-05-30 18:37:40 +0000
commitd6ab17a42c932fa77919ba11aa73f09bfc715761 (patch)
treef0280851561d310603846bdfdfb66b90f21c12bf
parentbc0ab0a4e273708468c80d95ea9c9eab024797d6 (diff)
downloadanaconda-d6ab17a42c932fa77919ba11aa73f09bfc715761.tar.gz
anaconda-d6ab17a42c932fa77919ba11aa73f09bfc715761.tar.xz
anaconda-d6ab17a42c932fa77919ba11aa73f09bfc715761.zip
(merges from f7-branch)
2007-05-30 Jeremy Katz <katzj@aglarond.local> * isys/isys.py (_stopRaid): Fix raidstop. I have no clue how things were working here... * isys/isys.py (_getRaidInfo): raise ValueError when we don't find a valid raid superblock (#151653). * upgrade.py: More blacklist * isys/isys.h (EARLY_SWAP_RAM): Let's bump RAM needs a little (#232862) * iw/netconfig_dialog.py (NetworkConfigurator._handleIPError): Add a frame so things look right (NetworkConfigurator._ok): Set useipv4 to true, call netconfig methods with the right args (#240804) * network.py (hasActiveNetDev): Ensure we have an IP as otherwise, the network device isn't really all that active.
-rw-r--r--ChangeLog17
-rw-r--r--isys/isys.h4
-rw-r--r--isys/isys.py10
-rw-r--r--iw/netconfig_dialog.py13
-rw-r--r--network.py8
-rw-r--r--upgrade.py4
6 files changed, 44 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index dc8d7ff7b..750882f37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
2007-05-30 Jeremy Katz <katzj@aglarond.local>
+ * isys/isys.py (_stopRaid): Fix raidstop. I have no clue how
+ things were working here...
+ * isys/isys.py (_getRaidInfo): raise ValueError when we don't find
+ a valid raid superblock (#151653).
+
+ * upgrade.py: More blacklist
+
+ * isys/isys.h (EARLY_SWAP_RAM): Let's bump RAM needs a little (#232862)
+
+ * iw/netconfig_dialog.py (NetworkConfigurator._handleIPError): Add
+ a frame so things look right
+ (NetworkConfigurator._ok): Set useipv4 to true, call netconfig
+ methods with the right args (#240804)
+
+ * network.py (hasActiveNetDev): Ensure we have an IP as
+ otherwise, the network device isn't really all that active.
+
* livecd.py: Define Error so we don't traceback with that when
there's a problem copying (#241754)
diff --git a/isys/isys.h b/isys/isys.h
index c8bc6f277..d49dc2d11 100644
--- a/isys/isys.h
+++ b/isys/isys.h
@@ -2,11 +2,11 @@
#define H_ISYS
#define MIN_RAM 64000
-#define MIN_GUI_RAM 128000
+#define MIN_GUI_RAM 192000
#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__ppc64__)
#define EARLY_SWAP_RAM 400000
#else
-#define EARLY_SWAP_RAM 240000
+#define EARLY_SWAP_RAM 270000
#endif
/* returns -2 for errno, -1 for unknown device */
diff --git a/isys/isys.py b/isys/isys.py
index 325c89c95..6293f497a 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -40,8 +40,7 @@ raidCount = {}
MIN_RAM = _isys.MIN_RAM
MIN_GUI_RAM = _isys.MIN_GUI_RAM
-EARLY_SWAP_RAM = 400000
-#_isys.EARLY_SWAP_RAM
+EARLY_SWAP_RAM = _isys.EARLY_SWAP_RAM
def pathSpaceAvailable(path, fsystem = "ext2"):
return _isys.devSpaceFree(path)
@@ -130,18 +129,20 @@ def _getRaidInfo(drive):
if info['uuid'] == "":
raise ValueError, info
+
return info
def _stopRaid(mdDevice):
- log.info("mdadm -A --stop %s" % (mdDevice,))
+ log.info("mdadm --stop %s" % (mdDevice,))
try:
- _mdadm("-A", "--stop", mdDevice)
+ _mdadm("--stop", mdDevice)
except MdadmError:
ei = sys.exc_info()
ei[1].name = mdDevice
raise ei[0], ei[1], ei[2]
def raidstop(mdDevice):
+ log.info("stopping raid device %s" %(mdDevice,))
if raidCount.has_key (mdDevice):
if raidCount[mdDevice] > 1:
raidCount[mdDevice] = raidCount[mdDevice] - 1
@@ -167,6 +168,7 @@ def _startRaid(mdDevice, mdMinor, uuid):
raise ei[0], ei[1], ei[2]
def raidstart(mdDevice, aMember):
+ log.info("starting raid device %s" %(mdDevice,))
if raidCount.has_key(mdDevice) and raidCount[mdDevice]:
raidCount[mdDevice] = raidCount[mdDevice] + 1
return
diff --git a/iw/netconfig_dialog.py b/iw/netconfig_dialog.py
index 10783e957..55852fe9c 100644
--- a/iw/netconfig_dialog.py
+++ b/iw/netconfig_dialog.py
@@ -132,10 +132,12 @@ class NetworkConfigurator:
self.window.destroy()
def _handleIPError(self, field, errmsg):
- d = gtk.MessageDialog(_("Error With Data"), 0, gtk.MESSAGE_ERROR,
+ d = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR,
gtk.BUTTONS_OK,
_("An error occurred converting the value "
"entered for \"%s\":\n%s") %(field, errmsg))
+ d.set_title(_("Error With Data"))
+ gui.addFrame(d)
d.run()
d.destroy()
@@ -149,13 +151,15 @@ class NetworkConfigurator:
val = combo.get_model().get_value(active, 1)
netdev = self.network.available()[val]
+ netdev.set(('useipv4', True))
+
# FIXME: need to do input validation
if self.xml.get_widget("dhcpCheckbutton").get_active():
self.window.hide()
w = gui.WaitWindow(_("Dynamic IP"),
_("Sending request for IP information "
"for %s...") %(netdev.get("device")))
- ns = isys.dhcpNetDevice(netdev.get("device"))
+ ns = isys.dhcpNetDevice(netdev)
w.pop()
if ns is not None:
self.rc = gtk.RESPONSE_OK
@@ -172,12 +176,14 @@ class NetworkConfigurator:
try:
network.sanityCheckIPString(ipv4addr)
+ netdev.set(('ipaddr', ipv4addr))
except network.IPError, msg:
self._handleIPError(_("IP Address"), msg)
return
try:
network.sanityCheckIPString(ipv4nm)
+ netdev.set(('netmask', ipv4nm))
except network.IPError, msg:
self._handleIPError(_("Netmask"), msg)
return
@@ -197,8 +203,7 @@ class NetworkConfigurator:
try:
- isys.configNetDevice(netdev.get("device"),
- ipv4addr, ipv4nm, gateway)
+ isys.configNetDevice(netdev, gateway)
except Exception, e:
log.error("Error configuring network device: %s" %(e,))
self.rc = gtk.RESPONSE_OK
diff --git a/network.py b/network.py
index 474accb1f..f243c00d8 100644
--- a/network.py
+++ b/network.py
@@ -106,6 +106,14 @@ def hasActiveNetDev():
# try to load /tmp/netinfo and see if we can sniff out network info
netinfo = Network()
for dev in netinfo.netdevices.keys():
+ try:
+ ip = isys.getIPAddress(dev)
+ except Exception, e:
+ log.error("Got an exception trying to get the ip addr of %s: "
+ "%s" %(dev, e))
+ continue
+ if ip == '127.0.0.1' or ip is None:
+ continue
if isys.getLinkStatus(dev):
return True
return False
diff --git a/upgrade.py b/upgrade.py
index 9e430dd16..64583014a 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -40,10 +40,10 @@ log = logging.getLogger("anaconda")
upgrade_remove_blacklist = [("system-config-mouse",), ("dev",)]
if rhpl.getArch() == "x86_64":
- upgrade_remove_blacklist.extend( [("perl","i386"), ("e2fsprogs", "i386"), ("hal", "i386"), ("mysql", "i386"), ("esound", "i386")] )
+ upgrade_remove_blacklist.extend( [("perl","i386"), ("e2fsprogs", "i386"), ("hal", "i386"), ("mysql", "i386"), ("esound", "i386"), ("mkinitrd", "i386")] )
if rhpl.getArch() == "ppc":
- upgrade_remove_blacklist.extend( [("e2fsprogs", "ppc64"), ("hal", "ppc64"), ("mysql", "ppc64"), ("esound", "ppc64")] )
+ upgrade_remove_blacklist.extend( [("e2fsprogs", "ppc64"), ("hal", "ppc64"), ("mysql", "ppc64"), ("esound", "ppc64"), ("mkinitrd", "ppc64")] )
def queryUpgradeContinue(anaconda):
if anaconda.dir == DISPATCH_FORWARD: