serving-operator icon indicating copy to clipboard operation
serving-operator copied to clipboard

Operator should fail if attempting to upgrade knative from N to N+2 or greater

Open trshafer opened this issue 6 years ago • 11 comments

When the user upgrades the operator, the operator should evaluate the current version of knative and if the operator is unable to update the version one at a time, then the operator should fail the upgrade.

trshafer avatar Jun 05 '19 22:06 trshafer

Interesting question - how does one know what version of knative is currently installed? AFAIK we don't have anything from serving that says this

greghaynes avatar Jun 11 '19 16:06 greghaynes

There is actually an annotation in all the yaml files which gets snapped with the release version.

On Tue, Jun 11, 2019 at 9:04 AM Gregory Haynes [email protected] wrote:

Interesting question - how does one know what version of knative is currently installed? AFAIK we don't have anything from serving that says this

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/knative/serving-operator/issues/3?email_source=notifications&email_token=AB4XENZNHX6JYJSPKKOMYB3PZ7EJRA5CNFSM4HUMQVY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXNUS5Y#issuecomment-500910455, or mute the thread https://github.com/notifications/unsubscribe-auth/AB4XEN4UNG3JCGGRHHRKNWLPZ7EJRANCNFSM4HUMQVYQ .

-- Evan Anderson [email protected]

evankanderson avatar Jun 11 '19 17:06 evankanderson

There is a label in all the resources, e.g. https://github.com/openshift-knative/knative-serving-operator/blob/v0.6.0/deploy/resources/knative-serving-0.6.0.yaml#L6 But because it was set to "devel" in the 0.5.2 manifest, we used this instead: https://github.com/openshift-knative/knative-serving-operator/blob/master/version/version.go#L1 The operator set KnativeServing.Status.Version to the value in the second file after applying the first file. So whenever upstream cut a new release, we'd update both files.

jcrossley3 avatar Jun 11 '19 18:06 jcrossley3

Possibly relevant: https://groups.google.com/d/msg/operator-framework/NkC43XyMqWc/iV4NeO0ZBQAJ

jcrossley3 avatar Jun 12 '19 16:06 jcrossley3

/assign cynocracy

trshafer avatar Jan 27 '20 23:01 trshafer

I'm curious why we want to fail an upgrade to N+2 or greater. What's the harm in doing so? Just trying to be clear about the justification for this issue.

jcrossley3 avatar Apr 14 '20 20:04 jcrossley3

Personally, I don't think we should fail, but rather follow an upgrade path that's been tested.

I don't think we should allow customers using the Operator to take upgrade paths that are untested and thus potentially unsafe.

Cynocracy avatar Apr 15 '20 00:04 Cynocracy

It was inspired from the 0.6 -> 0.9 (I think) upgrade. It was a migration from clusterroute to route IIRF. Users needed to migrate from 0.6 -> 0.7 or 0.8 before going to 0.9.

trshafer avatar Apr 15 '20 18:04 trshafer

I'd like to be able to say something like this: for any version X of the operator, we'll support upgrades from the last N releases of the operand. I think serving mandates N=4 (where is that doc'd, btw?) but that would mean the 0.9 operator would've needed to be able to update a 0.6 operand to 0.8 before installing 0.9. Is that reasonable?

jcrossley3 avatar Apr 15 '20 21:04 jcrossley3

0.6->.8 and then .9 is probably fine. or if jumping from 0.6 -> 0.12 then have 0.6 -> 0.8 -> 0.10 -> 0.12.

trshafer avatar Apr 16 '20 18:04 trshafer

fwiw: jumps by two are tested nowhere. Serving only tests upgrading from N-1.

markusthoemmes avatar Apr 16 '20 18:04 markusthoemmes