landscape-sysinfo can show old/stale information

Bug #270862 reported by Fernando Miguel
4
Affects Status Importance Assigned to Milestone
landscape-client (Ubuntu)
Fix Released
Medium
Unassigned
update-motd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: landscape-client

After i login a TTY/SSH shell landscape-client (always) reports a System load of 2.25, but my system aint that high EVER.
Here is a big of a recent login:

Linux 2.6.27-1-generic #1 SMP Sat Aug 23 23:19:01 UTC 2008 x86_64

  System load: 2.25 Swap usage: 0% Users logged in: 1
  Usage of /home: 23.6% of 281.19GB Temperature: 49 C
  Memory usage: 25% Processes: 217

  Graph these measurements at https://landscape.canonical.com
No mail.
Last login: Tue Sep 16 12:34:56 2008
$ w
 12:46:12 up 4:54, 3 users, load average: 0.04, 0.15, 0.17
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
b tty7 :0 07:52 4:54 17:07m 0.02s /bin/bash /usr/
b pts/0 :0.0 07:53 48:57m 0.36s 0.36s bash
b pts/1 blue 12:44 0.00s 0.20s 0.00s w

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

Can you show the output of

$ python -c 'import os; print os.getloadavg()'

with

$ uptime

from about the same time?

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

On the other hand, you are probably using the default landscape-sysinfo scheme where this message is only updated every 10min. So my guess is that the load was high when the snapshot was taken.

If that's the case, we should probably make the tool (-sysinfo, or update-motd) show a timestamp of when the measurements were taken.

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

Chris, current values for what you asked:
$ python -c 'import os; print os.getloadavg()'
(0.23999999999999999, 0.22, 0.17000000000000001)

$ uptime
 16:25:14 up 8:33, 3 users, load average: 0.20, 0.21, 0.17

$ ssh localhost
Password:
Linux 2.6.27-1-generic #1 SMP Sat Aug 23 23:19:01 UTC 2008 x86_64

  System load: 2.25 Swap usage: 0% Users logged in: 1
  Usage of /home: 23.6% of 281.19GB Temperature: 49 C
  Memory usage: 25% Processes: 217

  Graph these measurements at https://landscape.canonical.com
No mail.
Last login: Tue Sep 16 12:44:39 2008

IIRC it should be updated every 10 min right? so how come after all this time, I get the same values?

OffTopic: funny enough how I get much better and faster support for some package from Canonical then any other of the other for 4 bugs I filled today against Ubuntu... lol

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

root# cat /etc/cron.d/update-motd
# /etc/cron.d/update-motd: crontab fragment for update-motd
#
# THIS FILE IS AUTOMATICALLY GENERATED, YOU SHOULD NOT EDIT DIRECTLY.
#
# To change, use:
# dpkg-reconfigure update-motd
#
# This updates the /etc/motd with a concatenation of output from each
# script in /etc/update-motd.d

*/10 * * * * root /usr/sbin/update-motd 2>/dev/null
root# /usr/sbin/update-motd
update-motd is disabled. You can run:
  * update-motd --force
  * service update-motd start
  * dpkg-reconfigure update-motd

This might explain why the value hasnt change!
Why didnt the cron get enabled?

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

root# update-motd --force

$ ssh localhost
Password:
Linux 2.6.27-1-generic #1 SMP Sat Aug 23 23:19:01 UTC 2008 x86_64

  System load: 0.64 Swap usage: 0% Users logged in: 1
  Usage of /home: 24.2% of 281.19GB Temperature: 54 C
  Memory usage: 38% Processes: 208

  Graph these measurements at https://landscape.canonical.com
No mail.
Last login: Tue Sep 16 16:26:08 2008

Now that sound more like it....

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

This is strange. It may be a bug in the upgrade for update-motd. Dustin, does this look familiar to you? The update-motd cron is there but update-motd is disabled.

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 270862] Re: landscape client show HUGE system load

I doubt it's an update-motd issue.

When you see this problem, in addition to running `w`, also run
`landscape-sysinfo`, and see how those two load averages compare.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: landscape client show HUGE system load

I agree that the landscape-sysinfo wrapper script should call "date" and print the timestamp as to when the information was gathered.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

And I am confused as to why your update-motd is disabled.

Can you:
 * cat /etc/default/update-motd

:-Dustin

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

$ cat /etc/default/update-motd
# update-motd Debian configuration
#
# You can run 'dpkg-reconfigure update-motd' to modify the values in this
# file, if you want. You can also change the values here and changes will
# be preserved.
#
# Do note that only the values are preserved; the rest of the file is
# rewritten.
#

# RUN:
# Should we actually run and update the MOTD?
RUN=yes

Funny enough landscape-client stop working! I can no longer see it!

--
BUGabundo :o)
(``-_-´´) http://LinuxNoDEI.BUGabundo.net
Linux user #443786 GPG key 1024D/A1784EBB
My new micro-blog @ http://BUGabundo.net

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

I think you mean landscape-sysinfo, right? You mean you don't see its at login anymore?

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 270862] Re: landscape client show HUGE system load

And what does this say:
 * /etc/init.d/update-motd status

If it's not running, try starting it with:
 * /etc/init.d/update-motd start

:-Dustin

Revision history for this message
Fernando Miguel (fernandomiguel) wrote : Re: landscape client show HUGE system load

$ /etc/init.d/update-motd status
 * update-motd is not running.

$ sudo /etc/init.d/update-motd start
 * Starting update-motd [ OK ]
$ /etc/init.d/update-motd status
 * update-motd is running.

--
BUGabundo :o)
(``-_-´´) http://LinuxNoDEI.BUGabundo.net
Linux user #443786 GPG key 1024D/A1784EBB
My new micro-blog @ http://BUGabundo.net

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

$ landscape-sysinfo
  System load: 1.04 Swap usage: 0% Users logged in: 1
  Usage of /home: 26.6% of 281.19GB Temperature: 53 C
  Memory usage: 47% Processes: 189

  Graph these measurements at https://landscape.canonical.com
$ ssh localhost
Password:
Linux 2.6.27-1-generic #1 SMP Sat Aug 23 23:19:01 UTC 2008 x86_64

No mail.
Last login: Tue Sep 16 21:32:08 2008
~$ exit

--
BUGabundo :o)
(``-_-´´) http://LinuxNoDEI.BUGabundo.net
Linux user #443786 GPG key 1024D/A1784EBB
My new micro-blog @ http://BUGabundo.net

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

Yes Andreas, I meant landscape-sysinfo

and now my email is getting filled with this message:

Subject: Cron <root@> /usr/sbin/update-motd 2>/dev/null
update-motd is disabled.  You can run:
  * update-motd --force
  * service update-motd start
  * dpkg-reconfigure update-motd

Can you guys fix this ASAP? other wise i'll have to remove the cron.

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

Just updated to landscape-client 1.0.18-0ubuntu2

Unpacking landscape-common (from .../landscape-common_1.0.18-0ubuntu2_all.deb) ...
dpkg: error processing /var/cache/apt/archives/landscape-common_1.0.18-0ubuntu2_all.deb (--unpack):
 trying to overwrite `/usr/lib/python2.5/site-packages/landscape/patch.py', which is also in package landscape-client
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Preparing to replace landscape-client 1.0.18-0ubuntu1 (using .../landscape-client_1.0.18-0ubuntu2_all.deb) ...
 * Running update-motd update-motd is disabled. You can run:
  * update-motd --force
  * service update-motd start
  * dpkg-reconfigure update-motd
                                                                                                                       [fail]
landscape-client is not configured, please run landscape-config.
Unpacking replacement landscape-client ...
dpkg: warning - unable to delete old directory `/etc/landscape': Directory not empty
Errors were encountered while processing:
 /var/cache/apt/archives/landscape-common_1.0.18-0ubuntu2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

~$ landscape-sysinfo
Traceback (most recent call last):
  File "/usr/bin/landscape-sysinfo", line 8, in <module>
ImportError: No module named landscape.sysinfo.deployment

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

The 0ubuntu2 package is broken, a new one was uploaded (0ubuntu3) that should fix the dependency problem.

