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 1571316 - targetcli: Need improvements in configuration backup [rhel-7.5.z]
Summary: targetcli: Need improvements in configuration backup [rhel-7.5.z]
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
urgent
Target Milestone: rc
: ---
Assignee: Maurizio Lombardi
QA Contact: Storage QE
Marek Suchánek
URL:
Whiteboard:
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
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-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.

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.