RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1566108 - targetcli: Storage Objects gets removed Upon restoreconfig, if the underlying backend is down [rhel-7.5.z]
Summary: targetcli: Storage Objects gets removed Upon restoreconfig, if the underlying...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: targetcli
Version: 7.4
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: ---
Assignee: Maurizio Lombardi
QA Contact: Martin Hoyer
Marek Suchánek
URL:
Whiteboard:
Depends On: 1565074
Blocks: 1559239
TreeView+ depends on / blocked
 
Reported: 2018-04-11 14:21 UTC by Oneata Mircea Teodor
Modified: 2021-12-10 15:56 UTC (History)
17 users (show)

Fixed In Version: targetcli-2.1.fb46-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Previously, the targetcli utility removed storage objects under certain conditions. This happened when the volume hosting the storage objects was down and the user restored target configuration with the command "targetcli restoreconfig". With this update, configuration is now saved at a block granularity, and, as a result, the described problem no longer occurs.
Clone Of: 1565074
Environment:
Last Closed: 2018-05-14 16:12:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:1403 0 None None None 2018-05-14 16:13:06 UTC

Description Oneata Mircea Teodor 2018-04-11 14:21:43 UTC
This bug has been copied from bug #1565074 and has been proposed to be backported to 7.5 z-stream (EUS).

Comment 4 Maurizio Lombardi 2018-05-02 10:33:57 UTC
Requires python-rtslib-2.1.fb63-11.el7_5

Comment 5 Sweta Anandpara 2018-05-04 11:03:37 UTC
Validated this on a RHGS cluster having the package targetcli-2.1.fb46-4.el7.noarch

Had 2 blocks, and validated the contents of both the blocks in the saved configuration. Removed the file /etc/target/saveconfig.json, and selectively tried to rebuild the configuration of one of the blocks, and that succeeded. /etc/target/saveconfig.json had the contents of only the one block that we tried to save.

This is good to validate the patch that has gone in in this bug. Please feel free to move this bug to verified after a round of regression. Thanks!

Logs are pasted below:

[root@dhcp47-65 ~]# targetcli ls
o- / ........................................................................................................ [...]
  o- backstores ............................................................................................. [...]
  | o- block ................................................................................. [Storage Objects: 0]
  | o- fileio ................................................................................ [Storage Objects: 0]
  | o- pscsi ................................................................................. [Storage Objects: 0]
  | o- ramdisk ............................................................................... [Storage Objects: 0]
  | o- user:glfs ............................................................................. [Storage Objects: 2]
  |   o- o1 ............... [ozone.47.65/block-store/0de98332-4730-4c9b-95d7-69affe2729fd (1.0MiB) activated]
  |   | o- alua .................................................................................. [ALUA Groups: 1]
  |   |   o- default_tg_pt_gp ...................................................... [ALUA state: Active/optimized]
  |   o- o2 ............... [ozone.47.65/block-store/abf68b3d-c27a-4059-a9ef-b655022a3ae2 (1.0MiB) activated]
  |     o- alua .................................................................................. [ALUA Groups: 1]
  |       o- default_tg_pt_gp ...................................................... [ALUA state: Active/optimized]
  o- iscsi ........................................................................................... [Targets: 2]
  | o- iqn.2016-12.org.gluster-block:0de98332-4730-4c9b-95d7-69affe2729fd ............................... [TPGs: 2]
  | | o- tpg1 ................................................................................. [gen-acls, no-auth]
  | | | o- acls ......................................................................................... [ACLs: 0]
  | | | o- luns ......................................................................................... [LUNs: 1]
  | | | | o- lun0 .................................................................... [user/o1 (default_tg_pt_gp)]
  | | | o- portals ................................................................................... [Portals: 1]
  | | |   o- 10.70.47.65:3260 ................................................................................ [OK]
  | | o- tpg2 .......................................................................................... [disabled]
  | |   o- acls ......................................................................................... [ACLs: 0]
  | |   o- luns ......................................................................................... [LUNs: 1]
  | |   | o- lun0 .................................................................... [user/o1 (default_tg_pt_gp)]
  | |   o- portals ................................................................................... [Portals: 1]
  | |     o- 10.70.46.109:3260 ............................................................................... [OK]
  | o- iqn.2016-12.org.gluster-block:abf68b3d-c27a-4059-a9ef-b655022a3ae2 ............................... [TPGs: 2]
  |   o- tpg1 ................................................................................. [gen-acls, no-auth]
  |   | o- acls ......................................................................................... [ACLs: 0]
  |   | o- luns ......................................................................................... [LUNs: 1]
  |   | | o- lun0 .................................................................... [user/o2 (default_tg_pt_gp)]
  |   | o- portals ................................................................................... [Portals: 1]
  |   |   o- 10.70.47.65:3260 ................................................................................ [OK]
  |   o- tpg2 .......................................................................................... [disabled]
  |     o- acls ......................................................................................... [ACLs: 0]
  |     o- luns ......................................................................................... [LUNs: 1]
  |     | o- lun0 .................................................................... [user/o2 (default_tg_pt_gp)]
  |     o- portals ................................................................................... [Portals: 1]
  |       o- 10.70.46.109:3260 ............................................................................... [OK]
  o- loopback ........................................................................................ [Targets: 0]
