Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BZ 1370045: Fix pushing to GCS storage #10640

Merged
merged 1 commit into from
Aug 26, 2016
Merged

Conversation

mfojtik
Copy link
Contributor

@mfojtik mfojtik commented Aug 25, 2016

No description provided.

@mfojtik
Copy link
Contributor Author

mfojtik commented Aug 25, 2016

[test]

@smarterclayton review pls.
@legionus || @miminar check :)

@smarterclayton
Copy link
Contributor

Only manual testing here?

@mfojtik
Copy link
Contributor Author

mfojtik commented Aug 25, 2016

@smarterclayton my first initial test failed :/ (still the same issue)

@mfojtik
Copy link
Contributor Author

mfojtik commented Aug 25, 2016

@smarterclayton I tried to apply the second fix (distribution/distribution#1703) and still no luck, getting "upload resumed at wrong offest: 508 != 254".

@mfojtik
Copy link
Contributor Author

mfojtik commented Aug 25, 2016

@smarterclayton ok, with the second fix I'm only getting err.code="blob upload invalid" err.message="blob upload invalid" and I don't see the offset anymore...

@mfojtik
Copy link
Contributor Author

mfojtik commented Aug 25, 2016

@smarterclayton tested manually and verified it works.

…mber of buffered bytes if the FileWriter is not closed

Also includes openshift#1713.
This patch should be dropped when we upgrade to Docker Registry 2.5
@openshift-bot
Copy link
Contributor

Evaluated for origin test up to e7db6ba

@smarterclayton
Copy link
Contributor

smarterclayton commented Aug 25, 2016 via email

@openshift-bot
Copy link
Contributor

openshift-bot commented Aug 25, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8463/) (Image: devenv-rhel7_4932)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to e7db6ba

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8445/)

@openshift-bot openshift-bot merged commit 61551aa into openshift:master Aug 26, 2016
@bdurrow
Copy link

bdurrow commented Aug 26, 2016

My test still fails:
builder.go:204] Error: build error: Failed to push image. Response from registry is: blob upload unknown

@bdurrow
Copy link

bdurrow commented Aug 26, 2016

I was able to work around the problem doing the following:

Added the middleware config as indicated here:
#10324

Pulled in some upstream patches, I think the only required on is #1817.

GOHOME=/tmp/go

#Prepare to import Upstream Commits
PATCH_TMP=/tmp/patch-tmp
cd ${GOHOME}/src/github.com/openshift/origin &&
git clean -f &&
git clean -fd &&
git fetch origin &&
git reset --hard 5983e63 &&
cd vendor/github.com/docker/distribution &&
rm -rf $PATCH_TMP &&
mkdir -p $PATCH_TMP &&
git clone --bare https://github.com/docker/distribution $PATCH_TMP &&

#UPSTREAM: docker/distribution: 1688: Pass through known errors
git --git-dir=$PATCH_TMP diff ba92700..3730470b641dcb7ebe50e32512ad4565fa340027 | patch --batch -p1 --no-backup-if-mismatch --reject-file=- &&
git add -A ./ &&
git commit -am "UPSTREAM: docker/distribution: 1688: Pass through known errors" &&

#UPSTREAM: docker/distribution: 1706: Blobwriter: call BlobWriter.Size after BlobWriter.Close
git --git-dir=$PATCH_TMP diff 4ecea4b311d968fb789e30a78c8c6510996a9183..eca581cf36d7994b171f8b357f78de1d923474ff | patch --batch -p1 --no-backup-if-mismatch --reject-file=- || true &&
git add -A ./ &&
git commit -am "UPSTREAM: docker/distribution: 1706: Blobwriter: call BlobWriter.Size after BlobWriter.Close" &&

#UPSTRAM: docker/distribution: 1782: Update "Accept" header parsing for list values
git --git-dir=$PATCH_TMP diff 75882f0..8907f7d1899a578e3e5d10ec34ec49f1841fb154 | patch --batch -p1 --no-backup-if-mismatch --reject-file=- || true &&
git add -A ./ &&
git commit -am 'UPSTREAM: docker/distribution: 1782: Update "Accept" header parsing for list values' &&

#UPSTREAM: docker/distribution: 1817: Avoid formatting errors with %#v
git --git-dir=$PATCH_TMP diff b49f8ed..e015cbadd6b93e12b58f84b6f1c3640995bce034 | patch --batch -p1 --no-backup-if-mismatch --reject-file=- &&
git add -A ./ &&
git commit -am "UPSTREAM: docker/distribution: 1817: Avoid formatting errors with %#v" &&

#UPSTREAM: docker/distribution: 1787: Re-add support for non-resumable digests
git --git-dir=$PATCH_TMP diff 1fc752c..ccfa25cf000f460199484bda4b3c89d52a388c6b | patch --batch -p1 --no-backup-if-mismatch --reject-file=- &&
git add -A ./ &&
git commit -am "UPSTREAM: docker/distribution: 1787: Re-add support for non-resumable digests" &&

#Clean up $PATCH_TMP
rm -rf $PATCH_TMP &&

#Tag
cd ${GOHOME}/src/github.com/openshift/origin &&
git tag --force v1.3.0-alpha.3-distributionv2.4-final &&

#Build
sudo make release

Thank you for your time,

Brad

@mfojtik
Copy link
Contributor Author

mfojtik commented Aug 26, 2016

@bdurrow I tested this patch against GCS and I got my image pushed just fine. I think your fix might be better, but I tested that as well before I ended up with the "quick fix" and I was still seeing the error.

@mfojtik
Copy link
Contributor Author

mfojtik commented Aug 26, 2016

@bdurrow I tested on the latest OpenShift Docker Registry image (2.4.0)

@mfojtik
Copy link
Contributor Author

mfojtik commented Aug 26, 2016

@bdurrow you can try it using docker.io/mfojtik/test-registry:v4 (which has this fix applied)

(also the Blobwriter: call BlobWriter.Size after BlobWriter.Close is 1706 not 1817)

@bdurrow
Copy link

bdurrow commented Aug 26, 2016

Upstream PR 1705 is against 2.4 instead of master and my be preferred. I tried the openshift/origin-docker-registry:latest last night and got the failure I mentioned above. The build was from 2 hours earlier so I believe this PR (10640) was included.

@bdurrow
Copy link

bdurrow commented Aug 26, 2016

@mfojtik, My test with docker.io/mfojtik/test-registry:v4 just passed.

@mfojtik mfojtik deleted the fix-gcs branch September 5, 2018 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants