Activity log for bug #1735153

Date Who What changed Old value New value Message
2017-11-29 11:02:44 John A Meinel bug added bug
2017-11-29 11:06:00 John A Meinel description The test asserts that after waiting for the leadership to expire, it will then observe that the leasee does not hold the lock anymore. My guess is that while its true that the app/0 has lost the lease, it is possible for it to get reacquired before the assertion is run. The test run here shows the issue: http://qa.jujucharms.com/releases/6015/job/run-unit-tests-race/attempt/3507 state_leader_test.go:116: c.Check(err, gc.ErrorMatches, `"application/0" is not leader of "application"`) ... value = nil ... regex string = "\"application/0\" is not leader of \"application\"" ... Error value is nil state_leader_test.go:117: c.Check(ops2, gc.IsNil) ... value []txn.Op = []txn.Op{txn.Op{C:"leases", Id:"application-leadership#application#", Assert:bson.M{"holder":"application/0"}, Insert:interface {}(nil), Update:interface {}(nil), Remove:false}} The test asserts that after waiting for the leadership to expire, it will then observe that the leasee does not hold the lock anymore. My guess is that while its true that the app/0 has lost the lease, it is possible for it to get reacquired before the assertion is run. The test run here shows the issue: http://qa.jujucharms.com/releases/6015/job/run-unit-tests-race/attempt/3507 state_leader_test.go:116:     c.Check(err, gc.ErrorMatches, `"application/0" is not leader of "application"`) ... value = nil ... regex string = "\"application/0\" is not leader of \"application\"" ... Error value is nil state_leader_test.go:117:     c.Check(ops2, gc.IsNil) ... value []txn.Op = []txn.Op{txn.Op{C:"leases", Id:"application-leadership#application#", Assert:bson.M{"holder":"application/0"}, Insert:interface {}(nil), Update:interface {}(nil), Remove:false}} Note, while this is found by --race, I think that's just an example of it changing the timing of the test. I don't think there is actually a data race, just a false assumption that there isn't anything going on that would renew the leadership. Though, inserting time.Sleep() doesn't seem to be triggering the issue.
2017-11-30 05:07:34 John A Meinel juju: assignee John A Meinel (jameinel) Andrew Wilkins (axwalk)
2017-11-30 08:52:08 Andrew Wilkins juju: status In Progress Fix Committed
2017-11-30 08:52:55 Andrew Wilkins nominated for series juju/trunk
2017-11-30 08:52:55 Andrew Wilkins bug task added juju/trunk
2017-11-30 08:53:12 Andrew Wilkins nominated for series juju/2.3
2017-11-30 08:53:12 Andrew Wilkins bug task added juju/2.3
2017-11-30 08:53:21 Andrew Wilkins bug task deleted juju/trunk
2017-11-30 08:53:28 Andrew Wilkins juju/2.3: assignee Andrew Wilkins (axwalk)
2017-11-30 08:53:30 Andrew Wilkins juju/2.3: milestone 2.3.0
2017-11-30 08:53:36 Andrew Wilkins juju/2.3: importance Undecided High
2017-11-30 08:53:39 Andrew Wilkins juju/2.3: status New Fix Committed
2017-11-30 08:53:44 Andrew Wilkins juju: milestone 2.3.0 2.4-beta1
2017-12-07 20:25:30 Canonical Juju QA Bot juju/2.3: status Fix Committed Fix Released
2018-07-10 22:20:44 Anastasia juju: status Fix Committed Fix Released