[root@dhcp47-65 ~]# rm /etc/target/saveconfig.json 
rm: remove regular file ‘/etc/target/saveconfig.json’? y
[root@dhcp47-65 ~]# 
[root@dhcp47-65 ~]# 
[root@dhcp47-65 ~]# targetcli  / saveconfig
Configuration saved to /etc/target/saveconfig.json
[root@dhcp47-65 ~]# vi /etc/target/saveconfig.json 
[root@dhcp47-65 ~]# vi /etc/target/saveconfig.json 
[root@dhcp47-65 ~]# cp /etc/target/saveconfig.json /home/
cp: overwrite ‘/home/saveconfig.json’? y
[root@dhcp47-65 ~]# 
[root@dhcp47-65 ~]# 
[root@dhcp47-65 ~]# rm /etc/target/saveconfig.json
rm: remove regular file ‘/etc/target/saveconfig.json’? y
[root@dhcp47-65 ~]# 
[root@dhcp47-65 ~]# targetcli /backstores/user:glfs/o1 saveconfig
Storage Object 'user:o1' config saved to /etc/target/saveconfig.json.
[root@dhcp47-65 ~]# 

[root@dhcp47-65 ~]# rpm -qa | grep rtslib
python-rtslib-2.1.fb63-11.el7.noarch
[root@dhcp47-65 ~]# rpm -qa | grep gluster
glusterfs-client-xlators-3.8.4-54.8.el7rhgs.x86_64
python-gluster-3.8.4-54.8.el7rhgs.noarch
tendrl-gluster-integration-1.5.4-14.el7rhgs.noarch
gluster-nagios-addons-0.2.10-2.el7rhgs.x86_64
glusterfs-libs-3.8.4-54.8.el7rhgs.x86_64
glusterfs-fuse-3.8.4-54.8.el7rhgs.x86_64
libvirt-daemon-driver-storage-gluster-3.9.0-14.el7_5.2.x86_64
glusterfs-events-3.8.4-54.8.el7rhgs.x86_64
gluster-block-0.2.1-14.1.el7rhgs.x86_64
vdsm-gluster-4.17.33-1.2.el7rhgs.noarch
glusterfs-3.8.4-54.8.el7rhgs.x86_64
glusterfs-server-3.8.4-54.8.el7rhgs.x86_64
glusterfs-geo-replication-3.8.4-54.8.el7rhgs.x86_64
glusterfs-rdma-3.8.4-54.8.el7rhgs.x86_64
rpglusterfs-cli-3.8.4-54.8.el7rhgs.x86_64
mgluster-nagios-common-0.2.4-1.el7rhgs.noarch
 glusterfs-api-3.8.4-54.8.el7rhgs.x86_64
-q[root@dhcp47-65 ~]# rpm -qa | grep targetcli
targetcli-2.1.fb46-4.el7.noarch
[root@dhcp47-65 ~]# rpm -qa | grep python-configshell
python-configshell-1.1.fb23-4.el7_5.noarch
[root@dhcp47-65 ~]# 

[root@dhcp47-65 ~]# vi /etc/target/saveconfig.json

Comment 6 Martin Hoyer 2018-05-04 11:05:23 UTC
(In reply to Sweta Anandpara from comment #4)
Thank You very much!
Our regression tests have not found any issue on RHEL-7.5 with following packages updated:
python-configshell-1.1.fb23-4.el7_5
python-rtslib-2.1.fb63-11.el7_5
targetcli-2.1.fb46-4.el7_5

Comment 11 errata-xmlrpc 2018-05-14 16:12:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:1403


Note You need to log in before you can comment on or make changes to this bug.