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 | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py index 74e5aa8..56a4d6f 100644 --- a/pyanaconda/ui/gui/spokes/network.py +++ b/pyanaconda/ui/gui/spokes/network.py @@ -1418,12 +1418,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): + from pyanaconda.packaging import payloadMgr + 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 +1469,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)
Yeah I already fixed it. Thank you for this PR testing @clumens .
Added label: ACK.
Looks good.
Closed.
Pushed. Thank you
anaconda-patches@lists.fedorahosted.org