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

Replication doesn't work for previous version to v1.9.0 #8673

Closed
wy65701436 opened this issue Aug 15, 2019 · 15 comments
Closed

Replication doesn't work for previous version to v1.9.0 #8673

wy65701436 opened this issue Aug 15, 2019 · 15 comments

Comments

@wy65701436
Copy link
Contributor

wy65701436 commented Aug 15, 2019

As quota management is introduced from v1.9.0, and the replication request(PUT blob) used in the previous Harbor doesn't meet the OCI spec of the registry, which is only accepted by quota middlewares now.

Thus, it will break the replication task from an older version Harbor to v1.9.0 Harbor, and you may see the error in the log like:

2019-08-15T02:22:31Z [ERROR] [/replication/transfer/image/transfer.go:143]: http error: code 500, message {"errors":[{"code":"InternalError","message":"Error occurred when to handle request in size quota handler: failed to get content length of blob upload 01cf72d0-2fbf-4722-a0f5-fc91ad48d317, error: redigo: nil returned","detail":"Error occurred when to handle request in size quota handler: failed to get content length of blob upload 01cf72d0-2fbf-4722-a0f5-fc91ad48d317, error: redigo: nil returned"}]}

[Resolve]
Upgrade all of the harbor nodes to v1.9.0.

@wy65701436 wy65701436 changed the title Replication doesn't work for older version to v1.9.0 Replication doesn't work for previous version to v1.9.0 Aug 15, 2019
@MagicStarTrace
Copy link

All docker engines must be upgraded to 19.03 to use 1.9(Harbor)?

@wy65701436
Copy link
Contributor Author

wy65701436 commented Sep 23, 2019

@huyifanstar 18+ is OK. The issue means that, harbor doesn’t support replication from A older version Harbor — like v1.5.0 —- to harbor v1.9.0. For the docker and docker compose support version, just refer to the installation guide.

@MagicStarTrace
Copy link

Is there any other way to migrate from 1.5 to 1.9(docker image)?
Do not use copy/rsync

@wy65701436
Copy link
Contributor Author

wy65701436 commented Sep 23, 2019

To upgrade harbor from v1.5 to v1.9

The exactly path should be: 1.5 -> 1.6 -> 1.8 -> 1.9.

In case of any error, please upgrade version by version and use the migration guide of release-1.*

@MagicStarTrace
Copy link

MagicStarTrace commented Sep 23, 2019

If I want to migrate the images(docker images) in the 1.5 repository to the 1.9 repository,How should I do
docker save < image
docker load/input < image ?
Thanks You!

@xaleeks
Copy link
Contributor

xaleeks commented Sep 23, 2019

you are talking about migrating an image sitting on harbor 1.5 instance to another harbor 1.9 instance correct? @huyifanstar

@wy65701436
Copy link
Contributor Author

wy65701436 commented Sep 23, 2019

@huyifanstar this is no way to migrate images from 1.5 to 1.9 in Harbor,

But, there are two options to workaround this:

  • Upgrade the source node to 1.9, and the replication images between the 1.9 nodes.
  • Call Harbor v1.9.0 API to create projects(and maybe users as well), and do docker pull form v1.5, then do push to Harbor v1.9.0. This could only "migrate" images, and other kinds of data will be lost.

@xaleeks
Copy link
Contributor

xaleeks commented Sep 23, 2019

as @wy65701436 stated, replication btw different versions of harbor is not supported as of right now

@MagicStarTrace
Copy link

如@ wy65701436所述,目前不支持不同版本的Harbor复制

Then I can only use:

docker save < image
docker load < images
Backup / recovery ?

@xaleeks
Copy link
Contributor

xaleeks commented Sep 23, 2019

if you are looking to do this for series of isolated images, maybe the quickest way is to just pull them down and then push them to your new instance. This isn't a target scenario of the backup script we have right now although a more complete solution is coming soon.

@MagicStarTrace
Copy link

if you are looking to do this for series of isolated images, maybe the quickest way is to just pull them down and then push them to your new instance. This isn't a target scenario of the backup script we have right now although a more complete solution is coming soon.

If not the best, is there any better?

@MagicStarTrace
Copy link

Is there a bulk export script?
Harbor has a lot of projects, I want to export all.
shell / python ?

@MaGaoju
Copy link

MaGaoju commented Oct 12, 2019

I have the same issue from 1.8.2 (v1.8.2-b24a0e33)--> 1.9.0(Version v1.9.0-d13cf448) ....

below is the error message

2019-10-12T07:42:47Z [ERROR] [/replication/transfer/image/transfer.go:249]: failed to pushing the blob sha256:dd59fdb172771f3dc2e4b0d7e3052dce2dea7fce3c35ebf423d6b6d8804e0bba: http error: code 500, message {"errors":[{"code":"InternalError","message":"Error occurred when to handle request in size quota handler: failed to get content length of blob upload 5cce90da-005f-48e6-a88c-eee66fea0fe1, error: redigo: nil returned","detail":"Error occurred when to handle request in size quota handler: failed to get content length of blob upload 5cce90da-005f-48e6-a88c-eee66fea0fe1, error: redigo: nil returned"}]}
2019-10-12T07:42:47Z [ERROR] [/replication/transfer/image/transfer.go:143]: http error: code 500, message {"errors":[{"code":"InternalError","message":"Error occurred when to handle request in size quota handler: failed to get content length of blob upload 5cce90da-005f-48e6-a88c-eee66fea0fe1, error: redigo: nil returned","detail":"Error occurred when to handle request in size quota handler: failed to get content length of blob upload 5cce90da-005f-48e6-a88c-eee66fea0fe1, error: redigo: nil returned"}]}

any solution ?

@lf1029698952
Copy link

you can for each pull every one images and push it to new harbor.

@stale
Copy link

stale bot commented Jan 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Jan 12, 2020
@stale stale bot closed this as completed Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants