Juju vSphere cloud provider needs a constraint for datastore

Bug #1807960 reported by Calvin Hartwell on 2018-12-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Christian Muirhead

Bug Description

Hey all,

When Juju deploys virtual machines on vSphere, it does not provide any way to select the datastore which should be used to provide storage for the virtual machines. By default, it attempts to use the datastore which is available on the ESX hypervisor it is using to run the VM(s).

There are two problems with this approach:

1) Customers generally don't want the VM disks to sit on the local datastore, as this is usually a small disk used for snapshots, ISO images and other misc files.

2) If the VM disks being provisioned are too large, I.E bigger than those provided by the local datastore, it will not work because thin provisioning is not used by default (https://bugs.launchpad.net/juju/+bug/1807957) and the disks are always thick provisioned.

So, we need a way of specifying which datastore should be used when provisioning new VM(s) on vSphere. Usually each hypervisor is exposed or has connectivity to several different datastores.

You will end up hitting out-of-space errors like this one: https://gist.githubusercontent.com/CalvinHartwell/1c19f2956629cbb68840731ccce8bb5c/raw/797ff5f890b0c2cea4d8a3e6cb5a0a435b100292/vmware-out-of-space.log

Machine State DNS Inst id Series AZ Message
0 pending juju-fcc43f-0 bionic poweredOn
1 pending juju-fcc43f-1 bionic poweredOn
2 pending juju-fcc43f-2 bionic poweredOn
3 pending juju-fcc43f-3 bionic poweredOn
3/lxd/0 pending pending bionic
4 down pending bionic Insufficient disk space on datastore ''.
5 down pending bionic Insufficient disk space on datastore ''.
6 down pending bionic Insufficient disk space on datastore ''.
7 down pending bionic Insufficient disk space on datastore ''.
8 down pending bionic Insufficient disk space on datastore ''.
9 pending juju-fcc43f-9 bionic poweredOn
10 down pending bionic Insufficient disk space on datastore ''.
11 down pending bionic Insufficient disk space on datastore ''.

vSphere versions used were: 6.5 and 6.7.


- Calvin

Related issue with the vSphere provider: https://bugs.launchpad.net/juju/+bug/1807953
Related issue with lack of thin provisioning: https://bugs.launchpad.net/juju/+bug/1807957

description: updated
description: updated
description: updated
Changed in juju:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.5.1
Ian Booth (wallyworld) on 2019-01-28
Changed in juju:
milestone: 2.5.1 → 2.5.2
Christian Muirhead (2-xtian) wrote :

Hi Calvin -
There's a model configuration setting "datastore" which will determine which datastore new VMs will use - I've just tested it out and it works. It's not the ideal way of doing this, since you'd need to change the setting between deploying applications or adding units if you want them to be allocated on different stores, but from the bug description it sounds like it would solve your problem?

Changed in juju:
milestone: 2.5.2 → 2.5.3
Changed in juju:
milestone: 2.5.3 → 2.5.4
Christian Muirhead (2-xtian) wrote :

PR for new root-disk-source constraint: https://github.com/juju/juju/pull/9990

Changed in juju:
status: Triaged → In Progress
assignee: nobody → Christian Muirhead (2-xtian)
Changed in juju:
milestone: 2.5.4 → 2.5.5
Christian Muirhead (2-xtian) wrote :

This has landed in the 2.5 branch and will shortly be in the edge snap. You can specify the target datastore using the root-disk-source constraint - the value should be the name of the datastore. For example:
    juju deploy kubernetes-worker --constraints "zones=cluster root-disk-source=datastore-name root-disk=20G"

Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
Changed in juju:
milestone: 2.5.6 → 2.5.7
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers