2015-07-15 00:17:47 |
Horacio DurĂ¡n |
bug |
|
|
added bug |
2015-07-15 00:24:52 |
Menno Finlay-Smits |
juju-core: assignee |
|
Menno Smits (menno.smits) |
|
2015-07-15 00:25:00 |
Menno Finlay-Smits |
nominated for series |
|
juju-core/1.24 |
|
2015-07-15 00:25:00 |
Menno Finlay-Smits |
bug task added |
|
juju-core/1.24 |
|
2015-07-15 00:25:11 |
Menno Finlay-Smits |
summary |
entities status is loosing env-uuid upon setting status. |
entities status is losing env-uuid upon setting status. |
|
2015-07-15 00:25:18 |
Menno Finlay-Smits |
juju-core: importance |
Undecided |
High |
|
2015-07-15 00:25:20 |
Menno Finlay-Smits |
juju-core/1.24: importance |
Undecided |
High |
|
2015-07-15 00:25:22 |
Menno Finlay-Smits |
juju-core/1.24: assignee |
|
Menno Smits (menno.smits) |
|
2015-07-15 00:25:25 |
Menno Finlay-Smits |
juju-core/1.24: milestone |
|
1.24.3 |
|
2015-07-15 00:25:28 |
Menno Finlay-Smits |
juju-core: milestone |
|
1.25.0 |
|
2015-07-15 02:08:33 |
Curtis Hovey |
juju-core/1.24: status |
New |
Triaged |
|
2015-07-15 02:08:36 |
Curtis Hovey |
juju-core: status |
New |
Triaged |
|
2015-07-15 21:51:39 |
Menno Finlay-Smits |
juju-core/1.24: importance |
High |
Critical |
|
2015-07-15 21:51:42 |
Menno Finlay-Smits |
juju-core: importance |
High |
Critical |
|
2015-07-15 21:52:40 |
Menno Finlay-Smits |
summary |
entities status is losing env-uuid upon setting status. |
Document replacements using $set are problematic |
|
2015-07-15 22:17:01 |
Menno Finlay-Smits |
description |
Entities Initial status doc is being created in Service.addUnitOps by a createStatusOp, this generates an Insert operation and, as such, is being automatically updated to include env-uuid.
Subsequent status sets are being done by updateStatusOp which generates an Update operation that does a bson.D{{"$set": doc }} and since:
1) Update operation is not being automatically patched for envuuid
2) This replaces the doc with a new one.
Envuuid is lost
There is a fix for this in http://reviews.vapour.ws/r/2148/ as part of a refactoring of status history. |
Original report:
Entities Initial status doc is being created in Service.addUnitOps by a createStatusOp, this generates an Insert operation and, as such, is being automatically updated to include env-uuid.
Subsequent status sets are being done by updateStatusOp which generates an Update operation that does a bson.D{{"$set": doc }} and since:
1) Update operation is not being automatically patched for envuuid
2) This replaces the doc with a new one.
Envuuid is lost
There is a fix for this in http://reviews.vapour.ws/r/2148/ as part of a refactoring of status history.
The scope has been extended on finding other areas that also have this issue:
Apart from statusesC there are other collections where Juju does document replacement using $set. Found so far:stateServingInfoC, constraintsC, settings.
This is a problem for two reasons:
1. for multi-env collections the env-uuid field doesn't get populated (as per the original report)
2. mgo/txn's fields (e.g. txn-queue and txn-revno) get wiped out which can cause the transaction system to misbehave and could also break watcher functionality. See the last paragraph here for more details: http://stackoverflow.com/a/24458293/195383
Things to fix:
1. Update the Juju txn layer to block attempt to replace documents using $set. A $set update must be either a bson.D or a bson.M, not a struct.
2. Fix cases which do document replacement to do per-field updates instead.
3. Implemented DB migrations which fill in empty "env-uuid" fields in affected collections. |
|
2015-07-17 01:02:03 |
Menno Finlay-Smits |
summary |
Document replacements using $set are problematic |
Document replacements using $set may wipe out the env-uuid field |
|
2015-07-17 01:05:37 |
Menno Finlay-Smits |
description |
Original report:
Entities Initial status doc is being created in Service.addUnitOps by a createStatusOp, this generates an Insert operation and, as such, is being automatically updated to include env-uuid.
Subsequent status sets are being done by updateStatusOp which generates an Update operation that does a bson.D{{"$set": doc }} and since:
1) Update operation is not being automatically patched for envuuid
2) This replaces the doc with a new one.
Envuuid is lost
There is a fix for this in http://reviews.vapour.ws/r/2148/ as part of a refactoring of status history.
The scope has been extended on finding other areas that also have this issue:
Apart from statusesC there are other collections where Juju does document replacement using $set. Found so far:stateServingInfoC, constraintsC, settings.
This is a problem for two reasons:
1. for multi-env collections the env-uuid field doesn't get populated (as per the original report)
2. mgo/txn's fields (e.g. txn-queue and txn-revno) get wiped out which can cause the transaction system to misbehave and could also break watcher functionality. See the last paragraph here for more details: http://stackoverflow.com/a/24458293/195383
Things to fix:
1. Update the Juju txn layer to block attempt to replace documents using $set. A $set update must be either a bson.D or a bson.M, not a struct.
2. Fix cases which do document replacement to do per-field updates instead.
3. Implemented DB migrations which fill in empty "env-uuid" fields in affected collections. |
Entities Initial status doc is being created in Service.addUnitOps by a createStatusOp, this generates an Insert operation and, as such, is being automatically updated to include env-uuid.
Subsequent status sets are being done by updateStatusOp which generates an Update operation that does a bson.D{{"$set": doc }} and since:
1) Update operation is not being automatically patched for envuuid
2) This replaces the doc with a new one.
Envuuid is lost
There is a fix for this in http://reviews.vapour.ws/r/2148/ as part of a refactoring of status history.
The scope has been extended on finding other areas that also have this issue:
Apart from statusesC there are other multi-env collections where Juju does document replacement using $set. Found so far: constraints, settings.
Things to fix:
1. Update the Juju txn layer to handle these updates so that the env-uuid gets set correctly.
2. Reverse the band-aid fixes that have been put in place to work around this issue for statuses and elsewhere.
3. Implemented DB migrations which fill in empty "env-uuid" fields in affected collections. |
|
2015-07-17 01:08:34 |
Menno Finlay-Smits |
description |
Entities Initial status doc is being created in Service.addUnitOps by a createStatusOp, this generates an Insert operation and, as such, is being automatically updated to include env-uuid.
Subsequent status sets are being done by updateStatusOp which generates an Update operation that does a bson.D{{"$set": doc }} and since:
1) Update operation is not being automatically patched for envuuid
2) This replaces the doc with a new one.
Envuuid is lost
There is a fix for this in http://reviews.vapour.ws/r/2148/ as part of a refactoring of status history.
The scope has been extended on finding other areas that also have this issue:
Apart from statusesC there are other multi-env collections where Juju does document replacement using $set. Found so far: constraints, settings.
Things to fix:
1. Update the Juju txn layer to handle these updates so that the env-uuid gets set correctly.
2. Reverse the band-aid fixes that have been put in place to work around this issue for statuses and elsewhere.
3. Implemented DB migrations which fill in empty "env-uuid" fields in affected collections. |
Entities Initial status doc is being created in Service.addUnitOps by a createStatusOp, this generates an Insert operation and, as such, is being automatically updated to include env-uuid.
Subsequent status sets are being done by updateStatusOp which generates an Update operation that does a bson.D{{"$set": doc }} and since:
1) Update operation is not being automatically patched for envuuid
2) This replaces the doc with a new one.
Envuuid is lost
There is a fix for this in http://reviews.vapour.ws/r/2148/ as part of a refactoring of status history.
The scope has been extended on finding other areas that also have this issue:
Apart from statusesC there are other multi-env collections where Juju does document replacement using $set. Found so far: constraints, settings.
Things to fix:
0. Figure out why the multi-env txn layer appears to be finding documents despite the blank env-uuid fields. This smells like a bug.
1. Update the Juju txn layer to handle these updates so that the env-uuid gets set correctly.
2. Reverse the band-aid fixes that have been put in place to work around this issue for statuses and elsewhere.
3. Implemented DB migrations which fill in empty "env-uuid" fields in affected collections. |
|
2015-07-17 01:11:19 |
Menno Finlay-Smits |
summary |
Document replacements using $set may wipe out the env-uuid field |
$set updates may clear out the env-uuid field |
|
2015-07-19 22:50:15 |
Menno Finlay-Smits |
juju-core/1.24: status |
Triaged |
In Progress |
|
2015-07-19 22:50:17 |
Menno Finlay-Smits |
juju-core/1.24: importance |
Critical |
High |
|
2015-07-19 22:50:19 |
Menno Finlay-Smits |
juju-core: importance |
Critical |
High |
|
2015-07-20 14:34:31 |
Martin Packman |
juju-core/1.24: status |
In Progress |
Fix Committed |
|
2015-07-20 18:30:33 |
Curtis Hovey |
juju-core/1.24: status |
Fix Committed |
Fix Released |
|
2015-07-21 21:13:33 |
Menno Finlay-Smits |
juju-core: status |
Triaged |
In Progress |
|
2015-07-24 04:42:07 |
Menno Finlay-Smits |
juju-core: status |
In Progress |
Fix Committed |
|
2015-08-05 13:15:32 |
Curtis Hovey |
juju-core: status |
Fix Committed |
Fix Released |
|