Bug 387301 - anacron complaints on startup
Summary: anacron complaints on startup
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anacron
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-16 17:21 UTC by Michal Jaegermann
Modified: 2007-12-20 19:53 UTC (History)
0 users

Fixed In Version: 2.3-57.fc8
Clone Of:
Environment:
Last Closed: 2007-12-20 19:53:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michal Jaegermann 2007-11-16 17:21:39 UTC
Description of problem:

On level 2 an attempt to start anacron results in

Starting anacron: error: libhal_ctx_set_dbus_connection:
org.freedesktop.DBus.Error.NoServer: Failed to connect to socket
/var/run/dbus/system_bus_socket: Connection refused

Eh?  Anacron requires dbus running?

The issue is that in /etc/rc.d/init.d/anacron there is

# chkconfig: 2345 99 05

while similar line for 'messagebus', and 'haldaemon' needed by
the later, are respectively

# chkconfig: 345 22 85
# chkconfig: 345 98 02

and services run accordingly.

I bumped into that on another machine where messagebus and
haldaemon were, for some unknown to me reasons, configured to
run only on level 5 an I was trying to start anacron on level 3.
This resulted in "OK" from anacron after the above error message
was printed and "is dead" on a status check afterwards.
Starting these two other services and restarting anacron made it
to run.

On my test box doing the above on level two still prints the
above but anacron appears to be running regardless.  I am not sure
what is the difference but why this socket is required in the
first place?

Version-Release number of selected component (if applicable):
anacron-2.3-56.fc8

Comment 1 Marcela Mašláňová 2007-11-19 16:29:25 UTC
There were problems with running huge anacron jobs, when the laptop was on the
battery. I use check of '/usr/bin/on_ac_power', which needs hal running before
anacron starts.

The battery saving this way isn't the best solution, because is dependent on
hal, but now I don't have any better.

Comment 2 Michal Jaegermann 2007-11-19 18:13:52 UTC
> The battery saving this way isn't the best solution,

One thing which comes to mind is to check '/usr/bin/on_ac_power'
not on an anacron startup, with a failure to start if absent, but
before running a particular job (and most likely with missing
hald defaulting to OK and possibly a configuration option to change
such behaviour).  You have to do such checking anyway as a power
status on boot does not have stay the same when you are trying
to run some delayed job.  The same goes for a presence or absence
of the socket in question and besides hald could have been restarted
in the meantime and a file handle from a boot time is no longer valid.

I would imagine that something which does not start hald would
not in general bother with anacron either but who knows?

Comment 3 Marcela Mašláňová 2007-12-11 08:07:38 UTC
I moved check of hal and '/usr/bin/on_ac_power' into 0anacron.* scripts. It
looks fine.

Comment 4 Fedora Update System 2007-12-12 19:57:53 UTC
anacron-2.3-57.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update anacron'

Comment 5 Fedora Update System 2007-12-20 19:53:52 UTC
anacron-2.3-57.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.


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