Verified for bionic.
apt-cache policy cups-daemon
cups-daemon:
  Installed: 2.2.7-1ubuntu2.6

lp -d PDF /usr/share/cups/data/default.pdf

PreserveJobHistory 30:
I [04/Jun/2019:08:52:25 +0000] [Job 1] Job completed
D [04/Jun/2019:08:52:56 +0000] [Job 1] Removing from history.

PreserveJobHistory No:
I [04/Jun/2019:08:53:58 +0000] [Job 2] Job completed.
D [04/Jun/2019:08:53:58 +0000] [Job 2] Removing from history.

PreserveJobHistory Yes:
I [04/Jun/2019:08:54:55 +0000] [Job 5] Job completed.
(...)

** Description changed:

  [Impact]
  
-  The documentation allows the following types of arguments for the 
PreserveJobHistory parameter:
+  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>.
+ 
+ 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]
  
-  * Set PreserveJobHistory to 300.
-  * Schedule a job for printing.
-  * Check the error_log.
+  1. Set PreserveJobHistory to 300.
+  2. Schedule a job for printing.
+  3. Check the error_log.
+  4. Set PreserveJobHistory to Yes. Repeat 2-3.
+  5. Set PreserveJobHistory to No. Repeat 2-3.
+  
  
- Expected result:
- Job is save for at least 300 seconds.
+ Expected result (for PreserveJobHistory values):
+ 300: Job is save for at least 300 seconds.
+ Yes: Job is never removed.
+ No: Job is removed right after processing.
  
- Actual results:
- Job is immediately removed from history.
+ 
+ Actual results (for PreserveJobHistory values):
+ 300: Job is immediately removed from history.
+ Yes: Job is never removed.
+ No: Job is removed right after processing.
  
  [Regression Potential]
  
-  * With the fix the jobs will be saved longer than before, so in tight
+  * 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:
+ 
+  * 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://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
  
  3) What I expected to happen:
  from man cupsd.conf
  
        PreserveJobFiles Yes
  
         PreserveJobFiles No
  
         PreserveJobFiles seconds
              Specifies  whether  job files (documents) are preserved after a 
job is printed.  If a numeric value is specified, job files are preserved
              for the indicated number of seconds after printing.  The default 
is "86400" (preserve 1 day).
  
         PreserveJobHistory Yes
  
         PreserveJobHistory No
  
         PreserveJobHistory seconds
              Specifies whether the job history is preserved after a job is 
printed.  If a numeric value is specified, the job history is preserved for
              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/2018:15:11:59 -0600] cupsdCheckJobs: 0 active jobs, sleeping=0, 
ac-power=-1, reload=0, curtime=1517951519
  d [06/Feb/2018:15:11:59 -0600] cupsdCleanJobs: MaxJobs=100, 
JobHistory=604800, JobFiles=604800
  D [06/Feb/2018:15:11:59 -0600] [Job 106] Removing from history.
  D [06/Feb/2018:15:11:59 -0600] [Job 106] Unloading...

** Description changed:

  [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 300.
+  1. Set PreserveJobHistory to 30.
   2. Schedule a job for printing.
   3. Check the error_log.
-  4. Set PreserveJobHistory to Yes. Repeat 2-3.
-  5. Set PreserveJobHistory to No. Repeat 2-3.
-  
+  4. Set PreserveJobHistory to Yes. Repeat 2-3.
+  5. Set PreserveJobHistory to No. Repeat 2-3.
  
  Expected result (for PreserveJobHistory values):
- 300: Job is save for at least 300 seconds.
+ 300: Job is save for at least 30 seconds.
  Yes: Job is never removed.
  No: Job is removed right after processing.
- 
  
  Actual results (for PreserveJobHistory values):
  300: Job is immediately removed from history.
  Yes: Job is never removed.
  No: Job is removed right after processing.
  
  [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://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
  
  3) What I expected to happen:
  from man cupsd.conf
  
        PreserveJobFiles Yes
  
         PreserveJobFiles No
  
         PreserveJobFiles seconds
              Specifies  whether  job files (documents) are preserved after a 
job is printed.  If a numeric value is specified, job files are preserved
              for the indicated number of seconds after printing.  The default 
is "86400" (preserve 1 day).
  
         PreserveJobHistory Yes
  
         PreserveJobHistory No
  
         PreserveJobHistory seconds
              Specifies whether the job history is preserved after a job is 
printed.  If a numeric value is specified, the job history is preserved for
              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/2018:15:11:59 -0600] cupsdCheckJobs: 0 active jobs, sleeping=0, 
ac-power=-1, reload=0, curtime=1517951519
  d [06/Feb/2018:15:11:59 -0600] cupsdCleanJobs: MaxJobs=100, 
JobHistory=604800, JobFiles=604800
  D [06/Feb/2018:15:11:59 -0600] [Job 106] Removing from history.
  D [06/Feb/2018:15:11:59 -0600] [Job 106] Unloading...

** Description changed:

  [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.
   2. Schedule a job for printing.
   3. Check the error_log.
   4. Set PreserveJobHistory to Yes. Repeat 2-3.
   5. Set PreserveJobHistory to No. Repeat 2-3.
  
  Expected result (for PreserveJobHistory values):
- 300: Job is save for at least 30 seconds.
+ 30: Job is save for at least 30 seconds.
  Yes: Job is never removed.
  No: Job is removed right after processing.
  
  Actual results (for PreserveJobHistory values):
- 300: Job is immediately removed from history.
+ 30: Job is immediately removed from history.
  Yes: Job is never removed.
  No: Job is removed right after processing.
  
  [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://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
  
  3) What I expected to happen:
  from man cupsd.conf
  
        PreserveJobFiles Yes
  
         PreserveJobFiles No
  
         PreserveJobFiles seconds
              Specifies  whether  job files (documents) are preserved after a 
job is printed.  If a numeric value is specified, job files are preserved
              for the indicated number of seconds after printing.  The default 
is "86400" (preserve 1 day).
  
         PreserveJobHistory Yes
  
         PreserveJobHistory No
  
         PreserveJobHistory seconds
              Specifies whether the job history is preserved after a job is 
printed.  If a numeric value is specified, the job history is preserved for
              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/2018:15:11:59 -0600] cupsdCheckJobs: 0 active jobs, sleeping=0, 
ac-power=-1, reload=0, curtime=1517951519
  d [06/Feb/2018:15:11:59 -0600] cupsdCleanJobs: MaxJobs=100, 
JobHistory=604800, JobFiles=604800
  D [06/Feb/2018:15:11:59 -0600] [Job 106] Removing from history.
  D [06/Feb/2018:15:11:59 -0600] [Job 106] Unloading...

** Description changed:

  [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.
+  1. Set PreserveJobHistory to 30. Set LogLevel to debug.
   2. Schedule a job for printing.
   3. Check the error_log.
   4. Set PreserveJobHistory to Yes. Repeat 2-3.
   5. Set PreserveJobHistory to No. Repeat 2-3.
  
  Expected result (for PreserveJobHistory values):
  30: Job is save for at least 30 seconds.
  Yes: Job is never removed.
  No: Job is removed right after processing.
  
  Actual results (for PreserveJobHistory values):
  30: Job is immediately removed from history.
  Yes: Job is never removed.
  No: Job is removed right after processing.
  
  [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://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
  
  3) What I expected to happen:
  from man cupsd.conf
  
        PreserveJobFiles Yes
  
         PreserveJobFiles No
  
         PreserveJobFiles seconds
              Specifies  whether  job files (documents) are preserved after a 
job is printed.  If a numeric value is specified, job files are preserved
              for the indicated number of seconds after printing.  The default 
is "86400" (preserve 1 day).
  
         PreserveJobHistory Yes
  
         PreserveJobHistory No
  
         PreserveJobHistory seconds
              Specifies whether the job history is preserved after a job is 
printed.  If a numeric value is specified, the job history is preserved for
              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/2018:15:11:59 -0600] cupsdCheckJobs: 0 active jobs, sleeping=0, 
ac-power=-1, reload=0, curtime=1517951519
  d [06/Feb/2018:15:11:59 -0600] cupsdCleanJobs: MaxJobs=100, 
JobHistory=604800, JobFiles=604800
  D [06/Feb/2018:15:11:59 -0600] [Job 106] Removing from history.
  D [06/Feb/2018:15:11:59 -0600] [Job 106] Unloading...

** Tags removed: verification-needed-bionic
** Tags added: verification-done-bionic

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1747765

Title:
  PreserveJobHistory and PreserveJobLog do not respect numeric input as
  outlined in the docs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1747765/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to