-
Notifications
You must be signed in to change notification settings - Fork 212
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
using discard_unpacked_layers with CRI to reduce the size on disk of the cached images #5077
base: master
Are you sure you want to change the base?
Conversation
|
||
disable_containerd_discard_unpacked_layers() { |
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.
will this preserve our ability to do retagging for china cloud at runtime?
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'm reenabling it at the end. I will need to test. This is on my bucket list. to see what will happen. I guess we dont have an e2e for that right ?
8ebaf96
to
1fb6764
Compare
5c59c76
to
2938a6d
Compare
85351c4
to
684823e
Compare
@@ -80,5 +80,5 @@ EVENT_JSON=$( jq -n \ | |||
--arg EventTid "0" \ | |||
'{Timestamp: $Timestamp, OperationId: $OperationId, Version: $Version, TaskName: $TaskName, EventLevel: $EventLevel, Message: $Message, EventPid: $EventPid, EventTid: $EventTid}' | |||
) | |||
|
|||
mkdir -p ${EVENTS_LOGGING_DIR} |
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.
we shouldn't need to do this, WALinuxAgent will do this as a part of executing the extension
@@ -5,7 +5,12 @@ retrycmd_get_tarball() { | |||
tar_retries=$1; wait_sleep=$2; tarball=$3; url=$4 | |||
echo "${tar_retries} retries" | |||
for i in $(seq 1 $tar_retries); do | |||
tar -tzf $tarball && break || \ | |||
if [ -f $tarball ]; then |
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.
is this an unrelated change?
@@ -69,5 +69,5 @@ func ListImages(sku, version string) (*List, error) { | |||
} | |||
|
|||
func isID(imageName string) bool { | |||
return strings.Contains(imageName, "sha256") | |||
return (strings.Contains(imageName, "sha256") && !strings.HasPrefix(imageName, "sha256:")) |
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.
return (strings.Contains(imageName, "sha256") && !strings.HasPrefix(imageName, "sha256:")) | |
return strings.Contains(imageName, "sha256") && !strings.HasPrefix(imageName, "sha256:") |
There are merge conflicts because of the other CSE changes - we need to rebase again |
tar -tzf $tarball | ||
if [ $? -eq 0 ]; then | ||
break | ||
fi |
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.
Why is this change necessary?
else | ||
# this is only called during cse. VHDs should have crictl binaries pre-cached so no need to download. | ||
# if the vhd does not have crictl pre-baked, return early | ||
CRICTL_TGZ_TEMP="crictl-v${CRICTL_VERSION}-linux-${CPU_ARCH}.tar.gz" | ||
CRICTL_TGZ_TEMP="crictl-v${crictlVersion}-linux-${CPU_ARCH}.tar.gz" |
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.
is crictlVersion being set properly? I don't see it being passed to installCrictl during CSE but maybe I'm missing that
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Reducing the Packed Image layers (content) under /var/lib/containerd folder, this data is not used normally for creating container, it's used for republishing. CRICTL allows for this storage to be dleeted post unpacking, using the CRI flag
Which issue(s) this PR fixes:
Fixes #
Requirements:
Special notes for your reviewer:
Release note: