Bug 1537998
Summary: | targetcli: Need improvements in configuration backup | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Prasanna Kumar Kalever <prasanna.kalever> | |
Component: | targetcli | Assignee: | Maurizio Lombardi <mlombard> | |
Status: | CLOSED ERRATA | QA Contact: | Martin Hoyer <mhoyer> | |
Severity: | urgent | Docs Contact: | ||
Priority: | urgent | |||
Version: | 7.4 | CC: | amukherj, coughlan, mchristi, mhoyer, mlombard, pkarampu, prasanna.kalever, rcyriac, rhandlin, vanhoof, vbellur | |
Target Milestone: | rc | Keywords: | ZStream | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | 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.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1571316 (view as bug list) | Environment: | ||
Last Closed: | 2018-10-30 07:55:01 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1554642, 1571316 |
Description
Prasanna Kumar Kalever
2018-01-24 09:34:52 UTC
After restoring the configuration and exiting targetcli, new backup json is created, it is however basically empty: # targetcli /> restoreconfig /etc/target/backup/saveconfig-20180427-10:02:10.json /> exit Global pref auto_save_on_exit=true Last 10 configs saved in /etc/target/backup/. Configuration saved to /etc/target/saveconfig.json # ls /etc/target/backup/ saveconfig-20180427-10:02:10.json saveconfig-20180427-10:02:52.json # cat /etc/target/backup/saveconfig-20180427-10\:02\:52.json { "fabric_modules": [], "storage_objects": [], "targets": [] } Hi Martin, I doubt if I got your question right. Are you saying that you had a valid backup configuration /etc/target/backup/saveconfig-20180427-10:02:10.json and after restoring it you see the new backup file (/etc/target/backup/saveconfig-20180427-10\:02\:52.json) empty ? If I understand your question correctly, the backupfile is just a copy of saveconfig.json, as saveconfig command will override /etc/target/saveconfig.json, we just backup it. In your case before restoreconfig command your /etc/target/saveconfig.json might be empty, hence its copy /etc/target/backup/saveconfig-20180427-10\:02\:52.json is empty now. HTH, Thanks! (In reply to Prasanna Kumar Kalever from comment #11) Hi Prasanna, thanks for the reply! It is how you wrote it, the backup of empty saveconfig.json confused me. Thanks for clarification. Our regression tests have not found any new issues with targetcli-fb-2.1.fb46, neither did manual testing, with exception of non-blocking issue described in https://github.com/open-iscsi/targetcli-fb/pull/111 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/RHBA-2018:3040 |