error: config file /etc/landscape/client.conf can't be read

Bug #1293990 reported by Thomas on 2014-03-18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Landscape Client
Adam Collard
landscape-client (Ubuntu)
Andreas Hasenack
Andreas Hasenack

Bug Description

After a fresh install of ubuntu-server and logon on the local console I get the follow lines:

error: config file /etc/landscape/client.conf can't be read
run-parts: /etc/update-motd.d/50-landscape-sysinfo exited with return code 1

I don't want to use landscape, and don't think, that I got asked on install to select between automatic updates and landscape setup.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: landscape-common 14.01-0ubuntu2
ProcVersionSignature: Ubuntu 3.13.0-17.37-generic 3.13.6
Uname: Linux 3.13.0-17-generic x86_64
ApportVersion: 2.13.3-0ubuntu1
Architecture: amd64
Date: Tue Mar 18 09:40:52 2014
InstallationDate: Installed on 2014-03-17 (0 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140313)
 PATH=(custom, no user)
SourcePackage: landscape-client
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Thomas (t.c) wrote :
description: updated
Thomas (t.c) wrote :

running /usr/bin/landscape-sysinfo exit also with the error and the sysinfo get not displayed :(

Thomas (t.c) wrote :

touch /etc/landscape/client.conf
fixed the error and the sysinfo get displayed. But I think, we should ask in the script, if the file exist or not.

Thomas (t.c) wrote :

But sysinfo get not displayed over remote shell (ssh) - like it was before :(

Thomas (t.c) wrote :

ok, after a second logon the motd sysinfo get also displayed on ssh.

Changed in landscape-client (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in landscape-client:
milestone: none → 14.04
status: New → Confirmed
tags: added: kanban
tags: removed: kanban
Andreas Hasenack (ahasenack) wrote :

landscape-common 13.07.3 doesn't exhibit this, and it also doesn't install /etc/landscape/client.conf

Andreas Hasenack (ahasenack) wrote :

This seems to fix it. Why it wasn't needed in 13.07.3 I don't know yet, could be related to the change from ConfigParser to ConfigObj.

=== modified file 'landscape/sysinfo/'
--- landscape/sysinfo/ revid:<email address hidden>
+++ landscape/sysinfo/ 2014-03-18 20:52:29 +0000
@@ -100,7 +100,7 @@
     if sysinfo is None:
         sysinfo = SysInfoPluginRegistry()
     config = SysInfoConfiguration()
- config.load(args)
+ config.load(args, accept_nonexistent_config=True)
     for plugin in config.get_plugins():

I'll test this.

Andreas Hasenack (ahasenack) wrote :

The problem with that fix is that it will silently ignore config files you give in the command line that don't exist:

# l /etc/landscape/client.conf
ls: cannot access /etc/landscape/client.conf: No such file or directory

# landscape-sysinfo -c /foo/bar/does/not/exist
  Users logged in: 1

  => There is 1 zombie process.

  Graph this data and manage this system at:

Changed in landscape-client:
assignee: nobody → Adam Collard (adam-collard)
importance: Undecided → High
Andreas Hasenack (ahasenack) wrote :

To clarify, both 13.07.3 and 14.01 present the same behavior if accept_nonexistent_config=True. It's just that 13.07.3 didn't need it.

tags: added: squad-gamma
Changed in landscape-client:
status: Confirmed → In Progress
Changed in landscape-client:
status: In Progress → Fix Committed
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:

tags: added: iso-testing
Changed in landscape-client (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Andreas Hasenack (ahasenack)
Andreas Hasenack (ahasenack) wrote :

The fix needs to be slightly different. This is how 13.07.3 behaves:
ubuntu@server-d3b53f12-ca66-486f-b82f-f87ff392df3c:~$ l /etc/landscape/
total 12K
drwxr-xr-x 2 root root 4.0K Mar 25 13:55 .
drwxr-xr-x 86 root root 4.0K Mar 25 13:53 ..
-rw------- 1 landscape root 164 Mar 25 13:55 client.conf
ubuntu@server-d3b53f12-ca66-486f-b82f-f87ff392df3c:~$ landscape-sysinfo
  System load: 1.07 Processes: 60
  Usage of /: 8.8% of 9.84GB Users logged in: 1
  Memory usage: 3% IP address for eth0:
  Swap usage: 0%

  Graph this data and manage this system at:
ubuntu@server-d3b53f12-ca66-486f-b82f-f87ff392df3c:~$ landscape-sysinfo -c /etc/landscape/client.conf
error: config file /etc/landscape/client.conf can't be read

In summary, sysinfo in 14.01 should not complain if:
a) the *default* config file does not exist
b) the *default* config file is not readable

It should complain if the file specified by -c:
a) does not exist
b) is not readable

Changed in landscape-client:
status: Fix Committed → In Progress
Changed in landscape-client:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 14.01-0ubuntu3

landscape-client (14.01-0ubuntu3) trusty; urgency=medium

  * landscape-sysinfo should ignore non existent or unreadable default
    config files. (LP: #1293990)
 -- Andreas Hasenack <email address hidden> Fri, 28 Mar 2014 10:20:01 -0300

Changed in landscape-client (Ubuntu Trusty):
status: In Progress → Fix Released
Changed in landscape-client:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers