Comment 1 for bug 1676986

Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

I've updated my test.yaml to include machine constraints (note the app requests 7G, the machine specifies 3G). I get machines with 3G. So it seems like "machine" constraints are cool; app constraints not so much:

$ cat test.yaml
services:
  u10:
    charm: cs:xenial/ubuntu
    constraints: "mem=7G"
    num_units: 1
    to:
      - 0
  u20:
    charm: cs:xenial/ubuntu
    constraints: "mem=7G root-disk=16G"
    num_units: 1
    to:
      - 1
machines:
  "0":
    series: "xenial"
    constraints: "mem=3G"
  "1":
    series: "xenial"
    constraints: "mem=3G root-disk=32G"

$ juju run --all 'free -h && df -h | grep sda'
- MachineId: "0"
  Stdout: |2
                  total used free shared buff/cache available
    Mem: 3.5G 179M 2.4G 5.0M 913M 3.0G
    Swap: 0B 0B 0B
    /dev/sda1 9.7G 1.6G 8.1G 17% /
- MachineId: "1"
  Stdout: |2
                  total used free shared buff/cache available
    Mem: 3.5G 203M 2.4G 5.0M 885M 3.0G
    Swap: 0B 0B 0B
    /dev/sda1 31G 1.6G 30G 5% /