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

Define log message for failure of remote snapshot preparation #102

Merged
merged 1 commit into from May 26, 2020

Conversation

ktock
Copy link
Member

@ktock ktock commented May 22, 2020

Currently, we have two ways to check the success of remote snapshot
preparation. Integration test checks output messages from ctr-remote
command. CRI test checks the log from stargz daemon. We should unify them
because we want to keep the consideration the about log messages as small as
possible.

We use the log from stargz daemon for both tests. For preventing the message
from accidentally changed, this commit defines the message as const value and
adds some comments.

This commit also adds this check to the benchmarking script.

snapshot/snapshot.go Outdated Show resolved Hide resolved
@ktock
Copy link
Member Author

ktock commented May 23, 2020

I agree with your comment. Though the change in the new commit is a bit larger than the initial scope in this PR, it formats the entire log with JSON. This is because this kind of use-cases (i.e. querying information from logs) might occur in the future again and we want to avoid the same issue so I thought it's good timing for moving to JSON. LMK what you think.

@ktock ktock force-pushed the check-sn branch 2 times, most recently from 1d04433 to c8fc30a Compare May 23, 2020 11:47
// - "false" : indicates the snapshot failed to be prepared as a remote
// snapshot
// - null : undetermined
remoteSnapshot = "containerd.io/snapshot/prepare/remote.snapshot"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too long maybe

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought to avoid name conflict because the key will be global but, yes I think so 🤔

Currently, we have two ways to check the success of remote snapshot
preparation. Integration test checks output messages from `ctr-remote`
command. CRI test checks the log from stargz daemon. We should unify them
because we want to keep the consideration the about log messages as small as
possible.

We use the log from stargz daemon for both tests. This commit formats all log
with JSON for ease of querying information and defines a special key for
indicating whether remote snapshot preparation suceeded or not.

This commit also adds this check to the benchmarking script.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
@AkihiroSuda AkihiroSuda merged commit f9a427d into containerd:master May 26, 2020
@ktock ktock deleted the check-sn branch October 7, 2022 13:45
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.

None yet

2 participants