Skip to content
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

fix(application): allow both placement and constraints together. #499

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

hmlanigan
Copy link
Member

Description

Some constraints and placement details can conflict with each other but not all. Specifying memory size and to use a specific machine doesn't work. Spaces and placement can coexist however.

Let the jujud decide how to resolve conflicts between placement and constraints.

Fixes: #476

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Environment

  • Juju controller version: any

  • Terraform version: any

QA steps

Setup your juju environment as follows:

$ juju add-model machine-placement-constraints
Added 'machine-placement-constraints' model on localhost/localhost with credential 'localhost' for user 'admin'
$ juju add-machine
created machine 0

Run terraform init && terraform plan && terraform apply -auto-approve with the following plan:

provider juju {}

data "juju_model" "test-model" {
  name = "machine-placement-constraints"
}

resource "juju_machine" "ceph-mon-1" {
  model = data.juju_model.test-model.name
  placement = "lxd:0"
  constraints = "mem=10G"
}

Additional notes

https://warthogs.atlassian.net/browse/JUJU-5985

Some constraints and placement details can conflict with each other but
not all. Specifying memory size and to use a specific machine doesn't
work. Spaces and placement can coexist however.

Let the jujud decide how to resolve conflicts between placement and
constraints.
@hmlanigan hmlanigan requested a review from cderici June 6, 2024 19:33
@hmlanigan hmlanigan added this to the 0.13.0 milestone Jun 6, 2024
Copy link
Contributor

@cderici cderici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, qa went well 👍

@hmlanigan hmlanigan merged commit dd6418e into juju:main Jun 7, 2024
25 checks passed
@hmlanigan hmlanigan deleted the bug-476-placement-constraints branch June 7, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

juju_machine should allow both placement and constraints
2 participants