Support for MAAS storage binding in bundles

Bug #1691694 reported by Ante Karamatić on 2017-05-18
This bug affects 5 people
Affects Status Importance Assigned to Milestone

Bug Description

Now that bug 1674148 and bug 1677001 are fixed, I've tried using storage binding in the bundle:

series: xenial
    constraints: tags=compute
    zone: az1
    series: xenial
    charm: cs:xenial/ceph-osd
    num_units: 1
      osd-devices: sata,3
      osd-journals: ssd,1
      "": oam-space
      public: oam-space
      cluster: oam-space
      osd-reformat: 'yes'
      source: distro
    - '0'

But this results in error:

ERROR cannot deploy bundle: cannot add unit for application "ceph-osd": adding new machine to host unit "ceph-osd/0": cannot assign unit "ceph-osd/0" to machine 0: "maas" storage provider does not support dynamic storage (not supported)

Whole process:

ubuntu@maas:~$ juju create-storage-pool sata maas tags=rotary
ubuntu@maas:~$ juju create-storage-pool ssd maas tags=ssd
ubuntu@maas:~$ juju deploy storage.yaml
Deploying charm "cs:ceph-osd-241"
ERROR cannot deploy bundle: cannot add unit for application "ceph-osd": adding new machine to host unit "ceph-osd/0": cannot assign unit "ceph-osd/0" to machine 0: "maas" storage provider does not support dynamic storage (not supported)

Andrew Wilkins (axwalk) wrote :

The problem here is that the bundle deployment code splits an application deployment into "juju add-machine" and "juju deploy application --to <machine> --storage foo". Because MAAS storage is "static" (i.e. tied to the machine), this doesn't work.

Bundle deployments should not split apart the operations unless necessary (e.g. the bundle specifies machine placement).

summary: - Support for storage binding in bundles
+ Support for MAAS storage binding in bundles
Changed in juju:
status: New → Triaged
importance: Undecided → High
Tim Penhey (thumper) on 2017-09-13
tags: added: bundles new-york
Tim Penhey (thumper) wrote :

After reading the source, it has become clear that this would probably work if we could avoid having to define the machine in the bundle.

Perhaps move the constraints to the application, and remove the machine block and the to directive on the application. Does that then work?

Dmitrii Shcherbakov (dmitriis) wrote :


Without machine definitions it certainly does work - tested originally this way in a dup:

I can see that v3 vs v4 bundle spec differences are, in part, about having the "machines" section though:
"Version 4 bundles

Version 4 bundles are identical to version 3 bundles except for a few key differences: the branch attribute of the application spec is no longer supported, they may contain a **machine specification**, and their **deployment directives are different** from version 3 bundles."
"Deployment directives

Version 4 deployment directives (the to attribute on the application spec) is a YAML list of items following the format:

is_legacy_bundle = machines is None

We currently use the "machines" section for our large bundles.

It may not be the most elegant way and we might need to think on how to improve large bundle experience in terms of using placement directives (e.g. using "--to 42" isn't the most descriptive directive) but it is a valid format.

Dmitrii Shcherbakov (dmitriis) wrote :

It's old code judging by `git blame` but:

// Migrate parses the old-style bundles.yaml file in bundlesYAML
// and returns a map containing an entry for each bundle
// found in that basket, keyed by the name of the bundle.
// It performs the following changes:


// - when a "to" placement directive refers to machine 0,
// an ***explicit machines section*** is added. Also, convert
// it to a slice.


I think we just need to define what the -next bundle format is going to be. Then we could make it work uniformly for both cases.

I can see that the problem may be harder to solve than it looks:

MAAS (as of this message anyway) doesn't support dynamic node reconfiguration as opposed to public/private cloud scenarios where hot-plugging of storage is possible. So Juju seems to consider storage to be dynamic when the 'machines' section is used triggering:

as opposed to

In terms of assignment this is:




I think this is related to as well. Juju needs to be able to figure out that it should not allocate a clean machine right away if there are principal units that require storage to be allocated. Provider's ability to do dynamic storage should be assessed only when a machine is reused.

To make it generic it shouldn't be the first application's storage bindings but rather a summarized storage requirement if there are no conflicts between the two

      osd-devices: sata,3
      osd-journals: ssd,1
  - 0
      backup-devices: scsi,3
  - 0

Ian Booth (wallyworld) on 2017-10-06
Changed in juju:
milestone: none → 2.3-beta2
Changed in juju:
milestone: 2.3-beta2 → none
Ante Karamatić (ivoks) on 2018-01-10
tags: added: cpe-onsite
Ryan Beisner (1chb1n) on 2018-06-13
tags: added: uosci
Felipe Reyes (freyes) on 2019-01-16
tags: added: sts
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers