Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs backed lxd fails with missing /dev/zfs #2762

Closed
ubuntu-server-builder opened this issue May 10, 2023 · 3 comments
Closed

zfs backed lxd fails with missing /dev/zfs #2762

ubuntu-server-builder opened this issue May 10, 2023 · 3 comments
Labels
launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1643020

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = 2016-11-23T20:23:50.205546+00:00
date_created = 2016-11-18T17:36:46.217595+00:00
date_fix_committed = None
date_fix_released = None
id = 1643020
importance = undecided
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1643020
milestone = None
owner = powersj
owner_name = Joshua Powers
private = False
status = invalid
submitter = powersj
submitter_name = Joshua Powers
tags = []
duplicates = []

Launchpad user Joshua Powers(powersj) wrote on 2016-11-18T17:36:46.217595+00:00

[description]
While using a 16.04 (Xenial) lxd cloud image, trying to setup lxd backed by zfs fails to create due to a missing /dev/zfs

[cloud-config]
#cloud-config
lxd:
init:
storage_backend: zfs
storage_pool: lxd

[steps to reproduce]
Image used: b9cba741ef62 ubuntu 16.04 LTS amd64 (release) (20161115)

lxc init ubuntu:xenial/amd64 xenial
lxc config set xenial user.user-data - < cloud-config.yaml
lxc start xenial

[actual result]
Nov 18 17:27:42 xenial-lxd [CLOUDINIT] util.py[DEBUG]: Running module lxd (<module 'cloudinit.config.cc_lxd' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_lxd.py'>) failed#012Traceback (most recent call last):#12 File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 785, in _run_modules#012 freq=freq)#12 File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 70, in run#012 return self._runners.run(name, functor, args, freq, clear_on_fail)#12 File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 199, in run#012 results = functor(*args)#12 File "/usr/lib/python3/dist-packages/cloudinit/config/cc_lxd.py", line 104, in handle#012 util.subp(cmd)#12 File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1832, in subp#012 cmd=args)#012cloudinit.util.ProcessExecutionError: Unexpected error while running command.#012Command: ['lxd', 'init', '--auto', '--storage-backend=zfs', '--storage-pool=lxd']#012Exit code: 1#012Reason: -#012Stdout: ''#012Stderr: 'error: Invalid ZFS pool: /dev/zfs and /proc/self/mounts are required.\n'

root@xenial-lxd:# ls /dev/zfs
ls: cannot access '/dev/zfs': No such file or directory
root@xenial-lxd:
# ls /proc/self/mounts
/proc/self/mounts

[expected result]
I would have expected zfs to be setup with a pool named 'lxd' and cloud-init to complete successfully.

@ubuntu-server-builder ubuntu-server-builder added the launchpad Migrated from Launchpad label May 10, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Joshua Powers(powersj) wrote on 2016-11-18T17:36:46.217595+00:00

Launchpad attachments: cloud-init.log

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Joshua Powers(powersj) wrote on 2016-11-18T17:44:20.241583+00:00

cloud-init: 0.7.8-1-g3705bb5-0ubuntu1~16.04.3

Is zfs even possible in a container? If that is not the case, then we should close this as user error.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Joshua Powers(powersj) wrote on 2016-11-23T20:23:43.656790+00:00

After attempting this on a KVM instance I was able to get past the error. Ran into other issues, but can confirm that the Xenial LXD container was unable to successfully create zfs due to the lack of /dev/zfs.

Therefore this test of LXD ZFS backends will need to be done in KVM.

Closing as invalid.

@ubuntu-server-builder ubuntu-server-builder closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant