Skip to content

upgrade fails in CI due to different generated release image names with same content #462

Closed

Description

@cgwalters

I tried an upgrade from:

    Completion Time:    2019-02-19T22:16:55Z
    Image:              registry.svc.ci.openshift.org/openshift/origin-release@sha256:73c25681fed7403100a685b57c87acf0645df40075afbb5a436c514176d760bf
    Started Time:       2019-02-19T20:37:24Z
    State:              Partial
    Version:            4.0.0-0.alpha-2019-02-18-164603

to:

    Completion Time:    <nil>
    Image:              registry.svc.ci.openshift.org/openshift/origin-release:4.0.0-0.alpha-2019-02-19-072345
    Started Time:       2019-02-19T22:16:55Z
    State:              Partial
    Version:            4.0.0-0.alpha-2019-02-19-072345

Result:

$ oc get clusterversion
NAME      VERSION                           AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.0.0-0.alpha-2019-02-19-072345   False       True          3h39m   Unable to apply 4.0.0-0.alpha-2019-02-19-072345: the cluster operator machine-config is failing

Because:

$ oc logs -f pods/machine-config-daemon-xs9nm -p                                                                                                                                                                  
I0219 22:25:06.829208   22912 start.go:52] Version: 3.11.0-693-g86a5a55f-dirty                                                                                                                                     ...                                                                                                            
I0219 22:25:06.907763   22912 daemon.go:168] Booted osImageURL: registry.svc.ci.openshift.org/openshift/origin-v4.0-2019-02-18-164603@sha256:660061d6eae3ee6d93ca836cd52e6033f1d611c629c1ce47cf272c9e9bda2488 (47.3
18)                                                                                                                                                                                                               
...                                                                                                                         
I0219 22:26:16.123846   22912 update.go:650] Updating OS to registry.svc.ci.openshift.org/openshift/origin-v4.0-2019-02-19-072345@sha256:660061d6eae3ee6d93ca836cd52e6033f1d611c629c1ce47cf272c9e9bda2488  
...
rpm-ostreed.service: Txn UpdateDeployment on /org/projectatomic/rpmostree1/redhat_coreos_maipo failed: Old and new refs are equal: (null):5ee78f9fcf4296b9542ffc07d0630273d824a1498f924c31692dcfebf4ba6998

Then we end up in a retry loop, finally the MCD dies and degrades the node, causing the upgrade to fail.

I think we should fix this in two ways. First, pivot should detect when the inner ostree commit is the same and no-op.

The other fix is in the MCD; we could detect the case where the pull spec digest is identical and make that also "match".

Activity

  1. runcom commented on Feb 20, 2019

    @runcom
    Member

    Both fixes sound reasonable (second one looks a bit weak though, can someone craft an image with a digest not representing the content and fool the match to think we shouldn't upgrade cause they just match as strings? We drive this but still something that popped up in my mind, which can be totally stupid as well since we do verify content on extraction afaict).

    But again, both sounds good

  2. kikisdeliveryservice commented on Feb 20, 2019

    @kikisdeliveryservice
    Contributor

    I was worried that this would happen, I'm leaning towards the first option.

  3. cgwalters commented on Feb 20, 2019

    @cgwalters
    MemberAuthor

    PR in #463

  4. cgwalters commented on Feb 20, 2019

    @cgwalters
    MemberAuthor

    (second one looks a bit weak though, can someone craft an image with a digest not representing the content and fool the match to think we shouldn't upgrade cause they just match as strings?

    Hmm...to get to that point though you'd need the ability to write to the machine-config-osimageurl configmap which...basically gives you the ability to install arbitrary OS payloads anyways.

  5. cgwalters commented on Feb 20, 2019

    @cgwalters
    MemberAuthor

    First, pivot should detect when the inner ostree commit is the same and no-op.

    This is possible but ugly to implement for a few reasons. One of those is the rest of the MCD code is just not prepared for "osimageurl is different but pivot is a no-op" (and we could make it not a no-op but it really is...)

  6. runcom commented on Feb 20, 2019

    @runcom
    Member

    Hmm...to get to that point though you'd need the ability to write to the machine-config-osimageurl configmap which...basically gives you the ability to install arbitrary OS payloads anyways.

    yeah, it's basically a non-issue cause at that point we're screwed anyway that's why I was wondering...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions