Bug 1268870 - rlFileBackup/rlFileRestore may cause unreachable files (RHEL6)
rlFileBackup/rlFileRestore may cause unreachable files (RHEL6)
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: beakerlib (Show other bugs)
rawhide
x86_64 Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Dalibor Pospíšil
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-05 09:38 EDT by Radka Skvarilova
Modified: 2015-10-20 09:16 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-20 09:16:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Radka Skvarilova 2015-10-05 09:38:27 EDT
Description of problem:
Run one test(/CoreOs/chkconfig/Sanity/simple-sanity-test-of-basic-features) in beaker (on RHEL6) with TestInspector without rlFileBackup shows removed and added files, which was solved by adding rlFileBackup/Restore of "/etc/rc.d". After that Test Inspector shows the few unreachable files in /etc/rc.d/.

Version-Release number of selected component (if applicable):
test /CoreOs/chkconfig/Sanity/simple-sanity-test-of-basic-features
test running on RHEL6

How reproducible:
in beaker (run the same test in 1minutetip the result is clear)

Steps to Reproduce:
1. run the test with Test Inspector (--inspector) on rhel6
2. run one test with rlFileBackup --clean "/etc/rc.d"  and one without
3. check output of Test Inspector 

Actual results:
********************
without rlFileBackup
********************
:: [  BEGIN   ] :: show diffs
:: [ 16:11:09 ] ::   AIDE found differences between database and filesystem!!
:: [ 16:11:09 ] ::   Start timestamp: 2015-10-01 16:11:04
:: [ 16:11:09 ] ::
:: [ 16:11:09 ] ::   Summary:
:: [ 16:11:09 ] ::   Total number of files:	1530
:: [ 16:11:09 ] ::   Added files:			1
:: [ 16:11:09 ] ::   Removed files:		1
:: [ 16:11:09 ] ::   Changed files:		13
:: [ 16:11:09 ] ::
:: [ 16:11:09 ] ::
:: [ 16:11:09 ] ::   ---------------------------------------------------
:: [ 16:11:09 ] ::   Added files:
:: [ 16:11:09 ] ::   ---------------------------------------------------
:: [ 16:11:09 ] ::
:: [   INFO   ] ::   added: /etc/rc.d/rc1.d/S55sshd
:: [ 16:11:09 ] ::
:: [ 16:11:09 ] ::   ---------------------------------------------------
:: [ 16:11:09 ] ::   Removed files:
:: [ 16:11:09 ] ::   ---------------------------------------------------
:: [ 16:11:09 ] ::
:: [   INFO   ] ::   removed: /etc/rc.d/rc1.d/K25sshd
:: [ 16:11:09 ] ::
:: [ 16:11:09 ] ::   ---------------------------------------------------
:: [ 16:11:09 ] ::   Changed files:
:: [ 16:11:09 ] ::   ---------------------------------------------------
:: [ 16:11:09 ] ::
----------------------------------------------------------------------
----------------------------------------------------------------------
*****************
with rlFileBackup
*****************
UNREACHABLE
:: [  BEGIN   ] ::   Unreachable critical files
:: [   FAIL   ] ::     +command: 'rc' pid: '908' file: '/etc/rc.d/rc (deleted)'
:: [   FAIL   ] ::     +command: 'S99rhts-compat' pid: '6924' file: '/etc/rc.d/init.d/rhts-compat (deleted)'
:: [   FAIL   ] ::   Unreachable critical files
:: [   FAIL   ] :: check difference between previous and current state
------------------------------------------------------------------
-----------------------------------------------------------------
Expected results:
run with rlFileBackup TestInspector output is clear

Additional info:
Comment 1 Dalibor Pospíšil 2015-10-06 10:43:27 EDT
I am afraid this cannot be reasonably fixed as we never know how to force the process holding the file descriptor to drop it. This should be task for the user to know what service should be restarted after file restoration.

This is similar as restoring config files and the restarting the service.

Example:
rlFileBackup /etc/rsyslog.conf
echo "*.* -/var/log/messages" > /etc/rsyslog.conf
rlServiceStart rsyslog

logger test

rlFileRestore
rlServiceStop rsyslog
rlServiceRestore rsyslog
Comment 2 Jakub Prokes 2015-10-20 09:16:38 EDT
This should be handled by test maker, because beakerlib couldn't restart services by its own. Test maker know which services was modified and which services should be restarted and when.

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