one: Failed to deploy containers on ceph storage

Description When I try to import LXD image from LinuxContainers.org marketplace, disk creation to ceph datastore fails.

Wed Feb 27 15:33:20 2019 [Z0][ImM][I]: cp: Copying local image "lxd://https://images.linuxcontainers.org/images/ubuntu/xenial/amd64/default/./20190227_08:06$
Wed Feb 27 15:33:20 2019 [Z0][ImM][E]: cp: Command "    set -e -o pipefail
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]:
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]: FORMAT=$(qemu-img info /var/tmp/b857d240deee8b8b421b172755a19321 | grep "^file format:" | awk '{print $3}' || :)
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]:
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]: if [ "$FORMAT" != "raw" ]; then
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]: qemu-img convert -O raw /var/tmp/b857d240deee8b8b421b172755a19321 /var/tmp/b857d240deee8b8b421b172755a19321.raw
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]: mv /var/tmp/b857d240deee8b8b421b172755a19321.raw /var/tmp/b857d240deee8b8b421b172755a19321
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]: fi
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]:
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]: rbd --id libvirt import --image-format 2 /var/tmp/b857d240deee8b8b421b172755a19321 one/one-597
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]:
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]: # remove original
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]: rm -f /var/tmp/b857d240deee8b8b421b172755a19321" failed: rbd: unable to get size of file/block device
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]: Importing image: 0% complete...failed.
Wed Feb 27 15:33:20 2019 [Z0][ImM][I]: rbd: import failed: (25) Inappropriate ioctl for device
Wed Feb 27 15:33:20 2019 [Z0][ImM][E]: Error registering one/one-597 in r620-4
Wed Feb 27 15:33:20 2019 [Z0][ImM][E]: Error copying image in the datastore: Error registering one/one-597 in r620-4

To Reproduce Setup LXD node and Linuxcontainer marketplace, try to import container to ceph datastore.

Expected behavior Container image is created to ceph datastore

Details

  • Affected Component: Sunstone, Storage
  • Hypervisor: LXD
  • Version: 5.8.0
  • Ubuntu Xenial

Additional context I did install LXD node package to existing KVM node with ceph backend and reimported host with alternative name as LXD node:

echo "deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs)-backports main restricted universe multiverse" >> /etc/apt/sources.list
apt update
apt install lxd=3.0.3-0ubuntu1~16.04.1 liblxc1=3.0.3-0ubuntu1~16.04.1 lxcfs=3.0.3-0ubuntu1~16.04.1 lxd-client=3.0.3-0ubuntu1~16.04.1 -y
apt-get install opennebula-node-lxd rbd-nbd -y

Ceph datastore info:

onedatastore show 101
DATASTORE 101 INFORMATION
ID             : 101
NAME           : cephds
USER           : oneadmin
GROUP          : oneadmin
CLUSTERS       : 0
TYPE           : IMAGE
DS_MAD         : ceph
TM_MAD         : ceph
BASE PATH      : /var/lib/one//datastores/101
DISK_TYPE      : RBD
STATE          : READY

DATASTORE CAPACITY
TOTAL:         : 11.4T
FREE:          : 5.1T
USED:          : 6.3T
LIMIT:         : -

PERMISSIONS
OWNER          : um-
GROUP          : u--
OTHER          : ---

DATASTORE TEMPLATE
ALLOW_ORPHANS="YES"
BRIDGE_LIST="r620-5 r620-4"
CEPH_HOST="192.168.30.71:6789 192.168.30.72:6789 192.168.30.73:6789"
CEPH_SECRET="********"
CEPH_USER="libvirt"
CLONE_TARGET="SELF"
DATASTORE_CAPACITY_CHECK="YES"
DISK_TYPE="RBD"
DRIVER="raw"
DS_MAD="ceph"
LABELS="Ceph,HDD"
LN_TARGET="NONE"
POOL_NAME="one"
RESTRICTED_DIRS="/"
SAFE_DIRS="/var/tmp /tmp /mnt/ceph/appmarket"
TM_MAD="ceph"
TYPE="IMAGE_DS"

Progress Status

  • Branch created
  • Code committed to development branch
  • Testing - QA
  • Documentation
  • Release notes - resolved issues, compatibility, known issues
  • Code committed to upstream release/hotfix branches
  • Documentation committed to upstream release/hotfix branches

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 30 (14 by maintainers)

Most upvoted comments

And we have a boot with 4.15 kernel 😃