Bug 1555426 - yedit module should generate uniquely named backup files
Summary: yedit module should generate uniquely named backup files
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.9.z
Assignee: Fabian von Feilitzsch
QA Contact: liujia
: 1558880 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2018-03-14 16:53 UTC by Scott Dodson
Modified: 2018-05-17 06:43 UTC (History)
6 users (show)

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
Clone Of:
Last Closed: 2018-05-17 06:42:42 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1558880 None CLOSED Need to backup master-config&node-config file during upgrade which is a must for downgrade 2019-04-26 14:07:43 UTC
Red Hat Product Errata RHBA-2018:1566 None None None 2018-05-17 06:43:12 UTC

Internal Links: 1558880

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

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

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

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.


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