Merge ~lucaskanashiro/ubuntu/+source/docker.io:fix-postinst-zfs into ubuntu/+source/docker.io:ubuntu/devel

Proposed by Lucas Kanashiro
Status: Merged
Approved by: Lucas Kanashiro
Approved revision: a22767361ac7096fa8887117652d126ea2369f08
Merged at revision: a22767361ac7096fa8887117652d126ea2369f08
Proposed branch: ~lucaskanashiro/ubuntu/+source/docker.io:fix-postinst-zfs
Merge into: ubuntu/+source/docker.io:ubuntu/devel
Diff against target: 34 lines (+14/-1)
2 files modified
debian/changelog (+9/-0)
debian/docker.io.postinst (+5/-1)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior (community) Approve
Canonical Server Pending
Review via email: mp+395750@code.launchpad.net

Description of the change

Fix LP #1910133. Check if the zfs executable is available before calling it in postinst script.

PPA:

https://launchpad.net/~lucaskanashiro/+archive/ubuntu/containerd-upgrade-issue/+packages

autopkgtest:

autopkgtest [18:22:48]: @@@@@@@@@@@@@@@@@@@@ summary
basic-smoke PASS
docker-in-lxd PASS

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the MP, Lucas. I gave one suggestion to avoid re-indenting everything one more level, so I'm marking this as Needs Fixing. Feel free to adopt it if you like it, or keep things as is :-). In any case, this LGTM and can be uploaded right away.

review: Needs Fixing
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks Sergio, I applied the modification you suggested. Could you please quickly re-check it before I upload it?

I also uploaded the updated version to the PPA I pointed in the MP description.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks, LGTM!

review: Approve
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks! Uploaded:

$ git push pkg upload/19.03.13-0ubuntu6
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 32 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 1.48 KiB | 757.00 KiB/s, done.
Total 9 (delta 6), reused 0 (delta 0)
To ssh://git.launchpad.net/ubuntu/+source/docker.io
 * [new tag] upload/19.03.13-0ubuntu6 -> upload/19.03.13-0ubuntu6
$ dput ubuntu ../docker.io_19.03.13-0ubuntu6_source.changes
Checking signature on .changes
gpg: ../docker.io_19.03.13-0ubuntu6_source.changes: Valid signature from F823A2729883C97C
Checking signature on .dsc
gpg: ../docker.io_19.03.13-0ubuntu6.dsc: Valid signature from F823A2729883C97C
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading docker.io_19.03.13-0ubuntu6.dsc: done.
  Uploading docker.io_19.03.13-0ubuntu6.debian.tar.xz: done.
  Uploading docker.io_19.03.13-0ubuntu6_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 0f1a2c3..d537937 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+docker.io (19.03.13-0ubuntu6) hirsute; urgency=medium
7+
8+ * d/docker.io.postinst: check if zfs exists before calling it (LP: #1910133).
9+ The zfs executable is provided by zfs-fuse | zfsutils and they are
10+ runtime Suggested dependencies, which means they might not be available
11+ during configuration time.
12+
13+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Mon, 04 Jan 2021 17:25:39 -0300
14+
15 docker.io (19.03.13-0ubuntu5) hirsute; urgency=medium
16
17 * d/rules: pass -r instead of --no-stop-on-upgrade to dh_systemd_start.
18diff --git a/debian/docker.io.postinst b/debian/docker.io.postinst
19index 2aa6f77..68149f5 100644
20--- a/debian/docker.io.postinst
21+++ b/debian/docker.io.postinst
22@@ -23,7 +23,11 @@ case "$1" in
23
24 # ZFS handling: create a dedicated ZFS docker dataset to handle all children containers in a single,
25 # persistent, place.
26- if modinfo zfs >/dev/null 2>&1; then
27+ # Also check if zfs executable exists and if it is in $PATH.
28+ # The zfs command is provided by zfs-fuse | zfsutils and they
29+ # are runtime Suggested dependencies which means they are not
30+ # necessarily available during configuration time (LP: #1910133).
31+ if [ -x "$(command -v zfs)" ] && modinfo zfs >/dev/null 2>&1; then
32 # if there is no mountpoint /var/lib/docker:
33 # 1: create <currentpool>/var/lib/docker if doesn’t exist (zfs mount?)
34 # /var/lib with canmount off if doesn’t exist

Subscribers

People subscribed via source and target branches