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
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Pino Toscano
QA Contact: Virtualization Bugs
Jiri Herrmann
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.
Clone Of:
: 1238579 (view as bug list)
Last Closed: 2016-05-10 19:56:05 UTC

Attachments (Terms of Use)

System 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 

# 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:

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)

Comment 5 Xianghua Chen 2015-12-07 02:54:57 UTC
Verified with the packages:
# virt-sysprep -V
virt-sysprep 1.20.11

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

2.# cat .SEQ

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

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.


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