[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH f14-branch beta blocker] Reset resolver after network device activation (#632489)



When bringing network up in stage2, we need to reset resolver
using our isys.resetResolver.  Resetting with urlgrabber.reset_curl_obj()
only doesn't work.  Corresponding rhel6 BZ: #614001

It is well possible that this has been broken already in Alpha
but we didn't found out because there were another bug causing
network to be brought up in stage 1 unconditionally.

---
 pyanaconda/network.py |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 9e2d828..ae06f1e 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -766,18 +766,22 @@ class Network:
                 waited_devs_props[iface] = device_props_iface
 
         i = 0
+        reset_resolver = False
         while True:
             for dev, device_props_iface in waited_devs_props.items():
                 state = device_props_iface.Get(isys.NM_DEVICE_IFACE, "State")
                 if state == isys.NM_DEVICE_STATE_ACTIVATED:
                     waited_devs_props.pop(dev)
-            if len(waited_devs_props) == 0:
-                return []
-            if i >= CONNECTION_TIMEOUT:
-                return waited_devs_props.keys()
+                    reset_resolver = True
+            if len(waited_devs_props) == 0 or i >= CONNECTION_TIMEOUT:
+                break
             i += 1
             time.sleep(1)
 
+        if reset_resolver:
+            isys.resetResolv()
+        return waited_devs_props.keys()
+
     # write out current configuration state and wait for NetworkManager
     # to bring the device up, watch NM state and return to the caller
     # once we have a state
-- 
1.7.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]