Project

General

Profile

Bug #44659

mgr/dashboard: Editing iSCSI target advanced setting causes a target recreation

Added by Ricardo Marques 15 days ago. Updated 13 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
dashboard/iscsi
Target version:
% Done:

0%

Source:
Tags:
Backport:
octopus, nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

If I try to edit an iSCSI target advanced setting, ceph Dashboard removes and recreated the whole target instead of simply reconfiguring the advanced setting.

HOW TO REPRODUCE

Set debug level:

[nautilus] ceph config set mgr debug_mgr 20
[octopus] https://docs.ceph.com/docs/octopus/mgr/dashboard/#debug

Edit a target, and change an advanced setting (e.g. "default_cmdsn_depth")

Do not change anything else and submit your change.

You will see the following in the log (e.g. [nautilus] /var/log/ceph/ceph-mgr.node1.log):

2020-03-17 17:37:03.094 7fd3ba602700 20 mgr[dashboard] iSCSI[node1.ses6.com] Deleting target lun: iqn.2001-07.com.ceph:1584460536437/iscsi-images/img1
2020-03-17 17:37:03.586 7fd3ba602700 20 mgr[dashboard] iSCSI[node1.ses6.com] Deleting disk: iscsi-images/img1
2020-03-17 17:37:03.926 7fd3ba602700 20 mgr[dashboard] iSCSI[node1.ses6.com] Deleting target: iqn.2001-07.com.ceph:1584460536437
2020-03-17 17:37:04.354 7fd3ba602700 20 mgr[dashboard] iSCSI[node1.ses6.com] Creating target: iqn.2001-07.com.ceph:1584460536437
2020-03-17 17:37:04.474 7fd3ba602700 20 mgr[dashboard] iSCSI[node1.ses6.com] Creating gateway: iqn.2001-07.com.ceph:1584460536437/node1.ses6.com
2020-03-17 17:37:04.662 7fd3ba602700 20 mgr[dashboard] iSCSI[node1.ses6.com] Creating gateway: iqn.2001-07.com.ceph:1584460536437/node2.ses6.com
2020-03-17 17:37:05.026 7fd3ba602700 20 mgr[dashboard] iSCSI[node1.ses6.com] Updating targetacl: iqn.2001-07.com.ceph:1584460536437/disable_acl
2020-03-17 17:37:05.346 7fd3ba602700 20 mgr[dashboard] iSCSI[node1.ses6.com] Updating targetauth: iqn.2001-07.com.ceph:1584460536437////
2020-03-17 17:37:05.606 7fd3ba602700 20 mgr[dashboard] iSCSI[node1.ses6.com] Creating disk: iscsi-images/img1
2020-03-17 17:37:06.362 7fd3ba602700 20 mgr[dashboard] iSCSI[node1.ses6.com] Creating target lun: iqn.2001-07.com.ceph:1584460536437/iscsi-images/img1
2020-03-17 17:37:11.026 7fd3ba602700 20 mgr[dashboard] iSCSI[node1.ses6.com] Reconfiguring target: iqn.2001-07.com.ceph:1584460536437

By looking into the log we see that, instead of simply reconfiguring the target, Dashboard has removed and recreated the target.

When using gwcli, it's possible to change target advanced settings without recreating the target, so the same should be possible in Dashboard.

node1:~ # cat /sys/kernel/config/target/iscsi/iqn.2001-07.com.ceph\:1584460536437/tpgt_*/attrib/default_cmdsn_depth
128
128
node1:~ # gwcli /iscsi-targets/iqn.2001-07.com.ceph:1584460536437 reconfigure default_cmdsn_depth 256
node1:~ # cat /sys/kernel/config/target/iscsi/iqn.2001-07.com.ceph\:1584460536437/tpgt_*/attrib/default_cmdsn_depth
256
256

I've also noticed that when we edit an iSCSI target image advanced setting (e.g. qfull_timeout), Dashboard also updates the target auth:

2020-03-17 18:14:55.526 7fd3a1f52700 20 mgr[dashboard] iSCSI[node1.ses6.com] Updating targetauth: iqn.2001-07.com.ceph:1584460536437////
2020-03-17 18:14:56.538 7fd3a1f52700 20 mgr[dashboard] iSCSI[node1.ses6.com] Reconfiguring disk: iscsi-images/img2

In this case, target auth should not be updated because it has not changed.

History

#1 Updated by Lenz Grimmer 14 days ago

  • Assignee set to Tiago Melo

#2 Updated by Tiago Melo 13 days ago

  • Status changed from New to In Progress
  • Pull request ID set to 34065

Also available in: Atom PDF