Changed in landscape-client:
status: New → Confirmed
Changed in update-motd:
status: New → Confirmed
Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

Andreas i already have .3

$ sudo dpkg --configure -a
Setting up landscape-common (1.0.18-0ubuntu3) ...
 * Running update-motd update-motd is disabled. You can run:
  * update-motd --force
  * service update-motd start
  * dpkg-reconfigure update-motd
                                                                                                                       [fail]
ln: creating symbolic link `/etc/profile.d/50-landscape-sysinfo.sh': File exists
dpkg: error processing landscape-common (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of landscape-client:
 landscape-client depends on landscape-common; however:
  Package landscape-common is not configured yet.
dpkg: error processing landscape-client (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 landscape-common
 landscape-client

there's a liink error with it.
But its working when I uses landscape-sysinfo and from TTY/SSH shell.

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

Right, the symlink issue is being tracked elsewhere (bug #270131). The dependency one is what was fixed in ubuntu3.

So, let's recap and try to stay focused on what this bug is about. It was about update-motd showing stale information, which is expected, but could be improved by showing a timestamp in its output.

Then there was the problem about update-motd not being enabled, and Dustin asked for some debugging information to which you replied. This is where we stand now I believe, right?

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

The update-motd error messages were filed an fixed as a separate bug, Bug #271368. Give a little while to build, but it should hit the repositories in a few hours.

:-Dustin

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

You are right Andreas, I'm diverging...
Lets recap then.
Currently my landscape-sysinfo show proper values (updated or not, depends on the cron), and that leaves us with a mere need to improve the text to mention that that value is not the ACTUAL value but from when the cron ran.

I leave it to who to either keep this ticket for that subject (and adapt the bug description accordingly) or close it with fix release.

I'm now subscribed to the other 2 tickets, too.

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

Correct.

You can also change the landscape-sysinfo behaviour if you want it to actually run at each login by running dpkg-reconfigure landscape-common (and maybe "dpkg-reconfigure update-motd" before, as yours may not be setup correctly for some reason that is not clear to me).

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

> (and maybe "dpkg-reconfigure update-motd" before, as yours may not be
> setup correctly for some reason that is not clear to me).

$ sudo dpkg-reconfigure landscape-common
/usr/sbin/dpkg-reconfigure: landscape-common is broken or not fully installed

Maybe this answers that question
--
BUGabundo :o)
(``-_-´´) http://LinuxNoDEI.BUGabundo.net
Linux user #443786 GPG key 1024D/A1784EBB
My new micro-blog @ http://BUGabundo.net
ps. My emails tend to sound authority and aggressive. I'm sorry in advance. I'll try to be more assertive as time goes by...

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

Hmm, right, it's the symlink bug.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I've pushed a suggested fix for this bug into a bzr branch:
 * lp:~kirkland/landscape-client/270862

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I'm marking the update-motd task 'Invalid'. The error message part of the problem with update-motd was filed and fixed as a separate bug.

If users want their landscape-sysinfo information timestamped, it should be handled by sysinfo. I've submitted a bzr branch with a timestamp.py module. It's up to the landscape team to either integrate that, or fix it similarly.

:-Dustin

Changed in update-motd:
status: Confirmed → Invalid
Changed in landscape-client:
importance: Undecided → Medium
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

An alternative to the sysinfo-module approach would be printing the timestamp in the landscape-sysinfo wrapper script.

Attaching a trivial patch to do so.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Please sponsor the attached debdiff.

:-Dustin

Changed in landscape-client:
status: Confirmed → In Progress
Revision history for this message
Mathias Gug (mathiaz) wrote :

Merged into ~ubuntu-core-dev/landscape-client/ubuntu/ branch.

Changed in landscape-client:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * debian/control: fix bzr url
  * debian/landscape-sysinfo.wrapper: print a timestamp before the sysinfo
    data to ensure appropriate context (LP: #270862)

 -- Dustin Kirkland <email address hidden> Tue, 30 Sep 2008 17:13:18 -0500

Changed in landscape-client:
status: Fix Committed → Fix Released
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.