postinst script fails if data_path not set in client.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
In Progress
|
Low
|
Simon Poirier | ||
landscape-client (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Manually editing landscape client.conf to unset the data_path
blocks upgrade postinst. That field was not required to be present
before 14.04, and older configurations can fail to upgrade without
purging the existing configuration.
* Although data_path is set by default, removing the line is accepted
by landscape and it will use a default path. The fix simply makes sure
the postinst script also has that default.
[Test Case]
* sed -i -e '/data_path/d' /etc/landscape/
* apt install --reinstall landscape-client
[Regression Potential]
* The change is fairly trivial. Regression could be possible if the
default paths were changed and not reflected in the postinst.
In such a case the resync flag file wouldn't be created,
resulting in an out-of-sync list of users; this would be low impact.
[Original Description]
Tested on 14.04.5, landscape-client (14.12-
If the data_path directive is not present in /etc/landscape/
Setting up landscape-client (14.12-
install: missing file operand
Try 'install --help' for more information.
dpkg: error processing package landscape-client (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
landscape-client
E: Sub-process /usr/bin/dpkg returned an error code (1)
Relevant section of the postinst script:
# In response to bug 1508110 we need to trigger a complete update of
# user information. The flag file will be removed by the client when
# the update completes.
install --owner=landscape --directory $DATA_PATH
install --owner=landscape /dev/null $USER_UPDATE_
It would be helpful if the script checked for data_path's existence and emitted a more informative error message.
How to reproduce:
Install/
Remove landscape-client
Remove data_path from /etc/landscape/
Reinstall landscape-client.
Related branches
- Andreas Hasenack (community): Approve
- git-ubuntu developers: Pending requested
-
Diff: 377 lines (+326/-1)6 files modifieddebian/changelog (+12/-0)
debian/landscape-client.init (+2/-1)
debian/landscape-client.postinst (+3/-0)
debian/patches/product-name-vminfo-1828217.patch (+49/-0)
debian/patches/series (+2/-0)
debian/patches/stagger-launch-1788518.patch (+258/-0)
- Andreas Hasenack (community): Approve
- Canonical Server: Pending requested
-
Diff: 338 lines (+287/-1)6 files modifieddebian/changelog (+12/-0)
debian/landscape-client.init (+2/-1)
debian/landscape-client.postinst (+3/-0)
debian/patches/product-name-vminfo-1828217.patch (+49/-0)
debian/patches/series (+2/-0)
debian/patches/stagger-launch-1788518.patch (+219/-0)
- Andreas Hasenack (community): Approve
- git-ubuntu developers: Pending requested
-
Diff: 377 lines (+326/-1)6 files modifieddebian/changelog (+12/-0)
debian/landscape-client.init (+2/-1)
debian/landscape-client.postinst (+3/-0)
debian/patches/product-name-vminfo-1828217.patch (+49/-0)
debian/patches/series (+2/-0)
debian/patches/stagger-launch-1788518.patch (+258/-0)
- Andreas Hasenack (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 377 lines (+326/-1)6 files modifieddebian/changelog (+12/-0)
debian/landscape-client.init (+2/-1)
debian/landscape-client.postinst (+3/-0)
debian/patches/product-name-vminfo-1828217.patch (+49/-0)
debian/patches/series (+2/-0)
debian/patches/stagger-launch-1788518.patch (+258/-0)
tags: | added: sts |
Changed in landscape-client (Ubuntu): | |
importance: | Undecided → Low |
Changed in landscape-client: | |
status: | New → Triaged |
importance: | Undecided → Critical |
importance: | Critical → Low |
Changed in landscape-client: | |
status: | Triaged → Confirmed |
Changed in landscape-client: | |
assignee: | nobody → Simon Poirier (simpoir) |
Changed in landscape-client: | |
status: | Confirmed → In Progress |
description: | updated |
tags: |
added: verification-done-xenial removed: verification-needed-xenial |
Do you have any idea how the config file ended up missing that configuration key? Just trying to gauge how frequent this is (hint: it's the fist time I saw this)