Bug 1555426

Summary: yedit module should generate uniquely named backup files
Product: OpenShift Container Platform Reporter: Scott Dodson <sdodson>
Component: InstallerAssignee: Fabian von Feilitzsch <fabian>
Status: CLOSED ERRATA QA Contact: liujia <jiajliu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.9.0CC: aos-bugs, fabian, jiajliu, jokerman, mmccomas, wmeng
Target Milestone: ---   
Target Release: 3.9.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Feature: yedit module now generates unique backup files Reason: If changes were made to the same resource multiple times, only the latest diff would be saved. Result: yedit module now generates unique backup files
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-17 06:42:42 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:

Description Scott Dodson 2018-03-14 16:53:36 UTC
Currently, the yedit module backs up files whenever it edits a file. In order to allow for audit trail of changes it'd be beneficial if those backups were named with the timestamp so that subsequent writes do not lose history.

Comment 1 Fabian von Feilitzsch 2018-03-16 17:22:04 UTC
https://github.com/openshift/openshift-ansible/pull/7558

Comment 2 liujia 2018-03-22 01:56:09 UTC
*** Bug 1558880 has been marked as a duplicate of this bug. ***

Comment 3 openshift-github-bot 2018-03-29 01:56:04 UTC
Commits pushed to master at https://github.com/openshift/openshift-ansible

https://github.com/openshift/openshift-ansible/commit/bc2ad50e5951bca0857f6bf947ec0cffbdf11dce
Bug 1555426- yedit now appends an ISO8601 formatted datetime string to file backups

https://github.com/openshift/openshift-ansible/commit/f28aba492e10048d30b49f39f02ee9a2f9be2c64
Merge pull request #7558 from fabianvf/bz1555426

Bug 1555426- yedit now appends an ISO8601 formatted datetime string to file backups

Comment 4 Scott Dodson 2018-03-29 01:57:25 UTC
https://github.com/openshift/openshift-ansible/pull/7701 release-3.9

Comment 6 liujia 2018-04-18 09:27:16 UTC
blocked by bug1566238

Comment 8 liujia 2018-04-20 03:21:43 UTC
Verified on openshift-ansible-3.9.24-1.git.0.d0289ea.el7.noarch

# ls -la /etc/origin/master/ |grep master-config
-rw-r--r--. 1 root root   5966 Apr 19 22:49 master-config.yaml
-rw-r--r--. 1 root root   6413 Apr 19 22:40 master-config.yaml.20180419T224055
-rw-r--r--. 1 root root   6447 Apr 19 22:49 master-config.yaml.20180419T224935
-rw-------. 1 root root   6012 Apr 19 21:30 master-config.yaml.orig

Comment 11 errata-xmlrpc 2018-05-17 06:42: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/RHBA-2018:1566