Incorrect memory constraints on LXD cluster
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Joseph Phillips |
Bug Description
When deploying with:
juju deploy ubuntu --constraints "mem=4G cores=2"
The container shows:
limits.cpu: "2"
limits.memory: 4096MB
Looking at the documentation, it says that memory contraints are in MiB, so I would have expected this to end up as 4096MiB or 4GiB instead which would then resolve to the right amount of RAM being allocated to the container.
I see logic in Juju which attempts some kind of server version check to select whether the suffix will work or not but it looks like this isn't working since I'm getting the wrong result with LXD 4.8 and Juju 2.8.
»···»···// Ensure that we use the correct "MB"/"MiB" suffix.
»···»···template := "%dMB"
»···»···if current, err := version.
»···»···»···if current.
»···»··
»···»···»···}
»···»···}
»···»··
I also did a bit of archeology and this syntax has been supported since LXD 3.0.2.
So technically, LXD 2.0.x which is still supported as our oldest LTS release is indeed missing support for this, anything else which is currently supported however does have it.
Changed in juju: | |
status: | New → Confirmed |
importance: | Undecided → High |
milestone: | none → 2.8.7 |
Changed in juju: | |
status: | Confirmed → In Progress |
assignee: | nobody → Joseph Phillips (manadart) |
milestone: | 2.8.7 → 2.9-rc3 |
Changed in juju: | |
status: | Fix Committed → Fix Released |
Added a bit of debugging, so far I'm getting:
machine-0: 14:06:58 ERROR juju.container.lxd stgraber: version=4.8
machine-0: 14:06:58 ERROR juju.container.lxd stgraber: error=Invalid version format: ""