Cross Model Relations not supported in bundles

Bug #1817775 reported by Drew Freiberger on 2019-02-26
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
juju
High
Unassigned

Bug Description

Cross model relations breaks reusable bundle usage of export-bundle

When I have cross-model relations reported as the following in juju 2.5.1 'juju status --relations':

SAAS Status Store URL
filebeat-controller active maas admin/controller.filebeat-controller
nrpe-controller active maas admin/controller.nrpe-controller
telegraf-controller active maas admin/controller.telegraf-controller

With local applications graylog, nagios, and prometheus, these are the cross model relations that are exported in juju export-bundle:

- - nagios:monitors
  - nrpe-controller:monitors
- - graylog:beats
  - filebeat-controller:logstash
- - prometheus:target
  - telegraf-controller:prometheus-client

However, upon running 'juju deploy ./bundle.yaml' with no changes, I get the errors:

ERROR cannot deploy bundle: the provided bundle has the following errors:
relation ["graylog:beats" "filebeat-controller:logstash"] refers to application "filebeat-controller" not defined in this bundle
relation ["prometheus:target" "telegraf-controller:prometheus-client"] refers to application "telegraf-controller" not defined in this bundle
relation ["landscape-client" "gnocchi"] is defined more than once

If I comment out these relations, 'juju deploy ./commented-bundle.yaml' does not remove the cross-model relations.

bundles are additive, so removing items from them won't remove those items
from your deployment. That behavior is expected. However, export-bundle
should definitely not generate a bundle that 'deploy' thinks is broken.
Traditionally bundles had to be self contained and define all applications
involved. Cross model changes that and you're referring to applications
that aren't available here.

On Tue, Feb 26, 2019, 19:50 Drew Freiberger <email address hidden>
wrote:

> Public bug reported:
>
> Cross model relations breaks reusable bundle usage of export-bundle
>
> When I have cross-model relations reported as the following in juju
> 2.5.1 'juju status --relations':
>
> SAAS Status Store URL
> filebeat-controller active maas
> admin/controller.filebeat-controller
> nrpe-controller active maas
> admin/controller.nrpe-controller
> telegraf-controller active maas
> admin/controller.telegraf-controller
>
> With local applications graylog, nagios, and prometheus, these are the
> cross model relations that are exported in juju export-bundle:
>
> - - nagios:monitors
> - nrpe-controller:monitors
> - - graylog:beats
> - filebeat-controller:logstash
> - - prometheus:target
> - telegraf-controller:prometheus-client
>
> However, upon running 'juju deploy ./bundle.yaml' with no changes, I get
> the errors:
>
>
> ERROR cannot deploy bundle: the provided bundle has the following errors:
> relation ["graylog:beats" "filebeat-controller:logstash"] refers to
> application "filebeat-controller" not defined in this bundle
> relation ["prometheus:target" "telegraf-controller:prometheus-client"]
> refers to application "telegraf-controller" not defined in this bundle
> relation ["landscape-client" "gnocchi"] is defined more than once
>
>
> If I comment out these relations, 'juju deploy ./commented-bundle.yaml'
> does not remove the cross-model relations.
>
> ** Affects: juju
> Importance: Undecided
> Status: New
>
>
> ** Tags: canonical-bootstack
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1817775
>
> Title:
> Cross Model Relations export-bundle deploy breaks with "application
> $remote_offer not defined in this bundle"
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1817775/+subscriptions
>

Tim Penhey (thumper) wrote :

Bundles do not currently support cross model relations.

We need to work out what it really means on both the offer and consume side to define the relations in the bundles.

Changed in juju:
status: New → Triaged
importance: Undecided → High
summary: - Cross Model Relations export-bundle deploy breaks with "application
- $remote_offer not defined in this bundle"
+ Cross Model Relations not supported in bundles
tags: added: bundles
Tim Penhey (thumper) wrote :

Actually, any use cases you can contribute would help immensely.

Xav Paice (xavpaice) wrote :

Use case:

Model A - runs an application (openstack in this case). Part of that is a monitoring platform Nagios.
Controller model - runs controllers.

We need to monitor the state of the controllers, so we add charms to the controller model that eventually adds an nrpe subordinate, for monitoring. We link that to the Nagios application running in Model A, using a cross model relation.

We then make a change to Model A, and a clear workflow is to commit the bundle to a git repo and apply the new bundle to the running model. We can't do that at this point in time.

Marian Gasparovic (marosg) wrote :

We have CMR requirement from the field, to have logging, monitoring and alerting in a separate model for multiple k8s clusters. I cannot find any information about offer in bundles so I assume this is still not possible. Any details about the progress?

This is upcoming in the 2.7 release of Juju. We can demonstrate it with the
edge snap with a scheduled release of October for the 19.10 cycle. It's
feature complete there, but not yet released in a stable Juju release.

On Sun, Sep 1, 2019 at 12:35 PM Marian Gasparovic <
<email address hidden>> wrote:

> We have CMR requirement from the field, to have logging, monitoring and
> alerting in a separate model for multiple k8s clusters. I cannot find
> any information about offer in bundles so I assume this is still not
> possible. Any details about the progress?
>
> --
> You received this bug notification because you are subscribed to juju.
> https://bugs.launchpad.net/bugs/1817775
>
> Title:
> Cross Model Relations not supported in bundles
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1817775/+subscriptions
>

Marian Gasparovic (marosg) wrote :

@rharding thank you for update. Will also juju export-bundle support CMR from the start?

Richard Harding (rharding) wrote :

Yes, so when you dump a bundle you'll get output that contains CMR specific
bits as well. You can see a really good idea of this from the PR in 2.7
here:

https://github.com/juju/juju/pull/10460

On Tue, Sep 3, 2019 at 3:50 AM Marian Gasparovic <
<email address hidden>> wrote:

> @rharding thank you for update. Will also juju export-bundle support CMR
> from the start?
>
> --
> You received this bug notification because you are subscribed to juju.
> https://bugs.launchpad.net/bugs/1817775
>
> Title:
> Cross Model Relations not supported in bundles
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1817775/+subscriptions
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers