Bug 879162 - [RFE] targetcli configuration save/restore enhancement
Summary: [RFE] targetcli configuration save/restore enhancement
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: targetcli
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Andy Grover
QA Contact: Xiaowei Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-22 09:00 UTC by Xiaowei Li
Modified: 2015-01-27 00:11 UTC (History)
1 user (show)

Fixed In Version: targetcli-2.1.fb25-1
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-04 00:10:00 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Xiaowei Li 2012-11-22 09:00:40 UTC
Description of problem:
The targetcli configuration is easy to lost since it only backup the latest configuration.


Version-Release number of selected component (if applicable):


How reproducible:


Consider the following scenario.
Steps to Reproduce:
1. /> set global auto_save_on_exit=true
2. service targetcli stop
>> this will execute 'targetcli clearconfig confirm=true' to cleanup the current targetcli configuration
3. run targetcli then exit, the current configuration will saved and the users will lost their previous configuration.

So we should have several enhancement.
1. when execute 'service targetcli stop' please notice the users what happens.
It should tell the user the current configuration is cleaned and if they want to restore it please run 'service targetcli start' or targetcli restoreconfig

2. please don't overwrite the /etc/target/saveconfig.json.backup, rename it to saveconfig.json.backup.2012xxxx etc and move it to /etc/target/backup.

The /etc/target/saveconfig.json is important so we should keep tracking the its changes.
  
Actual results:


Expected results:


Additional info:

Comment 1 Xiaowei Li 2012-12-10 09:41:34 UTC
It's better to automatically archive/backup existing targetcli configuration.

Comment 3 Andy Grover 2013-01-15 20:05:00 UTC
1. I don't know if systemd has capabilities to output messages to the user when units are started/stopped.

2. Yes it would be nice to keep maybe X last configurations (X=10 maybe), labeled by date. I'll work on that.

Comment 4 Xiaowei Li 2013-01-23 02:48:16 UTC
(In reply to comment #3)
> 1. I don't know if systemd has capabilities to output messages to the user
> when units are started/stopped.
> 
> 2. Yes it would be nice to keep maybe X last configurations (X=10 maybe),
> labeled by date. I'll work on that.

I vote for keeping multiple last configurations.

Comment 5 Andy Grover 2013-06-04 00:10:00 UTC
we now keep 10 previous configs.


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