Public bug reported:

I just noticed on my test VM of artful that zfs-import-cache.service
does not have a ConditionPathExists=/etc/zfs/zpool.cache. Because of
that, it fails on startup, since the cache file does not exist.

This line is being deleted by 
debian/patches/ubuntu-load-zfs-unconditionally.patch. This patch seems to exist 
per:
https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1672749

This patch still exists in bionic, so I assume it will be similarly
broken.

If the goal of the patch is to load the module (and only that), I think
it should create a third unit instead:

zfs-load-module.service
 ^^ runs modprobe zfs

zfs-import-cache.service & zfs-import-scan.service
  ^^ per upstream minus modprobe plus Requires=zfs-load-module.service

I have tested this manually and it works. I can submit a package patch
if this is the desired solution.

Interestingly, before this change, zfs-import-scan.service wasn't
starting. If started manually, it worked. I had to give it a `systemctl
enable zfs-import-scan.service` to create the Wants symlinks. Looking at
the zfsutils-linux.postinst, I see the correct boilerplate from
dh_systemd, so I'm not sure why this wasn't already done. Can anyone
confirm or deny whether zfs-import-scan.service is enabled out-of-the-
box on their system?

Is the zfs-import-scan.service not starting actually the cause of the
original bug? The design is that *either* zfs-import-cache.service or
zfs-import-scan.service starts. They both call modprobe zfs.

** Affects: zfs-linux (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  I just noticed on my test VM of artful that zfs-import-cache.service
  does not have a ConditionPathExists=/etc/zfs/zpool.cache. Because of
  that, it fails on startup, since the cache file does not exist.
  
  This line is being deleted by 
debian/patches/ubuntu-load-zfs-unconditionally.patch. This patch seems to exist 
per:
  https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1672749
  
  This patch still exists in bionic, so I assume it will be similarly
  broken.
  
  If the goal of the patch is to load the module (and only that), I think
  it should create a third unit instead:
  
  zfs-load-module.service
-  ^^ runs modprobe-zfs
+  ^^ runs modprobe zfs
  
  zfs-import-cache.service & zfs-import-scan.service
-   ^^ per upstream minus modprobe plus Requires=zfs-load-module.service
+   ^^ per upstream minus modprobe plus Requires=zfs-load-module.service
  
  I have tested this manually and it works. I can submit a package patch
  if this is the desired solution.
  
  Interestingly, zfs-import-scan.service doesn't seem to have run at all.
  If run manually, it works. I had to give it a `systemctl enable zfs-
  import-scan.service` to create the Wants symlinks. Looking at the
  zfsutils-linux.postinst, I see the correct boilerplate from dh_systemd,
  so I'm not sure why this wasn't already done. Can anyone confirm or deny
  whether zfs-import-scan.service is enabled out-of-the-box on their
  system?

** Description changed:

  I just noticed on my test VM of artful that zfs-import-cache.service
  does not have a ConditionPathExists=/etc/zfs/zpool.cache. Because of
  that, it fails on startup, since the cache file does not exist.
  
  This line is being deleted by 
debian/patches/ubuntu-load-zfs-unconditionally.patch. This patch seems to exist 
per:
  https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1672749
  
  This patch still exists in bionic, so I assume it will be similarly
  broken.
  
  If the goal of the patch is to load the module (and only that), I think
  it should create a third unit instead:
  
  zfs-load-module.service
   ^^ runs modprobe zfs
  
  zfs-import-cache.service & zfs-import-scan.service
    ^^ per upstream minus modprobe plus Requires=zfs-load-module.service
  
  I have tested this manually and it works. I can submit a package patch
  if this is the desired solution.
  
- Interestingly, zfs-import-scan.service doesn't seem to have run at all.
- If run manually, it works. I had to give it a `systemctl enable zfs-
- import-scan.service` to create the Wants symlinks. Looking at the
- zfsutils-linux.postinst, I see the correct boilerplate from dh_systemd,
- so I'm not sure why this wasn't already done. Can anyone confirm or deny
- whether zfs-import-scan.service is enabled out-of-the-box on their
- system?
+ Interestingly, before this change, zfs-import-scan.service wasn't
+ starting. If started manually, it worked. I had to give it a `systemctl
+ enable zfs-import-scan.service` to create the Wants symlinks. Looking at
+ the zfsutils-linux.postinst, I see the correct boilerplate from
+ dh_systemd, so I'm not sure why this wasn't already done. Can anyone
+ confirm or deny whether zfs-import-scan.service is enabled out-of-the-
+ box on their system?

** Description changed:

  I just noticed on my test VM of artful that zfs-import-cache.service
  does not have a ConditionPathExists=/etc/zfs/zpool.cache. Because of
  that, it fails on startup, since the cache file does not exist.
  
  This line is being deleted by 
debian/patches/ubuntu-load-zfs-unconditionally.patch. This patch seems to exist 
per:
  https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1672749
  
  This patch still exists in bionic, so I assume it will be similarly
  broken.
  
  If the goal of the patch is to load the module (and only that), I think
  it should create a third unit instead:
  
  zfs-load-module.service
   ^^ runs modprobe zfs
  
  zfs-import-cache.service & zfs-import-scan.service
    ^^ per upstream minus modprobe plus Requires=zfs-load-module.service
  
  I have tested this manually and it works. I can submit a package patch
  if this is the desired solution.
  
  Interestingly, before this change, zfs-import-scan.service wasn't
  starting. If started manually, it worked. I had to give it a `systemctl
  enable zfs-import-scan.service` to create the Wants symlinks. Looking at
  the zfsutils-linux.postinst, I see the correct boilerplate from
  dh_systemd, so I'm not sure why this wasn't already done. Can anyone
  confirm or deny whether zfs-import-scan.service is enabled out-of-the-
  box on their system?
+ 
+ Is the zfs-import-scan.service not starting actually the cause of the
+ original bug? The design is that *either* zfs-import-cache.service or
+ zfs-import-scan.service starts. They both call modprobe zfs.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741081

Title:
  zfs-import-cache.service fails on startup

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1741081/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to