Bug 1229305 - virt-sysprep at cleanup deletes /var/spool/at/.SEQ which results in failing at
Summary: virt-sysprep at cleanup deletes /var/spool/at/.SEQ which results in failing at
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs   
(Show other bugs)
Version: 6.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pino Toscano
QA Contact: Virtualization Bugs
Jiri Herrmann
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 1172231 1275757 1301844 1309862
TreeView+ depends on / blocked
 
Reported: 2015-06-08 12:30 UTC by Martin Schuppert
Modified: 2016-08-07 18:28 UTC (History)
9 users (show)

Fixed In Version: libguestfs-1.20.11-16.el6
Doc Type: Release Note
Doc Text:
The "at" program works correctly with "virt-sysprep" When using the "virt-sysprep" utility to create a Red Hat Enterprise Linux guest template, the "at" program in the resulting guest could not be used. This update ensures that "virt-sysprep" does not delete `/var/spool/at/.SEQ` files in these guests, and "at" now works as expected.
Story Points: ---
Clone Of:
: 1238579 (view as bug list)
Environment:
Last Closed: 2016-05-10 19:56:05 UTC
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0762 normal SHIPPED_LIVE libguestfs bug fix update 2016-05-10 22:33:40 UTC
Red Hat Knowledge Base (Solution) 1474403 None None None Never

Description Martin Schuppert 2015-06-08 12:30:51 UTC
Description of problem:

virt-sysprep's cron-spool operations removes /var/spool/at/.SEQ . .SEQ contains at job counter (5 digit hex)
/var/spool/at]$ cat .SEQ 
00001

# virt-sysprep --list-operations
..
cron-spool * Remove user at-jobs and cron-jobs

Removing this file results in that at can not be used afterwards without manual create of this file:

[root@localhost /var/spool/at]$ at now + 1 minute
Cannot open lockfile /var/spool/at/.SEQ: No such file or directory

.SEQ file needs to be recreated to fix this. We should reset the counter manually by changing the /var/spool/at/.SEQ file to 00000, or recreate after deleted by virt-sysprep.

Version-Release number of selected component (if applicable):
* libguestfs-tools-c-1.20.11-11.el6.x86_64
* # virt-sysprep -V
virt-sysprep 1.20.11

How reproducible:
always

Steps to Reproduce:
1. [root@localhost /var/spool/at]$ rm -f .SEQ 
2. [root@localhost /var/spool/at]$ at now + 1 minute
Cannot open lockfile /var/spool/at/.SEQ: No such file or directory

Actual results:
[root@localhost /var/spool/at]$ at now + 1 minute
Cannot open lockfile /var/spool/at/.SEQ: No such file or directory

Expected results:
at works without manual action after virt-sysprep

Additional info:

Comment 3 Pino Toscano 2015-07-02 07:21:25 UTC
Fixed upstream with:
775e68c4613fabaa3b48ea3dc8d45ac74b93682b (minor refactoring)
a614f3451d1e2cc4f29b1bc7f0d88519c432b2c8 (minor refactoring)
261be1f952aa984b460ff8d88d962c490df4ffcf

Comment 5 Xianghua Chen 2015-12-07 02:54:57 UTC
Verified with the packages:
libguestfs-1.20.11-16.el6.x86_64
libguestfs-tools-c-1.20.11-16.el6.x86_64
# virt-sysprep -V
virt-sysprep 1.20.11


Verify steps:
1. # cd  /var/spool/at/

2.# cat .SEQ
00001

3. # virt-sysprep --list-operations
abrt-data * Remove the crash data generated by ABRT
bash-history * Remove the bash history in the guest
blkid-tab * Remove blkid tab in the guest
......

4. # at now +1 minute
at>

No error occurs.


So verified.

Comment 7 errata-xmlrpc 2016-05-10 19:56:05 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://rhn.redhat.com/errata/RHBA-2016-0762.html


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