package reporter log and lock created with wrong ownership when using repository profiles
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Landscape Client |
High
|
Alberto Donato |
Bug Description
If you accept into landscape a computer with a tag, and that tag is associated with a repository profile, the following happens:
- two activities are queued: pending computer and apply repository profile
- on the client, the package reporter runs as root and creates the following two files with root ownership:
/var/log/
/var/lib/
/var/lib/
- subsequent runs of the package reporter fail:
==> monitor.log <==
2011-06-30 14:01:19,040 WARNING [MainThread] Package reporter output:
Traceback (most recent call last):
File "/usr/bin/
main(
File "/usr/lib/
return run_task_
File "/usr/lib/
lock_
File "/usr/lib/
fd = os.open(path, os.O_CREAT)
OSError: [Errno 13] Permission denied: '/var/lib/
As a result, no package is ever reported back to landscape.
If I accept the computer without the tag that triggers the repository profile activity, the package reporter files are created with "landscape" as their owner and everything works.
client version 11.06~bzr338-
Related branches
- Free Ekanayaka (community): Approve on 2011-07-07
- Alberto Donato: Abstain on 2011-07-07
- Thomas Herve (community): Approve on 2011-07-07
- Diff: 0 lines
Andreas Hasenack (ahasenack) wrote : | #2 |
This is the process tree showing it happening:
root 7697 0.2 1.8 11816 7008 ? S 14:07 0:00 /usr/bin/python /usr/bin/
105 7700 0.5 2.8 32544 11156 ? S 14:07 0:00 \_ /usr/bin/python /usr/bin/
root 7712 0.5 2.5 29344 9836 ? S 14:07 0:00 \_ /usr/bin/python /usr/bin/
root 7781 15.0 2.0 10684 7976 ? S 14:08 0:00 | \_ /usr/bin/python /usr/bin/
105 7716 0.6 2.7 13844 10728 ? S 14:07 0:00 \_ /usr/bin/python /usr/bin/
Andreas Hasenack (ahasenack) wrote : | #3 |
This is the process tree when there is no repository profile being delivered together with the registration:
root 7995 0.2 1.8 11812 7008 ? S 14:10 0:00 /usr/bin/python /usr/bin/
105 7997 0.5 2.7 32540 10784 ? S 14:10 0:00 \_ /usr/bin/python /usr/bin/
root 8010 0.4 2.5 29348 9784 ? S 14:10 0:00 \_ /usr/bin/python /usr/bin/
105 8014 0.5 2.7 13844 10724 ? S 14:10 0:00 \_ /usr/bin/python /usr/bin/
105 8106 5.0 2.0 10968 8052 ? S 14:11 0:00 \_ /usr/bin/python /usr/bin/
Andreas Hasenack (ahasenack) wrote : | #4 |
The problem doesn't happen if I don't delete the smart cache and config (/var/lib/smart/*) before each run.
So:
- if I start the test with a completely new system, it breaks when repository profiles are involved.
- if I then wipe /var/lib/
tags: | added: theme-apt-sources |
Andreas Hasenack (ahasenack) wrote : | #5 |
Ignore that last comment, it doesn't make much sense and now that didn't happen in another attempt.
tags: | added: squad-gamma |
description: | updated |
tags: |
added: story-apt-sources removed: theme-apt-sources |
Changed in landscape-client: | |
milestone: | backlog → 11.07.1 |
Changed in landscape-client: | |
status: | New → In Progress |
assignee: | nobody → Alberto Donato (ack) |
Changed in landscape-client: | |
status: | In Progress → Fix Committed |
tags: | added: verified |
Hello Andreas, or anyone else affected,
Accepted landscape-client into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https:/
tags: | added: verification-needed |
Andreas Hasenack (ahasenack) wrote : | #7 |
Verified with landscape-
root@ls1-lucid:~# apt-cache policy landscape-client
landscape-client:
Installed: 11.07.1.
Candidate: 11.07.1.
Version table:
*** 11.07.1.
500 http://
100 /var/lib/
11.
500 http://
1.
500 http://
Permissions are correct in the scenario described by this bug:
root@ls1-lucid:~# ls -la /var/log/
-rwx------ 1 landscape landscape 0 2011-07-27 21:44 /var/lib/
-rw-r--r-- 1 landscape landscape 0 2011-07-27 21:47 /var/lib/
-rw------- 1 landscape landscape 1331 2011-07-27 21:47 /var/log/
tags: |
added: verification-done removed: verification-needed |
Martin Pitt (pitti) wrote : | #8 |
Hello Andreas, or anyone else affected,
Accepted landscape-client into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https:/
tags: | removed: verification-done |
tags: | added: verification-needed |
Martin Pitt (pitti) wrote : | #9 |
Hello Andreas, or anyone else affected,
Accepted landscape-client into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https:/
Andreas Hasenack (ahasenack) wrote : | #10 |
Verified with the proposed packages from Maverick and Natty that the permissions and ownership of the mentioned files in /var/log/landscape and /var/lib/
Changed in landscape-client: | |
status: | Fix Committed → Fix Released |
I'm marking this as "high" because there is no way for the client to fix itself once it gets into this situation.