Bug 35906 - univention-samba4-backup has unused parameters
univention-samba4-backup has unused parameters
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: Samba
unspecified
All Linux
: P5 enhancement (vote)
: ---
Assigned To: Dmitry Galkin
Arvid Requate
:
Depends on: 35085
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-11 15:01 CEST by Stefan Gohmann
Modified: 2023-03-25 06:48 CET (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2014-09-11 15:01:33 CEST
Please check if a test case is possible.

+++ This bug was initially created as a clone of Bug #35085 +++

The script univention-samba4-backup is called as followed, from a cron job:
0 3 * * * root /usr/sbin/univention-samba4-backup

In the script itself are some parameter declared:
Options:
   --help|-h                   display this message
   --where|-w <DIR>            backup directory
   --from-where|-f <DIR>       samba provision directory
   --days|-d <INT>             retention period in days

But the template for writing the Cron Job is ignoring those parameters:
/etc/univention/templates/files/etc/cron.d/univention-samba4-backup
print "%s root /usr/sbin/univention-samba4-backup" % samba4_backup_cron

It would be usefull to map those parameters with UCR variables.
For example, we should be able to configure the retention period but don't want to modify the template, so not risking any incompatibility with later upgrades.
Comment 1 Dmitry Galkin univentionstaff 2014-11-07 13:40:12 CET
r55502:
  * 51_samba4/20backup_parameters_usage: check that backup cron job
    parameters are set (Bug #35906).
Comment 2 Arvid Requate univentionstaff 2015-02-05 16:27:13 CET
Currently the test skips the actual check for the options unless the corresponding UCR variable is set. If the UCR variable is not set, the test needs to actually set some option to confirm that it's committed to the cron file, e.g.

> ucr set samba4/backup/cron/options="--days 88"
Comment 3 Dmitry Galkin univentionstaff 2015-02-10 11:12:34 CET
(In reply to Arvid Requate from comment #2)
> Currently the test skips the actual check for the options unless the
> corresponding UCR variable is set. If the UCR variable is not set, the test
> needs to actually set some option to confirm that it's committed to the cron
> file, e.g.
> 
> > ucr set samba4/backup/cron/options="--days 88"

OK

r57911:
  * 51_samba4/20backup_parameters_usage:
    force UCR vars settings for the test (Bug #35906).
Comment 4 Arvid Requate univentionstaff 2015-02-16 20:21:21 CET
Ok.