-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
juju_machine should allow both placement and constraints #476
Comments
In your example juju will attempt to use those spaces for the container if they are available on the host machine, however will continue if not and use the spaces available to the host machine as a fallback. For spaces, juju does not treat space constraints exactly the same as when creating a machine. The example below is a bit more straight forward: resource "juju_machine" "ceph-mon-1" {
model = juju_model.cpe-focal.name
placement = join(":",["lxd",juju_machine.all_machines["101"].machine_id])
constraints = "mem=10G"
} |
If I don't add any constraints, then the lxd fails to deploy, and get the following from "7/lxd/0": {
"juju-status": {
"current": "down",
"message": "agent is not communicating with the server",
"since": "02 May 2024 20:19:34+01:00"
},
"instance-id": "pending",
"machine-status": {
"current": "provisioning error",
"message": "no obvious space for container \"7/lxd/0\", host machine has spaces: \"admin\", \"ceph-access\", \"ceph-replica\", \"external\", \"internal\", \"oam\", \"overlay\"",
"since": "02 May 2024 20:19:34+01:00"
},
"modification-status": {
"current": "idle",
"since": "02 May 2024 19:59:35+01:00"
},
"series": "focal"
}, adding the constraint causes the original issue |
Even with resource "juju_machine" "ceph-mon-1" {
model = juju_model.cpe-focal.name
placement = join(":",["lxd",juju_machine.all_machines["101"].machine_id])
# constraints = "spaces=oam,ceph-access,ceph-replica"
constraints = "mem=10G"
}
|
I removed the line, compiled the provider, and used it locally, and now for me it works as expected. I have managed to deploy lxd/kvm machines successfully and attach them to applications similar to what I was originally expecting |
@arif-ali sounds like the placement conflicts can be relaxed, can you open a PR with your change and qa steps so we can take a closer look at it? Thanks! |
Sorry that's my mistake, I didn't realize @hmlanigan was on this, you may safely ignore my message 👍 |
Description
Following the PR #378 of the placement addition in 0.11.0, and came to test this today, but have come to another issue. We should be able to appliy a constraint and a placement, but the provider does not allow us to do this
Urgency
Blocker for our release
Terraform Juju Provider version
0.12.0
Terraform version
1.8.2
Terraform Configuration(s)
Reproduce / Test
Notes & References
n/a
The text was updated successfully, but these errors were encountered: