Skip to content

Add logging binary support when terminal is true#4502

Merged
AkihiroSuda merged 3 commits intocontainerd:masterfrom
akshat-kmr:master
Oct 8, 2020
Merged

Add logging binary support when terminal is true#4502
AkihiroSuda merged 3 commits intocontainerd:masterfrom
akshat-kmr:master

Conversation

@akshat-kmr
Copy link
Copy Markdown

Currently the shims only support starting the logging binary process if the
io.Creator Config does not specify Terminal: true. This means that the program
using containerd will only be able to specify FIFO io when Terminal: true,
rather than allowing the shim to fork the logging binary process. Hence,
containerd consumers face an inconsistent behavior regarding logging binary
management depending on the Terminal option.

Allowing the shim to fork the logging binary process will introduce consistency
between the running container and the logging process. Otherwise, the logging
process may die if its parent process dies whereas the container will keep
running, resulting in the loss of container logs.

Signed-off-by: Akshat Kumar [email protected]


Code to start logging binary referenced from pkg/process/io.go

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Aug 26, 2020

Build succeeded.

Currently the shims only support starting the logging binary process if the
io.Creator Config does not specify Terminal: true. This means that the program
using containerd will only be able to specify FIFO io when Terminal: true,
rather than allowing the shim to fork the logging binary process. Hence,
containerd consumers face an inconsistent behavior regarding logging binary
management depending on the Terminal option.

Allowing the shim to fork the logging binary process will introduce consistency
between the running container and the logging process. Otherwise, the logging
process may die if its parent process dies whereas the container will keep
running, resulting in the loss of container logs.

Signed-off-by: Akshat Kumar <[email protected]>
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Aug 26, 2020

Build succeeded.

Comment thread runtime/io.go Outdated
W *os.File
}

func NewPipe() (*Pipe, error) {
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.

This function and struct don't seem useful. Let's just use os.Pipe

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sounds good.

Comment thread runtime/io.go
}, nil
}

func NewBinaryCmd(binaryURI *url.URL, id, ns string) *exec.Cmd {
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.

Needs godoc

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Aug 26, 2020

Build succeeded.

@AkihiroSuda
Copy link
Copy Markdown
Member

@cpuguy83 @fuweid PTAL?

@fuweid fuweid self-assigned this Sep 2, 2020
Comment thread runtime/v1/shim/service_linux.go
Comment thread runtime/v1/shim/service_linux.go
@akshat-kmr akshat-kmr force-pushed the master branch 2 times, most recently from c1c66f0 to c669e6d Compare September 6, 2020 17:40
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 6, 2020

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 7, 2020

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 8, 2020

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 9, 2020

Build succeeded.

Comment thread runtime/v1/shim/service_linux.go Outdated
@akshat-kmr akshat-kmr force-pushed the master branch 2 times, most recently from 021650c to 5b72445 Compare September 10, 2020 01:18
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 10, 2020

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 11, 2020

Build succeeded.

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@fuweid fuweid requested a review from AkihiroSuda September 12, 2020 03:36
@AkihiroSuda
Copy link
Copy Markdown
Member

@cpuguy83 PTAL?

Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@akshat-kmr
Copy link
Copy Markdown
Author

Thanks for the reviews, all. Is this ready to be merged? @AkihiroSuda

@thaJeztah
Copy link
Copy Markdown
Member

removing the cherry-pick labels for now, per #4616 (comment) and #4615 (comment)

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.

5 participants