Openstack Magnum - Forbidden: resources[0].resources.kube-master: Only volume-backed servers are allowed for flavors with zero disk. (HTTP 403)

asked 2019-06-28 14:56:46 -0500

Cersen gravatar image

updated 2019-06-29 08:27:37 -0500

Hi,

I have a PoC openstack (stein) setup, based on multi-node RDO packstack installation (with 1 controller, 1 network and 2 compute node). I also use a 1TB lvm based cinder volume (on the controller node) as storage backend to my compute nodes over iscsi.

All of nodes have 72 core, 512GB memory and 60GB SSD disk for CentOS 7 root disk; also the controller has an 1 TB separate LVM based disk which used by cinder service.

Last few days I'm trying to setup magnum to quickly spin up kubernetes clusters. So far it went good and I can create minimal k8s clusters with magnum; however if I wanted to create a multi-node k8s cluster, (lets say 3 master and 3 minion) by using a flavor which has 2vcpu, 4GB memory and 30GB persistent root (/) disk, it fails with the error below:

[Error: No valid host was found. There are not enough hosts available.].

After I inspected the issue, I have realized that the magnum wanted to create the vm's root disks on the compute nodes as an ephemeral disks. But in my case this is impossible since the compute nodes only have 60GB disk. So the VMs can't be scheduled because of there are "really" not enough hosts available.

As a workaround, I created a new flavor with 0GB root disk, in order to force nova to use cinder service (as there are a lot of free space). So any instance that uses this zero root disk flavor should be volume-backed instances because os_compute_api:servers:create:zero_disk_flavor policy is already set in my setup as policy document says that:

Volume-backed instances can be enforced for flavors with zero root disk via the os_compute_api:servers:create:zero_disk_flavor policy rule.

However, when I kick the magnum with this flavor, it throws another error that says:

Forbidden: resources[0].resources.kube-master: Only volume-backed servers are allowed for flavors with zero disk. (HTTP 403)

Well, as far as I understand, magnum insistly wants to create ephemeral disks for instances' root disk which is impossible as the nova policy deny the use of ephemeral disks for zero root disk flavor.

So, is there any way to tell magnum to create cinder volumes as instances' root disks ?

BTW I don't mention --docker-volume-size that creates a cinder volume to use as containers storage. (It already works.)

UPDATE 1:

It seems this feature is not impelemented yet. https://storyboard.openstack.org/#!/s...

edit retag flag offensive close merge delete