juju deploy without constraints can render an unusable unit

Bug #1943503 reported by Felipe Reyes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Joseph Phillips

Bug Description

When deploying a new application without the correct constraints juju will end up deploying an application with bindings to a machine that won't have the necessary NICs. This was observed using juju 2.14 and openstack provider.

Test Case:

juju add-model test
juju add-space main 10.0.0.0/24
juju add-space external 10.10.0.0/24

# nagios-a will be allocated to a machine with a single NIC
juju deploy --bind 'main public=external' cs:nagios nagios-a

# nagios-b will be allocated to a machine with 2 NICs as requested by the constraint
juju deploy --bind 'main public=external' --constraints "spaces=main,external" cs:nagios nagios-b

Here it's the output of my terminal when testing this use case:
https://pastebin.ubuntu.com/p/ww6x5bwzWf/

The expected behavior is that juju errors out when it finds that bindings to spaces that the machine doesn't have a ethernet device on OR when --constraints is not passed use the spaces binded for the application.

Felipe Reyes (freyes)
summary: - juju deploy without constraints can render an usable unit
+ juju deploy without constraints can render an unusable unit
Revision history for this message
Juan M. Tirado (tiradojm) wrote :

Juju deployments are optimistic by default. There are no plans to change that at this moment. I add this to the wishlist.

Changed in juju:
importance: Undecided → Wishlist
Harry Pidcock (hpidcock)
Changed in juju:
status: New → Triaged
Revision history for this message
John A Meinel (jameinel) wrote :

We have always held the position that deploy with bindings should imply constraints on the machines for that application. If we are failing to pass those through, it should be considered a regression.

Presumably with 2.14 you mean 2.9.14, can you confirm if you see this behavior with 2.8?

Changed in juju:
importance: Wishlist → High
milestone: none → 2.9-next
Revision history for this message
Felipe Reyes (freyes) wrote : Re: [Bug 1943503] Re: juju deploy without constraints can render an unusable unit

On Tue, 2021-09-14 at 21:44 +0000, John A Meinel wrote:
> We have always held the position that deploy with bindings should
> imply
> constraints on the machines for that application. If we are failing
> to
> pass those through, it should be considered a regression.
>
> Presumably with 2.14 you mean 2.9.14, can you confirm if you see this
> behavior with 2.8?

yes, 2.9.14. I will try 2.8 and follow up.

Revision history for this message
Felipe Reyes (freyes) wrote :

On Tue, 2021-09-14 at 21:44 +0000, John A Meinel wrote:
> can you confirm if you see this behavior with 2.8?

When using 2.8.11 the behavior is the same ->
https://pastebin.ubuntu.com/p/djnv4FD55f/

Changed in juju:
status: Triaged → In Progress
assignee: nobody → Joseph Phillips (manadart)
milestone: 2.9-next → 2.9.17
Revision history for this message
Joseph Phillips (manadart) wrote :
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.