LNST no longer configures the network stack through NetworkManager and we have no plans to enable it in the future.
This patch removes the configuration entries from lnst-slave.conf config file and the unused RPC methods from NetTestSlave and Machine code.
I kept the warning log entry if NetworkManager is detected on the slave machine, as this is still important information.
Signed-off-by: Jan Tluka jtluka@redhat.com --- install/lnst-slave.conf.in | 7 ------- lnst/Controller/Machine.py | 10 ---------- lnst/Slave/Config.py | 5 ----- lnst/Slave/NetTestSlave.py | 34 ---------------------------------- 4 files changed, 56 deletions(-)
diff --git a/install/lnst-slave.conf.in b/install/lnst-slave.conf.in index 739cd6a5..8c9ab868 100644 --- a/install/lnst-slave.conf.in +++ b/install/lnst-slave.conf.in @@ -25,10 +25,3 @@ expiration_period = 7days #in this option. #The option accepts one directory path that will be created if it doesn't exist. log_dir = @slave_logs_dir@ - -#This option can be used to enable/disable the support of network -#configuration using NetworkManager on slaves. -# -#The feature is highly experimental at the moment, so it is turned off -#by default. -use_nm = false diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py index e95e58b1..4b9afcba 100644 --- a/lnst/Controller/Machine.py +++ b/lnst/Controller/Machine.py @@ -373,7 +373,6 @@ class Machine(object): self.restore_system_config() self.cleanup_devices() self.del_namespaces() - # self.restore_nm_option() self.rpc_call("bye") except: #cleanup is only meaningful on dynamic interfaces, and should @@ -571,15 +570,6 @@ class Machine(object):
return SlaveObject(self, cls, obj_ref)
- # def enable_nm(self): - # return self._rpc_call("enable_nm") - - # def disable_nm(self): - # return self._rpc_call("disable_nm") - - # def restore_nm_option(self): - # return self._rpc_call("restore_nm_option") - def __str__(self): return "[Machine hostname(%s) libvirt_domain(%s) interfaces(%d)]" % \ (self._hostname, self._libvirt_domain, len(self._interfaces)) diff --git a/lnst/Slave/Config.py b/lnst/Slave/Config.py index e749528f..6c2b948a 100644 --- a/lnst/Slave/Config.py +++ b/lnst/Slave/Config.py @@ -23,11 +23,6 @@ class SlaveConfig(Config): "additive" : False, "action" : self.optionPath, "name" : "log_dir"} - self._options['environment']['use_nm'] = {\ - "value" : True, - "additive" : False, - "action" : self.optionBool, - "name" : "use_nm"} self._options['environment']['rpcport'] = {\ "value" : DefaultRPCPort, "additive" : False, diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py index 7a942534..e2e8d6d0 100644 --- a/lnst/Slave/NetTestSlave.py +++ b/lnst/Slave/NetTestSlave.py @@ -96,8 +96,6 @@ class SlaveMethods: self._dynamic_classes = {} self._dynamic_objects = {}
- self._bkp_nm_opt_val = slave_config.get_option("environment", "use_nm") - def hello(self): logging.info("Recieved a controller connection.")
@@ -117,7 +115,6 @@ class SlaveMethods:
def prepare_machine(self): self.machine_cleanup() - self.restore_nm_option()
self._cache.del_old_entries() self.reset_file_transfers() @@ -131,10 +128,6 @@ class SlaveMethods: if check_process_running("NetworkManager"): logging.warning("=============================================") logging.warning("NetworkManager is running on a slave machine!") - if self._slave_config.get_option("environment", "use_nm"): - logging.warning("Support of NM is still experimental!") - else: - logging.warning("Usage of NM is disabled!") logging.warning("=============================================")
for device in self._if_manager.get_devices(): @@ -516,33 +509,6 @@ class SlaveMethods: file_handle.close() self._copy_sources = {}
- def enable_nm(self): - logging.warning("====================================================") - logging.warning("Enabling use of NetworkManager on controller request") - logging.warning("====================================================") - val = self._slave_config.get_option("environment", "use_nm") - self._slave_config.set_option("environment", "use_nm", True) - return val - - def disable_nm(self): - logging.warning("=====================================================") - logging.warning("Disabling use of NetworkManager on controller request") - logging.warning("=====================================================") - val = self._slave_config.get_option("environment", "use_nm") - self._slave_config.set_option("environment", "use_nm", False) - return val - - def restore_nm_option(self): - val = self._slave_config.get_option("environment", "use_nm") - if val == self._bkp_nm_opt_val: - return val - logging.warning("=========================================") - logging.warning("Restoring use_nm option to original value") - logging.warning("=========================================") - self._slave_config.set_option("environment", "use_nm", - self._bkp_nm_opt_val) - return val - def add_namespace(self, netns): if netns in self._net_namespaces: logging.debug("Network namespace %s already exists." % netns)
On Fri, Feb 28, 2020 at 08:51:28PM +0100, Jan Tluka wrote:
LNST no longer configures the network stack through NetworkManager and we have no plans to enable it in the future.
This patch removes the configuration entries from lnst-slave.conf config file and the unused RPC methods from NetTestSlave and Machine code.
I kept the warning log entry if NetworkManager is detected on the slave machine, as this is still important information.
Signed-off-by: Jan Tluka jtluka@redhat.com
install/lnst-slave.conf.in | 7 ------- lnst/Controller/Machine.py | 10 ---------- lnst/Slave/Config.py | 5 ----- lnst/Slave/NetTestSlave.py | 34 ---------------------------------- 4 files changed, 56 deletions(-)
diff --git a/install/lnst-slave.conf.in b/install/lnst-slave.conf.in index 739cd6a5..8c9ab868 100644 --- a/install/lnst-slave.conf.in +++ b/install/lnst-slave.conf.in @@ -25,10 +25,3 @@ expiration_period = 7days #in this option. #The option accepts one directory path that will be created if it doesn't exist. log_dir = @slave_logs_dir@
-#This option can be used to enable/disable the support of network -#configuration using NetworkManager on slaves. -# -#The feature is highly experimental at the moment, so it is turned off -#by default. -use_nm = false diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py index e95e58b1..4b9afcba 100644 --- a/lnst/Controller/Machine.py +++ b/lnst/Controller/Machine.py @@ -373,7 +373,6 @@ class Machine(object): self.restore_system_config() self.cleanup_devices() self.del_namespaces()
# self.restore_nm_option() self.rpc_call("bye") except: #cleanup is only meaningful on dynamic interfaces, and should
@@ -571,15 +570,6 @@ class Machine(object):
return SlaveObject(self, cls, obj_ref)
- # def enable_nm(self):
# return self._rpc_call("enable_nm")
- # def disable_nm(self):
# return self._rpc_call("disable_nm")
- # def restore_nm_option(self):
# return self._rpc_call("restore_nm_option")
- def __str__(self): return "[Machine hostname(%s) libvirt_domain(%s) interfaces(%d)]" % \ (self._hostname, self._libvirt_domain, len(self._interfaces))
diff --git a/lnst/Slave/Config.py b/lnst/Slave/Config.py index e749528f..6c2b948a 100644 --- a/lnst/Slave/Config.py +++ b/lnst/Slave/Config.py @@ -23,11 +23,6 @@ class SlaveConfig(Config): "additive" : False, "action" : self.optionPath, "name" : "log_dir"}
self._options['environment']['use_nm'] = {\
"value" : True,
"additive" : False,
"action" : self.optionBool,
"name" : "use_nm"} self._options['environment']['rpcport'] = {\ "value" : DefaultRPCPort, "additive" : False,
diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py index 7a942534..e2e8d6d0 100644 --- a/lnst/Slave/NetTestSlave.py +++ b/lnst/Slave/NetTestSlave.py @@ -96,8 +96,6 @@ class SlaveMethods: self._dynamic_classes = {} self._dynamic_objects = {}
self._bkp_nm_opt_val = slave_config.get_option("environment", "use_nm")
- def hello(self): logging.info("Recieved a controller connection.")
@@ -117,7 +115,6 @@ class SlaveMethods:
def prepare_machine(self): self.machine_cleanup()
self.restore_nm_option() self._cache.del_old_entries() self.reset_file_transfers()
@@ -131,10 +128,6 @@ class SlaveMethods: if check_process_running("NetworkManager"): logging.warning("=============================================") logging.warning("NetworkManager is running on a slave machine!")
if self._slave_config.get_option("environment", "use_nm"):
logging.warning("Support of NM is still experimental!")
else:
logging.warning("Usage of NM is disabled!") logging.warning("=============================================") for device in self._if_manager.get_devices():
@@ -516,33 +509,6 @@ class SlaveMethods: file_handle.close() self._copy_sources = {}
- def enable_nm(self):
logging.warning("====================================================")
logging.warning("Enabling use of NetworkManager on controller request")
logging.warning("====================================================")
val = self._slave_config.get_option("environment", "use_nm")
self._slave_config.set_option("environment", "use_nm", True)
return val
- def disable_nm(self):
logging.warning("=====================================================")
logging.warning("Disabling use of NetworkManager on controller request")
logging.warning("=====================================================")
val = self._slave_config.get_option("environment", "use_nm")
self._slave_config.set_option("environment", "use_nm", False)
return val
- def restore_nm_option(self):
val = self._slave_config.get_option("environment", "use_nm")
if val == self._bkp_nm_opt_val:
return val
logging.warning("=========================================")
logging.warning("Restoring use_nm option to original value")
logging.warning("=========================================")
self._slave_config.set_option("environment", "use_nm",
self._bkp_nm_opt_val)
return val
- def add_namespace(self, netns): if netns in self._net_namespaces: logging.debug("Network namespace %s already exists." % netns)
-- 2.21.1 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedorahos...
ack, applying and pushing.
Thanks, -Ondrej
lnst-developers@lists.fedorahosted.org