PreserveJobHistory and PreserveJobLog do not respect numeric input as outlined in the docs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cups (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Unassigned | ||
Cosmic |
Fix Released
|
Medium
|
Unassigned | ||
Disco |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[Impact]
The documentation allows the following types of arguments for the PreserveJobHistory parameter:
PreserveJobHistory Yes
PreserveJobHistory No
PreserveJobHistory seconds
The value in seconds is treated in the same as 'No' resulting in immediate removing of jobs from history, while it is supposed to save it for <seconds>.
[Test Case]
1. Set PreserveJobHistory to 30. Set LogLevel to debug.
2. Schedule a job for printing.
3. Check the error_log.
4. Set PreserveJobHistory to No. Repeat 2-3.
5. Set PreserveJobHistory to Yes. Repeat 2-3.
Expected result (for PreserveJobHistory values):
30: Job is save for at least 30 seconds.
No: Job is removed right after processing.
Yes: Job is never removed.
Actual results (for PreserveJobHistory values):
30: Job is immediately removed from history.
No: Job is removed right after processing.
Yes: Job is never removed.
[Regression Potential]
* With the fix the jobs will be saved longer than before, so in tight conditions (low disk space) and heavy workload it may affect memory/disk space consumption and lead to running out of free space in worst case.
[Other Info]
* Original bug description:
1) Ubuntu Release
Description: Ubuntu 16.04.3 LTS
Release: 16.04
2) Version of the package
cups:
Installed: 2.1.3-4ubuntu0.3
Candidate: 2.1.3-4ubuntu0.3
Version table:
*** 2.1.3-4ubuntu0.3 500
500 http://
3) What I expected to happen:
from man cupsd.conf
PreserveJ
for the indicated number of seconds after printing. The default is "86400" (preserve 1 day).
the indicated number of seconds after printing. If "Yes", the job history is preserved until the MaxJobs limit is reached. The default
is "Yes".
4) What happens instead....
If I put the following directives in cupsd.conf the job files and history are deleted immediately.
PreserveJobFiles 604800
PreserveJobHistory 604800
Debug log showing history being purged:
d [06/Feb/
d [06/Feb/
D [06/Feb/
D [06/Feb/
description: | updated |
Changed in cups (Ubuntu): | |
importance: | Undecided → Medium |
tags: | added: sts |
Changed in cups (Ubuntu Disco): | |
assignee: | nobody → Dariusz Gadomski (dgadomski) |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in cups (Ubuntu Disco): | |
assignee: | Dariusz Gadomski (dgadomski) → nobody |
description: | updated |
tags: |
added: verification-done verification-done-xenial removed: verification-needed verification-needed-xenial |
Status changed to 'Confirmed' because the bug affects multiple users.