summaryrefslogtreecommitdiffstats
path: root/staslib/service.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--staslib/service.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/staslib/service.py b/staslib/service.py
index ce4769d..e681f3a 100644
--- a/staslib/service.py
+++ b/staslib/service.py
@@ -20,7 +20,7 @@ import dasbus.client.proxy
from gi.repository import GLib
from systemd.daemon import notify as sd_notify
-from staslib import avahi, conf, ctrl, defs, gutil, iputil, stas, timeparse, trid, udev
+from staslib import avahi, conf, ctrl, defs, gutil, stas, timeparse, trid, udev
# ******************************************************************************
@@ -402,7 +402,7 @@ class Stac(Service):
logging.debug('Stac._config_ctrls_finish() - discovered_ctrl_list = %s', discovered_ctrl_list)
controllers = stas.remove_excluded(configured_ctrl_list + discovered_ctrl_list)
- controllers = iputil.remove_invalid_addresses(controllers)
+ controllers = stas.remove_invalid_addresses(controllers)
new_controller_tids = set(controllers)
cur_controller_tids = set(self._controllers.keys())
@@ -752,7 +752,7 @@ class Staf(Service):
all_ctrls = configured_ctrl_list + discovered_ctrl_list + referral_ctrl_list
controllers = stas.remove_excluded(all_ctrls)
- controllers = iputil.remove_invalid_addresses(controllers)
+ controllers = stas.remove_invalid_addresses(controllers)
new_controller_tids = set(controllers)
cur_controller_tids = set(self._controllers.keys())
@@ -856,7 +856,7 @@ class Staf(Service):
return
# Did we receive a Change of DLP AEN or an NVME Event indicating 'connect' or 'rediscover'?
- if not _is_dlp_changed_aen(udev_obj) and not _event_matches(udev_obj, ('connected', 'rediscover')):
+ if not _is_dlp_changed_aen(udev_obj) and not _event_matches(udev_obj, ('rediscover',)):
return
# We need to invoke "nvme connect-all" using nvme-cli's nvmf-connect@.service
@@ -873,6 +873,6 @@ class Staf(Service):
options = r'\x09'.join(
[fr'{option}\x3d{value}' for option, value in cnf if value not in (None, 'none', 'None', '')]
)
- logging.info('Invoking: systemctl start nvmf-connect@%s.service', options)
- cmd = [defs.SYSTEMCTL, '--quiet', '--no-block', 'start', fr'nvmf-connect@{options}.service']
+ logging.debug('Invoking: systemctl restart nvmf-connect@%s.service', options)
+ cmd = [defs.SYSTEMCTL, '--quiet', '--no-block', 'restart', fr'nvmf-connect@{options}.service']
subprocess.run(cmd, check=False)