Skip to content

Fix global parameters not persisted when set#232

Merged
maurizio-lombardi merged 1 commit into
open-iscsi:masterfrom
maurizio-lombardi:save_global_parameter
Mar 2, 2026
Merged

Fix global parameters not persisted when set#232
maurizio-lombardi merged 1 commit into
open-iscsi:masterfrom
maurizio-lombardi:save_global_parameter

Conversation

@maurizio-lombardi
Copy link
Copy Markdown
Collaborator

Call prefs.save() from ui_setgroup_global() so that "set global ..." writes updated values to the preferences file. Without this, the change only applied in memory and was lost when the process exited, so a subsequent "get global ..." (e.g. auto_use_daemon) still showed the old value.

Call prefs.save() from ui_setgroup_global() so that "set global ..."
writes updated values to the preferences file. Without this, the change
only applied in memory and was lost when the process exited, so a
subsequent "get global ..." (e.g. auto_use_daemon) still showed the old
value.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
@guoguojenna
Copy link
Copy Markdown
Collaborator

guoguojenna commented Mar 2, 2026

Re-ran the rpm-build and Testing Farm CI tests. The rpm-build eventually succeeded; the previous failure appears to have been a build infrastructure issue rather than a problem with our code.

The Testing Farm CI tests failed due to two known issues:

  1. init() got an unexpected keyword argument 'exclusive'. This issue will be gone with the latest rtslib, see TypeError: __init__() got an unexpected keyword argument 'exclusive' when creating a block backstore #226.

  2. https://artifacts.dev.testing-farm.io/20d86ec8-2193-4f8d-8d83-bab06442c3d0/work-stsn14kpjj6/ci-tests/sts/execute/data/guest/default-0/tests/iscsi/libiscsi/local-1/output.txt

FAILED libiscsi-local.py::TestLibiscsiLocal::test_libiscsi_test_cu[ALL.PrinReadKeys]
FAILED libiscsi-local.py::TestLibiscsiLocal::test_libiscsi_test_cu[ALL.PrinReportCapabilities]
FAILED libiscsi-local.py::TestLibiscsiLocal::test_libiscsi_test_cu[ALL.ProutRegister]
FAILED libiscsi-local.py::TestLibiscsiLocal::test_libiscsi_test_cu[ALL.ProutReserve]
FAILED libiscsi-local.py::TestLibiscsiLocal::test_libiscsi_test_cu[ALL.ProutClear]
FAILED libiscsi-local.py::TestLibiscsiLocal::test_libiscsi_test_cu[ALL.ProutPreempt]
=================== 6 failed, 57 passed, 2 xpassed in 49.03s ===================
Not sure what caused these failures. I’ve seen these failures before in other PRs, so they don’t appear to be related to this PR. These tests also passed on RHEL 9.8 / 10.2.

All other CI tests have passed.

This PR should have fixed the global parameter setting issue.
[root@97c9aae9-97c4-47b1-b632-0dbe5b2bbc1e backstores]# targetcli set global auto_use_daemon=true
Parameter auto_use_daemon is now 'true'.
[root@97c9aae9-97c4-47b1-b632-0dbe5b2bbc1e backstores]# targetcli get global auto_use_daemon
[Errno 2] No such file or directory
Currently auto_use_daemon is true, hence please make sure targetclid daemon is running ...
(or)
Incase if you wish to turn auto_use_daemon to false then run '#targetcli --disable-daemon'
[root@97c9aae9-97c4-47b1-b632-0dbe5b2bbc1e backstores]# systemctl start targetclid
[root@97c9aae9-97c4-47b1-b632-0dbe5b2bbc1e backstores]# targetcli get global auto_use_daemon
auto_use_daemon=true
[root@97c9aae9-97c4-47b1-b632-0dbe5b2bbc1e backstores]# targetcli set global auto_use_daemon=false
Parameter auto_use_daemon is now 'false'.
[root@97c9aae9-97c4-47b1-b632-0dbe5b2bbc1e backstores]# targetcli get global auto_use_daemon
auto_use_daemon=false
[root@97c9aae9-97c4-47b1-b632-0dbe5b2bbc1e backstores]# rpm -q targetcli
targetcli-v3.0.2-1.20260302035813517094.pr232.1.g3952db0.el9.noarch

@maurizio-lombardi maurizio-lombardi merged commit 24abd0b into open-iscsi:master Mar 2, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants