Apps in co-located container does not have all interfaces required by spaces

Bug #2029116 reported by Bartosz Woronicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Wishlist
Unassigned

Bug Description

Tested on juju-2.9.44 and juju-3.2.0
installed: 2.9.44 (23558) 98MB classic
installed: 3.2.0 (23190) 80MB -

If we have two applications sharing the same container like historically
designate-bind and memcached
we encounter the issue that if the application first created has less spaces
than the one that will rely upon juju will silently create the unit without complaining

I think that should be checked at least at the bundle validation level

  designate-bind:
    num_units: 3
    to:
    - memcached/0
    - memcached/1
    - memcached/2

Example configuration

  memcached:
    bindings:
      ? ''
      : oam-space
      cache: internal-space
    charm: memcached
    num_units: 2
    options:
      allow-ufw-ip6-softfail: true
    series: jammy
    ...

  designate-bind:
    bindings:
      ? ''
      : oam-space
      certificates: internal-space
      dns-backend: internal-space
      dns-frontend: provided-dns-access-space
    channel: yoga/stable
    charm: designate-bind
    num_units: 2
    options:
      disable-dnssec-validation: true
      forwarders: '"10.169.135.1;10.169.135.2;10.169.135.3"

        '
      recursion: true
      use-internal-endpoints: true
    series: jammy

    ...

description: updated
affects: software-properties (Ubuntu) → juju (Ubuntu)
affects: juju (Ubuntu) → juju
Revision history for this message
Joseph Phillips (manadart) wrote :

As I understand it, these are not subordinates; they are just co-located by placement.

At bundle parsing time, this is hard to validate deterministically, because we haven't yet applied any constraints/bindings to *potential* target machines. Depending on the machines available in the substrate, it might even work circumstantially.

Possible work-arounds are:
- To lay down the designate-bind charm (most-constrained) first and then to place the memcached units (less constrained) on those machines.
- Declare the machines separately using space constraints and target both sets of units to those.

I suspect the bundle is ultimately parsed as designate-bind units having a placement directive, which overrides any selection based on available interfaces.

Changed in juju:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Bartosz Woronicz (mastier1) wrote :

That's correct Joseph. So you presented the 2nd workaround, which really fine.

Yet.I think there should be warning/error while parsing, when you collect from 2 units the spaces
and the unit that will laydown on the same machine as the primary one will have more interfaces it should call exception that it is not a correct setup with proposed solution, either seperate container/machine or applying charm containing more interfaces first.

So maybe that's a core issue, we should also collect interfaces/binding while parsing.

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.