diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-16 11:03:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-16 11:03:18 +0000 |
commit | 347467d3fa6fb239f917c05c4cf7f6c3fe7f9b30 (patch) | |
tree | 44ae9f59984c8a36b93f29a729f10473653f9f19 /staslib/service.py | |
parent | Adding upstream version 2.2.2. (diff) | |
download | nvme-stas-347467d3fa6fb239f917c05c4cf7f6c3fe7f9b30.tar.xz nvme-stas-347467d3fa6fb239f917c05c4cf7f6c3fe7f9b30.zip |
Adding upstream version 2.3~rc1.upstream/2.3_rc1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'staslib/service.py')
-rw-r--r-- | staslib/service.py | 12 |
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) |