Bug 190268 - check whether cron.daily was run with hibernation
check whether cron.daily was run with hibernation
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: cronie (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Marcela Mašláňová
Brock Organ
: Reopened
: 125779 197394 205114 249586 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-29 15:42 EDT by Bastien Nocera
Modified: 2009-03-17 11:06 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-17 11:06:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2006-04-29 15:42:49 EDT
man-1.6c-2.fc5

makewhatis started running on my laptop, while it was unplugged from the AC. The
scripts should use on_ac_power and not run when the laptop is on battery power.
Comment 2 Marcela Mašláňová 2006-11-29 04:26:40 EST
I have some bugs related with "laptop on battery". I'm thinking about some
global solution.
Comment 3 Marcela Mašláňová 2007-07-11 11:27:05 EDT
*** Bug 205114 has been marked as a duplicate of this bug. ***
Comment 4 Marcela Mašláňová 2007-07-11 11:29:18 EDT
*** Bug 197394 has been marked as a duplicate of this bug. ***
Comment 5 Marcela Mašláňová 2007-07-30 10:26:39 EDT
*** Bug 249586 has been marked as a duplicate of this bug. ***
Comment 6 Thorsten Leemhuis 2007-07-30 10:39:09 EDT
/me adjusts the summary of this bug to a general one, as the bugs that were
marked as dupes for this one are not specific to makewhatis (mine was for
prelink, which is way worse then makewhatis here)

(In reply to comment #0)
> man-1.6c-2.fc5
> makewhatis started running on my laptop, while it was unplugged from the AC. The
> scripts should use on_ac_power and not run when the laptop is on battery power.

Bastien, its just a workaround and we need a proper solution, but for now my
workaround was to add "MAKEWHATISDBUPDATES n" to /etc/man.config as I don't use
makewhatis

(In reply to comment #2)
> I have some bugs related with "laptop on battery". I'm thinking about some
> global solution.

Marcela, that was months ago. Did something come out of it? Otherwise I vote for
"fixing the worst jobs for F8 with small hacks" until we have a proper solution
Comment 7 Marcela Mašláňová 2007-07-30 10:55:26 EDT
I believe it should be fixed in some laptop configuration tool. In the meantime
I'll try to fix it with some script, which control on "battery" and don't run
some jobs.
Comment 8 Thorsten Leemhuis 2007-07-30 12:46:43 EDT
(In reply to comment #7)
> I believe it should be fixed in some laptop configuration tool.

Why configuration tool? It IMHO should "just work (tm)"

> In the meantime
> I'll try to fix it with some script, which control on "battery" and don't run
> some jobs.

thx; if you need any help let me know; I'm willing to help write some bash
scritps if you outline a rough solution (we can discuss our ideas on IRC, on a
mailing list or here as well beforehand); and of course I'm also willing to test
stuff. 

Comment 9 Bastien Nocera 2007-07-30 14:01:40 EDT
There's indeed no need for a configuration tool, and there's already a script,
it's called "on_ac_power", and it's in the pm-utils.
Comment 10 David Anderson 2007-08-01 09:12:47 EDT
IMO, it would be sufficient to use "on_ac_power" for the bigger cron jobs (the 
prelink monster, makewhatis). These are optional jobs which help save time 
later but don't affect functionality; ideal candidates for an optional cron 
job that can and should be skipped to save batter power. No global solution is 
really needed; this isn't an ugly hack, it's exactly the kind of situation 
that on_ac_power is designed for.
Comment 11 Marcela Mašláňová 2007-08-14 06:29:18 EDT
I used on_ac_power for anacron - cron.daily,... I hope that fix will be ok for
all  "jobs should not run when on battery". 
Comment 12 Marcela Mašláňová 2007-08-14 06:42:18 EDT
*** Bug 125779 has been marked as a duplicate of this bug. ***
Comment 13 Thorsten Leemhuis 2007-08-14 06:55:19 EDT
(In reply to comment #11)
> I used on_ac_power for anacron - cron.daily,... I hope that fix will be ok for
> all  "jobs should not run when on battery". 

I'd tend to say it's a hack that might create more problems then it solved:

- some of the cron.daily job IMHO should run even when on battery (e.g.
0logwatch and logrotate for example)

- what about cron.{hourly, weekly, monthly}?

- what if someone always starts his notebook on battery everyday in the morning
(e.g. when traveling by train to work for 90 minutes)? Then the daily jobs might
never run if cron tries to start the jobs in that timeframe (even when the
system is on_as later (e.g. when at work) most of the day).
Comment 14 Marcela Mašláňová 2007-08-14 07:09:04 EDT
It's upstream solution changed for fedora. If you have something better don't be
shy and let me know.

This script should start after each reboot and if the cron.daily wasn't run
today and the laptop is not on battery, then should it run dailly.

Comment 15 Aaron Kaplan 2007-10-13 07:51:22 EDT
Don't most laptop users hibernate rather than shutting down?  Checking at boot
time isn't much good on a machine that never reboots except for kernel updates.
Comment 16 Marcela Mašláňová 2007-10-15 03:05:33 EDT
Well, my laptop doesn't hibernate :)

I try to add other features (like running jobs after hibernate), but not in F-8.
Comment 17 Kurt Erickson 2008-03-01 19:58:54 EST
Can we re-open this? It's a serious problem, and clearly hasn't been resolved.
Comment 18 Dave 2008-03-25 22:44:05 EDT
(In reply to comment #15)
> Don't most laptop users hibernate rather than shutting down?  

No they don't.
Almost nobody I know actually uses hibernate, because you generally need to 
authenticate to a whole bunch of resources when you get to your office and the 
easiest way to make sure it all happens correctly (on our company network 
anyway) is to shut down and do a clean boot.
If you hibernate and then try to use the machine without the expected resources 
connected, there is no end to the niggly little problems that make it 'not 
worth the effort'(tm)


Comment 19 Marcela Mašláňová 2008-03-27 06:33:09 EDT
#17 now my laptop can hibernate and you're right. The jobs weren't run after
hibernation.
Comment 20 Marcela Mašláňová 2008-05-05 06:34:01 EDT
I use a script in the cron.hourly, which checks whether cron.daily runs or not,
but at the moment I have problem with hibernation. dm-crypt and hibernate
doesn't work for some time, but I'll be solving issue.
Comment 21 Bug Zapper 2008-05-13 22:09:28 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 22 Marcela Mašláňová 2009-03-17 11:06:29 EDT
In the rawhide is cron set to run script which checks whether anacron executed daily jobs or not. This script check anacron every hour, so it's probable a laptop will be on power and also hibernation couldn't fail it. This will be fixed in F-11, also in F-10 are some workarounds script.

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