diff-bundle generates 2,000 lines of diffs even with an exported bundle

Bug #1989393 reported by Nobuto Murata
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

$ juju version
2.9.34-ubuntu-amd64

How to reproduce:

$ juju export-bundle > exported.yaml

$ juju diff-bundle ./exported.yaml | wc -l
2170

The bundle is just exported from the model so there should be no diff. The 2,000 lines make it hard to review the diff and obscure the actual and important diff.

Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :
Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.9.35
status: New → Triaged
importance: Undecided → High
Changed in juju:
milestone: 2.9.35 → 2.9.36
Changed in juju:
milestone: 2.9.36 → 2.9.37
Changed in juju:
milestone: 2.9.37 → 2.9.38
Changed in juju:
milestone: 2.9.38 → 2.9.39
Revision history for this message
Juan M. Tirado (tiradojm) wrote :

Could we confirm this is still hitting in 2.9.38?

Revision history for this message
John A Meinel (jameinel) wrote :

It may be that there is an issue with default values for config attributes. Taking a few examples:

applications:
  barbican:
    options:
      action-managed-upgrade:
        bundle: null
        model: false

That says that the bundle does not define the 'action-managed-upgrade' value, but the model does have a value for it, and that value is 'false'.

Similarly for:
      max-allowed-request-size:
        bundle: null
        model: 25000

max-allowed-request-size is 25,000 in the model, but there is no value in the bundle.

My guess is that the model values are from defaults in the charm. But it does seem like 'diff-bundle' should be taking that sort of thing into account. Either export-bundle should be including the current values, or diff-bundle should be understanding default values.

Revision history for this message
Nobuto Murata (nobuto) wrote :

> My guess is that the model values are from defaults in the charm. But it does seem like 'diff-bundle' should be taking that sort of thing into account. Either export-bundle should be including the current values, or diff-bundle should be understanding default values.

You are right. Most of the diff can be explained by that except for some relation stuff.

`juju export-bundle` already has --include-charm-defaults option so that could be used to mitigate the lines of diff, but diff-bundle could take advantage of source=default information in the model.

[juju config barbican]
====
settings:
  action-managed-upgrade:
    default: false
    description: |
    ...
    source: default
    type: boolean
    value: false
====

Revision history for this message
Nobuto Murata (nobuto) wrote :

$ juju export-bundle > exported.yaml
$ juju diff-bundle ./exported.yaml | wc -l
2187

$ juju export-bundle --include-charm-defaults > exported_with_defaults.yaml
$ juju diff-bundle ./exported_with_defaults.yaml | tee diff_with_defaults.txt | wc -l
659

It's better with --include-charm-defaults. But there are some like:

====
applications:
  barbican:
    options:
      hmac-key-length:
        bundle: 32
        model: 32
====
-> value is the same but maybe the types are different (int vs string?)

and unnecessary diff in relations:

  - - barbican-mysql-router:shared-db
    - barbican:shared-db

vs

  - - barbican:shared-db
    - barbican-mysql-router:shared-db

Changed in juju:
milestone: 2.9.39 → 2.9.40
Changed in juju:
milestone: 2.9.40 → 2.9.41
Changed in juju:
milestone: 2.9.41 → 2.9.42
Changed in juju:
milestone: 2.9.42 → 2.9.43
Revision history for this message
Trent Lloyd (lathiat) wrote :

Confirmed this still happens in 3.1.1, also this may be a duplicate of Bug #1842363

We frequently want to use diff-bundle in Support and always run into this issue. It would be great if we could prioritise a fix for this.

Changed in juju:
milestone: 2.9.43 → 2.9.44
Changed in juju:
milestone: 2.9.44 → 2.9.45
Changed in juju:
milestone: 2.9.45 → 2.9.46
Revision history for this message
Ian Booth (wallyworld) wrote :

The next 2.9.46 candidate release will not include a fix for this bug and we don't plan on any more 2.9 releases. As such it is being removed from its 2.9 milestone.

If the bug is still important to you, let us know and we can consider it for inclusion on a 3.x milestone.

tags: added: bundles community-feedback
Changed in juju:
milestone: 2.9.46 → none
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.