Leadership check not enforced server-side for SetPodSpec

Bug #1863155 reported by Achilleas Anagnostopoulos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Achilleas Anagnostopoulos
2.7
Won't Fix
Medium
Unassigned

Bug Description

It seems like we only perform leadership checks for the SetPodSpec call in the client (https://github.com/juju/juju/blob/develop/worker/uniter/runner/context/context.go#L1107-L1114) but not on the server (https://github.com/juju/juju/blob/600eeb75f314e2bd6f1313f1050c28ab815fa98d/state/podspec.go#L26).

Besides the fact that the client should never be trusted, the missing check can potentially allow a unit that loses leadership _while invoking_ the SetPodSpec call to overwrite the PodSpec.

The ongoing uniter refactoring work on the develop branch will address this issue but we should probably also fix it on the 2.7 branch (and perhaps back-port to 2.6?).

Changed in juju:
milestone: none → 2.8-beta1
status: New → In Progress
assignee: nobody → Achilleas Anagnostopoulos (achilleasa)
importance: Undecided → Medium
Revision history for this message
Achilleas Anagnostopoulos (achilleasa) wrote :

PR https://github.com/juju/juju/pull/11255 includes a fix for the develop branch

Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Harry Pidcock (hpidcock)
Changed in juju:
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.