group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #33378
[Bug 1728681] Re: postinst script fails if data_path not set in client.conf
This bug was fixed in the package landscape-client -
16.03-0ubuntu2.16.04.7
---------------
landscape-client (16.03-0ubuntu2.16.04.7) xenial; urgency=medium
* d/p/product-name-vminfo-1828217.patch: Add product_name to things scanned
for vm_info (LP: #1828217)
* d/landscape-client.postinst: Set default value if data_path is
missing. (LP: #1728681)
* d/p/stagger-launch-1788518.patch: Add option to stagger launch of broker
plugins. (LP: #1788518)
* d/landscape-client.init: Fix init script stop action (LP: #1833137)
-- Simon Poirier <simon.poirier@xxxxxxxxxxxxx> Fri, 28 Jun 2019
12:18:32 -0400
** Changed in: landscape-client (Ubuntu Xenial)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1728681
Title:
postinst script fails if data_path not set in client.conf
Status in Landscape Client:
In Progress
Status in landscape-client package in Ubuntu:
Fix Released
Status in landscape-client source package in Xenial:
Fix Released
Status in landscape-client source package in Bionic:
Fix Released
Status in landscape-client source package in Disco:
Fix Released
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/client.conf
* 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-0ubuntu6.14.04).
If the data_path directive is not present in /etc/landscape/client.conf, the postinst script will fail with the following error:
Setting up landscape-client (14.12-0ubuntu6.14.04) ...
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.
DATA_PATH="`grep ^data_path /etc/landscape/client.conf | cut -d= -f2 | tr -d '[[:space:]]'`"
install --owner=landscape --directory $DATA_PATH
USER_UPDATE_FLAG_FILE="$DATA_PATH/user-update-flag"
install --owner=landscape /dev/null $USER_UPDATE_FLAG_FILE
It would be helpful if the script checked for data_path's existence
and emitted a more informative error message.
How to reproduce:
Install/configure/register landscape-client.
Remove landscape-client
Remove data_path from /etc/landscape/client.conf
Reinstall landscape-client.
To manage notifications about this bug go to:
https://bugs.launchpad.net/landscape-client/+bug/1728681/+subscriptions