Skip to content

logging: ensure that MagicArgv1 is always argv1 - #1056

Merged
AkihiroSuda merged 2 commits into
containerd:masterfrom
AkihiroSuda:fix-logging-argv1
May 13, 2022
Merged

AkihiroSuda merged 2 commits into
containerd:masterfrom
AkihiroSuda:fix-logging-argv1

Conversation

@AkihiroSuda

@AkihiroSuda AkihiroSuda commented May 12, 2022 •

Copy link
Copy Markdown
Member

Fix #1054
Replace #1055

The opts are now stored in filepath.Join(dataStore, "containers", ns, id, "log-config.json")

Signed-off-by: Akihiro Suda <[email protected]>
Fix issue 1054
Replace PR 1055

Signed-off-by: Akihiro Suda <[email protected]>

@Zheaoli Zheaoli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread cmd/nerdctl/run.go
return nil, err
}
args := map[string]string{
logging.MagicArgv1: dataStore,

@junnplus junnplus May 12, 2022 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

An immature idea, why not consider splicing the parameters behind the dataStore, like
binary:///usr/local/bin/nerdctl?_NERDCTL_INTERNAL_LOGGING=/var/lib/nerdctl/1935db59\?maxSize=1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just didn't want to invent a new microformat

@junnplus junnplus May 12, 2022 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Or put args in the labels of the container? like nerdctl/logging.driver / nerdctl/logging.max-file

To be honest, I am not inclined to store some information by adding new files. :(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

How can we let the log binary access the labels?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's a bit tricky, ignore it

@junnplus junnplus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@fahedouch

Copy link
Copy Markdown
Member

@AkihiroSuda would you plz merge :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

logging: ensure that MagicArgv1 is always argv1

5 participants