Bug 1571316 - targetcli: Need improvements in configuration backup [rhel-7.5.z]
Summary: targetcli: Need improvements in configuration backup [rhel-7.5.z]
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: targetcli
Version: 7.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Maurizio Lombardi
QA Contact: Storage QE
Marek Suchánek
Depends On: 1537998
Blocks: 1570535
TreeView+ depends on / blocked
Reported: 2018-04-24 13:49 UTC by Oneata Mircea Teodor
Modified: 2021-09-06 12:33 UTC (History)
12 users (show)

Fixed In Version: targetcli-2.1.fb46-4.el7
Doc Type: If docs needed, set a value
Doc Text:
* Previously, the targetcli utility did not create the /etc/target/ and /etc/target/backup/ directories if they were missing. As a consequence, if the user deleted the directories, the "targetcli saveconfig" command failed. With this update, targetcli recreates the directories if they are missing. As a result, the described problem no longer occurs. * With this update, the "targetcli saveconfig" command backs up the /etc/target/saveconfig.json file only if it is different from the most recent copy. This avoids creating duplicate backups. * With this update, the targetcli utility now provides the backup_files_limit global configuration option, which limits the maximum number of backup files.
Clone Of: 1537998
Last Closed: 2018-05-14 16:12:42 UTC
Target Upstream Version:

Attachments (Terms of Use)

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-24 13:49:52 UTC
This bug has been copied from bug #1537998 and has been proposed to be backported to 7.5 z-stream (EUS).

Comment 3 Sweta Anandpara 2018-05-04 09:16:16 UTC
Tested and validated this on a RHGS cluster with targetcli-2.1.fb46-4.el7.noarch.

Was successfully able to modify the limit of /etc/target/backup/saveconfig.json, and validated that the limit set worked as expected. Was always able to have 1 config more than the limit set, but there is an existing bugzilla for the same.. will be mentioning that in my next comment. 

Deleted /etc/target/backup directory, and tried to saveconfig. That directory was successfully created. 

Tried saveconfig multiple times when there was no change in the targetcli configuration, and validated that backup files were not repeatedly created for every 'targetcli saveconfig' executed. A single backup file remained and continued to remain if there was no change in the configuration. 

Did a change in the configuration and validated that a new backup copy was then created (when 'targetcli / saveconfig' was executed), as expected. 

Positive with the validation of the patches that have gone in, in this bug. 

Please feel free to move this bug to verified after a round of regression. Thanks!

Comment 4 Martin Hoyer 2018-05-04 10:00:19 UTC
Thank you Sweta and Storage-QA!
My manual testing on RHEL-7.5 with targetcli-2.1.fb46-4.el7 confirms this. We are also aware of the 1 extra backup as described in https://github.com/open-iscsi/targetcli-fb/pull/111
Our regression tests have not found any issues.

Comment 9 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.


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