Payload manager is started from network spoke if network settings change. This will start source spoke and software spoke reach-ability testing.
*Resolves: rhbz#1221109*
From: Jiri Konecny jkonecny@redhat.com
Payload manager is started from network spoke if network settings change. This will start source spoke and software spoke reach-ability testing.
Resolves: rhbz#1221109 --- pyanaconda/ui/gui/spokes/network.py | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py index 74e5aa8..2a4c356 100644 --- a/pyanaconda/ui/gui/spokes/network.py +++ b/pyanaconda/ui/gui/spokes/network.py @@ -52,6 +52,7 @@ from pyanaconda.ui.gui.utils import gtk_call_once, escape_markup from pyanaconda.ui.common import FirstbootSpokeMixIn from pyanaconda.iutil import startProgram +from pyanaconda.packaging import payloadMgr
from pyanaconda import network from pyanaconda import nm @@ -1418,12 +1419,21 @@ def __init__(self, *args, **kwargs): self.on_nm_state_changed) self.network_control_box.connect("device-state-changed", self.on_device_state_changed) + # true if network settings change (hostname excluded) + self._network_change = False
def apply(self): _update_network_data(self.data, self.network_control_box) log.debug("network: apply ksdata %s", self.data.network) self.network_control_box.kill_nmce(msg="leaving network spoke")
+ # if installation media or hdd is not used try if source is reachable + if (self.data.method.method != "cdrom" + and self.data.method.method != "harddrive" + and self._network_change): + payloadMgr.restartThread(self.storage, self.data, self.payload, self.instclass, + checkmount=False) + def execute(self): # update system's hostname network.set_hostname(self.data.network.hostname) @@ -1460,16 +1470,19 @@ def initialize(self): def refresh(self): NormalSpoke.refresh(self) self.network_control_box.refresh() + self._network_change = False
def on_nm_state_changed(self, *args): gtk_call_once(self._update_status) gtk_call_once(self._update_hostname) + self._network_change = True
def on_device_state_changed(self, source, device, new_state, *args): if new_state in (NetworkManager.DeviceState.ACTIVATED, NetworkManager.DeviceState.DISCONNECTED, NetworkManager.DeviceState.UNAVAILABLE): gtk_call_once(self._update_status) + self._network_change = True
def _update_status(self): hubQ.send_message(self.__class__.__name__, self.status)
Add check for *harddrive* too. Thank you @bcl .
Note that on this PR, the jenkins results are correct (even if it tested too much - don't know what's up with that). There are some pylint problems.
anaconda-patches@lists.fedorahosted.org