You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Image tag generation not updated when switching from reference to not reference #10402
It looks like something with import is not properly setting the generation of status tags to match their import spec. It should be impossible to have a status tag that is != the spec tag generation after an import is processed.
So as I've looked into this, it looks like there is a race. There's a fairly brief (sub-second) settling time where spec and status tags aren't the same (status updates more slowly). I'm adding a test to images_tests.sh to prove this.
@smarterclayton In the original report you stated "Generation of spec and status tags for wildfly:8.1 should be equal after this, but status tag was not updated."
Are you now telling me that it's not expected that spec and status generations should be exactly the same? Should I only be testing that they have increased after each step? I'm not sure how to parse your response.
As for a race, what I mean is that I wonder if your initial check was due to querying too fast, because I can't reproduce the original issue (unless I pass an invalid tag, in which case an error entry appears and the status generation doesn't get modified).
Are you now telling me that it's not expected that spec and status generations should be exactly the same?
Correct. Users only have the ability to set in spec. Once that is done, the import controller attempts to import the tag and updates spec with the results.
@liggitt Right, but should the import controller be setting the generation for the status to be identical to the spec generation or is it only assured that the status generation has a higher value than the previous one?
The bug is that no import was performed and the status tag was never
updated. There is always lag as the import is performed.
Effectively, within O(seconds) every action should result in an
updated status generation or status condition. In the mentioned case,
no status was ever updated even after controller restart, indicating
that there was a logical error somewhere in the code.
@smarterclayton OK, so I'm thinking this was either a flake or the input data was incorrect (since that will leave an error in status instead of updating the tag).
In either case, this will provide a test for this, so if it is a flake, at least we'll start seeing it show up in CI.
I was able to reproduce it consistently (and on a restart), so it's
not a flake. There are potential for races, but we should have what
we need to figure out this issue as is.
@smarterclayton I can't reproduce it at all and I now have tests to prove it (see #10622 ) so whatever happened, it must have involved a specialized initial condition.
I'm able to consistently reproduce it, but what's important is that you need to do those actions step by step. If all is executed at once there's no bug. Working on a fix...
The problem is with this map which keys are created from a pair: registryURL and repoName. Since in your case both are pointing to the same url and the same name, they are overridden during import. I'll try to make the key more unique.
Activity
smarterclayton commentedon Aug 14, 2016
It looks like something with import is not properly setting the generation of status tags to match their import spec. It should be impossible to have a status tag that is != the spec tag generation after an import is processed.
Add tests for openshift#10402
Add tests for openshift#10402
sgallagher commentedon Aug 25, 2016
So as I've looked into this, it looks like there is a race. There's a fairly brief (sub-second) settling time where spec and status tags aren't the same (status updates more slowly). I'm adding a test to images_tests.sh to prove this.
smarterclayton commentedon Aug 25, 2016
sgallagher commentedon Aug 26, 2016
@smarterclayton In the original report you stated "Generation of spec and status tags for wildfly:8.1 should be equal after this, but status tag was not updated."
Are you now telling me that it's not expected that spec and status generations should be exactly the same? Should I only be testing that they have increased after each step? I'm not sure how to parse your response.
As for a race, what I mean is that I wonder if your initial check was due to querying too fast, because I can't reproduce the original issue (unless I pass an invalid tag, in which case an error entry appears and the status generation doesn't get modified).
liggitt commentedon Aug 26, 2016
Correct. Users only have the ability to set in spec. Once that is done, the import controller attempts to import the tag and updates spec with the results.
sgallagher commentedon Aug 26, 2016
@liggitt Right, but should the import controller be setting the generation for the status to be identical to the spec generation or is it only assured that the status generation has a higher value than the previous one?
liggitt commentedon Aug 26, 2016
That is expected. Once import completes asynchronously, the status tag generation should match the spec tag generation
smarterclayton commentedon Aug 26, 2016
sgallagher commentedon Aug 26, 2016
@smarterclayton OK, so I'm thinking this was either a flake or the input data was incorrect (since that will leave an error in status instead of updating the tag).
In either case, this will provide a test for this, so if it is a flake, at least we'll start seeing it show up in CI.
smarterclayton commentedon Aug 26, 2016
Add tests for openshift#10402
sgallagher commentedon Aug 26, 2016
@smarterclayton I can't reproduce it at all and I now have tests to prove it (see #10622 ) so whatever happened, it must have involved a specialized initial condition.
smarterclayton commentedon Aug 27, 2016
I was able to recreate it locally again.
You may have to delete the wildfly image stream and then run create again (so the importer isn't busy importing other things).
Looks like changing the source so that it points to the same image has some
weird interactions.
smarterclayton commentedon Aug 27, 2016
smarterclayton commentedon Aug 27, 2016
The generation of the status tag for 8.1 should be bumped to 4 (without other things changing).
soltysh commentedon Aug 29, 2016
I'm able to consistently reproduce it, but what's important is that you need to do those actions step by step. If all is executed at once there's no bug. Working on a fix...
soltysh commentedon Aug 29, 2016
The problem is with this map which keys are created from a pair:
registryURLandrepoName. Since in your case both are pointing to the same url and the same name, they are overridden during import. I'll try to make the key more unique.soltysh commentedon Aug 29, 2016
Or rather I'll fix the code responsible for updating the status based on them 😉