-
Notifications
You must be signed in to change notification settings - Fork 60
Enable blob caching and blobInfo caching #34
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
Conversation
00524e0 to
8db526a
Compare
|
/test all |
8db526a to
199b5fb
Compare
|
/retest |
adambkaplan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions (otherwise lgtm)
pkg/build/builder/cmd/builder.go
Outdated
| // By default, enable a blob cache, but allow it to be moved or | ||
| // disabled via the environment. | ||
| cfg.blobCache = "/var/cache/blobs" | ||
| if dir, isSet := os.LookupEnv("BUILD_BLOBCACHE"); isSet { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will this be disabled - empty env valule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please call this BUILD_ENABLE_BLOBCACHE or something that makes it clear it's an enablement (and then make it enable when the value is set to true (case insensitive))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, changing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be sure, this means we're going to need to update the build controller to enable the blob cache. By default, it isn't enabled, but we want to use it here. Blob info caching is enabled by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I screwed this up. but i think BUILD_BLOBCACHE_DIR would be a better name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(and ignore my comments about expecting a value of true)
| } else { | ||
| glog.V(2).Infof("Registry for %q is not present in the registries configuration, assuming it is secure.", imageName) | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the designation of secure/insecure registries will be taken care of by copying in /etc/containers/registries.conf?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nalind did something get fixed in buildah that we don't need this any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, containers/image#468 was merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adambkaplan Yup, the way the builder expects the configuration to be provided to it hasn't changed, we just don't need to do this bit of work ourselves any more.
b757d4d to
c7567ef
Compare
|
Backing out the changes to pay attention to the ImageOptimizationPolicy, which can be done in a different PR after this one. |
|
/retest |
|
This still needs a corresponding origin PR for the controller (e.g. openshift/origin#21613) |
|
/retest |
|
picked up this PR to bring in containers/buildah#1244 for testing till it gets merged and I'm seeing errors coming from pkg/errors and raven-go. I've been able to overcome that by sticking the lib in glide with: it is related to getsentry/raven-go#225 |
|
The parallel pull + pgzip PR in Buildah has been merged. We could grab it here, I'm already testing with it. |
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Switch back to upstream containers/image, since it handles IP addresses as registries. Note that matching for entries in the insecure registries list does not treat entries with no port number part as matching any port, so it must often be specified. This version also adds blob info caching by default. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
The image library's registry client now handles setting the DockerInsecureSkipTLSVerify flag based on the registries configuration, so we no longer need to do so ourselves. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Use /var/cache/blobs, by default, for caching blobs. Blob caching is useful for avoiding the work of recompressing layers that we inherit from a base image when we go to push the newly-built image. If $BUILD_BLOBCACHE_DIR is set, we its value as the location, instead of /var/cache/blobs. Setting the variable to an empty value will disable the cache. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
|
@nalind: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
We need containers/buildah#1265 as well |
|
/test e2e-aws |
|
/test e2e-aws-builds |
Included as of #34 (comment). |
|
one nit on the dir name, otherwise lgtm pending passing tests. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, nalind The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This patch set updates the versions of the storage, image, and buildah libraries and enables blob and blobInfo caching. We switch back to the main containers/image repository, since it now supports registry names specified as IP addresses, and drop logic for setting the InsecureSkipTLSVerify flag, which the image library's registry client logic now sets automatically if we don't.