leadership settings documents written out without env-uuid field

Bug #1468994 reported by Menno Finlay-Smits
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Menno Finlay-Smits
1.24
Fix Released
Critical
Menno Finlay-Smits

Bug Description

A bare empty map is written to the settings collection by addLeadershipSettingsOp which is unsupported by the multi-env txn layer. This means that the document is written out without the env-uuid field.

The lack of an env-uuid field causes the addEnvUUIDToEntityCollection upgrade helper to do the wrong thing when working on the settings collection, adding a env UUID prefix to _id field when there's already one there.

Fixes:

1. addLeadershipSettingsOp should be updated to using bson.D/M so that the multi-env txn layer can automatically add the env-uuid field.

2. The multi-env txn layer should error out when it sees a document expressed with an unsupported type.

3. the addEnvUUIDToEntityCollection upgrade helper should not attempt to add an env UUID prefix to the _id if it's already there.

summary: - Non-multi-env documents written to settings collection
+ Multi-env unsafe documents written to settings collection
summary: - Multi-env unsafe documents written to settings collection
+ Multi-env unsafe leadership documents written to settings collection
summary: - Multi-env unsafe leadership documents written to settings collection
+ leadership settings documents written out without env-uuid field
description: updated
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

Fix #1 is addressed by PRs 2661 and 2662.

Changed in juju-core:
status: Triaged → In Progress
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

Fix #2 is addressed by PRs 2666 & 2667.

Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

Fix #3 is addressed by PRs 2670 & 2671

Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
importance: Critical → High
Curtis Hovey (sinzui)
Changed in juju-core:
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.