landscape-client must have a cron job for updating smart package data

Bug #268765 reported by Christopher Armstrong
8
Affects Status Importance Assigned to Milestone
Landscape Client
Invalid
Critical
Christopher Armstrong
landscape-client (Ubuntu)
Fix Released
Critical
Christopher Armstrong

Bug Description

Binary package hint: landscape-client

Landscape package management is basically useless unless the smart package data gets updated regularly; no package management features will work. landscape-client should set up a cron job for running 'smart update'.

Revision history for this message
Christopher Armstrong (radix) wrote :

Patch attached, requesting sponsorship.

Revision history for this message
Christopher Armstrong (radix) wrote :

Now that the new smart package is in main this patch can work :)

Changed in landscape-client:
importance: Undecided → Critical
status: New → In Progress
assignee: nobody → radix
assignee: nobody → radix
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This fix is very important for Landscape. Landscape _will_not_work_ without it.

Changed in landscape-client:
status: New → In Progress
Mathias Gug (mathiaz)
Changed in landscape-client:
importance: Undecided → Critical
milestone: none → ubuntu-8.10-beta
Revision history for this message
Steve Langasek (vorlon) wrote :

Hi Chris,

Given that landscape-client starts a daemon if enabled (/usr/bin/landscape-client, launched from /etc/init.d/landscape-client), wouldn't it be preferable to have landscape-client itself run this update periodically, rather than having cron run it?

Alternatively, could you adjust this cron job to source /etc/default/landscape-client, and only run the update when landscape is enabled, the way the init script itself does?

Revision history for this message
Mathias Gug (mathiaz) wrote :

Would a daily cron job be possible ?

An hourly cron job would put unnecessary strain on the archive. Update-notifier and the apt update cron job are run on daily basis.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

What about this for the cron job? It only runs if landscape-client is enabled.

#!/bin/sh

[ -f "/etc/default/landscape-client" ] || exit 0

source /etc/default/landscape-client

[ "$RUN" -eq "1" ] && /usr/share/smart/smart update > /dev/null 2>&1

exit 0

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 1.0.21-0ubuntu2

---------------
landscape-client (1.0.21-0ubuntu2) intrepid; urgency=low

  * debian/rules: Install an hourly cron job to update smart package data.
    Thanks to Christopher Armstrong (LP: #268765).
  * debian/control:
    - Move ${misc:Depends} to Depends.
    - Add VCS-* headers.
  * debian/landscape-client.postrm:
    - remove /etc/default/landscape-client when the package is purged.

 -- Mathias Gug <email address hidden> Tue, 23 Sep 2008 18:19:26 -0400

Changed in landscape-client:
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Erm, isn't a hourly cronjob a bit exaggerated? Mirrors only update daily, and the already existing cronjob for apt runs once a day.

Also, why can't smart use the already existing downloaded apt cache? Eventually it just gets the Packages.gz files, we don't provide any other index. Why does it need to download them a second time?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This hourly cronjob was debated yesterday on #ubuntu-devel. For now, we are keeping it, specially because we changed it so it only runs when landscape-client itself is running:

<mathiaz> niemeyer: the concern is to put too much load on the servers and mirrors
<slangasek> mathiaz: I agree that if you're managing a bunch of workstations centrally, you want the average latency to be much lower than 12h
<niemeyer> mathiaz: Well, I agree.. it would consume less resources from the server
* warp10 has quit (Read error: 110 (Connection timed out))
<niemeyer> mathiaz: The question, though, is if it makes an important difference or not
<niemeyer> mathiaz: It does make a difference for Landscape usability
<niemeyer> mathiaz: If you're concerned about it, we can ask elmo about it
<mathiaz> niemeyer: the main raise I'm asking is that the default ubuntu install (with apt) doesn't update on a hourly basis.
<niemeyer> mathiaz: It's a slightly different use case I guess
<mathiaz> niemeyer: right - if it makes a difference for landscape usability than a hourly cron job is the best option
<niemeyer> mathiaz: We can always fire APT/Synaptic/whatever and get the current infomration
<niemeyer> mathiaz: For a server-side solution that's not so practical
* warp10_ is now known as warp10
<slangasek> hmm, on-demand triggering of an update check isn't possible?
<niemeyer> slangasek: It is definitely possible, but it's a bad UI
* effie_jayx has quit (Remote closed the connection)
<slangasek> ok. I imagine it would be a suboptimal user experience regardless, due to the latency of checking
* seb128 has quit ("Ex-Chat")
<niemeyer> slangasek: Try to imagine something like "The information you're looking at is 20h old. If you want to know the current updates, click on Update All Systems and come back in a few minutes."
<slangasek> right :)
* seb128 (n=seb128@ubuntu/member/seb128) has joined #ubuntu-devel
<pitti> re (sorry, got some spontaneous guests)
<slangasek> anyway, I'm certainly not arguing against the 1h cronjob

About smart using pkglist from apt, it may happen sometime in the future, but not now. I can imagine a few people becoming concerned if suddenly smart used apt's cache, or, as it would indeed happen, "smart update" also updated apt's cache. It would have to go both ways.

And remember that smart works with more package resolvers/systems than just apt/deb, so such a solution would probably be better if it were generalized.

Revision history for this message
Christopher Armstrong (radix) wrote :

This only required packaging change, not upstream change, so marking Invalid for landscape-client upstream

Changed in landscape-client:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.