Bug 702087

Summary: Saving crontab errors on save if any time nicknames are used.
Product: [Fedora] Fedora Reporter: dakdikmen
Component: fwbackupsAssignee: Stewart Adam <s.adam>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: s.adam, webmaster
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 15:42:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description dakdikmen 2011-05-04 18:20:56 UTC
Description of problem:
If the user already has entries in his/her crontab that contains any of the time 'nicknames' e.g/:

string         meaning
------         -------
@reboot        Run once, at startup.
@yearly        Run once a year, "0 0 1 1 *".
@annually      (same as @yearly)
@monthly       Run once a month, "0 0 1 * *".
@weekly        Run once a week, "0 0 * * 0".
@daily         Run once a day, "0 0 * * *".
@midnight      (same as @daily)
@hourly        Run once an hour, "0 * * * *".

The fwbackups will stack trace as such:
Traceback (most recent call last):
  File "/usr/share/fwbackups/fwbackups-runapp.pyw", line 659, in main_close_traywrapper
    return self.main_close()
  File "/usr/share/fwbackups/fwbackups-runapp.pyw", line 697, in main_close
    self.regenerateCrontab()
  File "/usr/share/fwbackups/fwbackups-runapp.pyw", line 609, in regenerateCrontab
    fwbackupCronLines = cron.clean_fwbackups_entries()
  File "/usr/lib/python2.7/site-packages/fwbackups/cron.py", line 248, in clean_fwbackups_entries
    fields = parsedLine.get_all_fields()
  File "/usr/lib/python2.7/site-packages/fwbackups/cron.py", line 99, in get_all_fields
    raise ValueError("Entry is not parsable")
ValueError: Entry is not parsable


Version-Release number of selected component (if applicable):


How reproducible:
Easy was to reproduce is to setup back-in-time and fwbackup to both do backups on FC14.. the defaults will cause errors on them selves.

Backintime's cron tab example:
@daily nice -n 19 /usr/bin/backintime --backup-job >/dev/null 2>&1

fwbackups cron tab example:
21 3 * * * fwbackups-run -l 'davida-lvm-urm' # autogenerated by fwbackups
0 0 * * * fwbackups-run -l 'davida-t-urm' # autogenerated by fwbackups



Steps to Reproduce:
1. Setup backintime daily backup of your home directory.
2. Setup once a month backup with fwbackups.
3. Try to save it (using an backup set).
  
Actual results:
Crontab not updated.

Expected results:
@daily nice -n 19 /usr/bin/backintime --backup-job >/dev/null 2>&1
21 3 * * * fwbackups-run -l 'davida-lvm-urm' # autogenerated by fwbackups
0 0 * * * fwbackups-run -l 'davida-t-urm' # autogenerated by fwbackups


Additional info:
Did not test all eight 'special strings', just the @daily doesn't work.
Don't know when these special nicknames where introduced.  In FC14 look at the extensions sections of 'man 5 crontab' for explanation of 7 of them.

Comment 1 Stewart Adam 2011-05-04 19:55:08 UTC
What version of fwbackups do you have installed? Newer versions should ignore any unparsable lines and save them to the crontab as-is.

Comment 2 PhiloRex 2012-05-01 07:20:53 UTC
Hi Stewart,

I'm not the original poster of this bug, but I receive the same error message when editing and creating backup sets.  I'm using fwbackups version 1.43.4 compiled on debian squeeze.

Comment 3 Fedora End Of Life 2012-08-16 15:42:51 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping