<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/docker.git/libcontainerd/remote, branch master</title>
<subtitle>github.com: dotcloud/docker.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/'/>
<entry>
<title>fixing consistent aliases for OCI spec imports</title>
<updated>2023-05-08T09:57:52+00:00</updated>
<author>
<name>Jeyanthinath Muthuram</name>
<email>jeyanthinath10@gmail.com</email>
</author>
<published>2023-05-08T09:57:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=307b09e7eb14e48a66752b036fb2a2eb53fa599c'/>
<id>307b09e7eb14e48a66752b036fb2a2eb53fa599c</id>
<content type='text'>
Signed-off-by: Jeyanthinath Muthuram &lt;jeyanthinath10@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jeyanthinath Muthuram &lt;jeyanthinath10@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>use consistent alias for containerd's errdefs package</title>
<updated>2023-04-08T17:30:33+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2023-04-08T17:30:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=81e62af94ac59cf56aa6f988e04f5238e0f69ad1'/>
<id>81e62af94ac59cf56aa6f988e04f5238e0f69ad1</id>
<content type='text'>
The signatures of functions in containerd's errdefs packages are very
similar to those in our own, and it's easy to accidentally use the wrong
package.

This patch uses a consistent alias for all occurrences of this import.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The signatures of functions in containerd's errdefs packages are very
similar to those in our own, and it's easy to accidentally use the wrong
package.

This patch uses a consistent alias for all occurrences of this import.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcontainerd: close stdin sync if possible</title>
<updated>2023-04-03T19:25:16+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2023-04-03T19:00:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=36935bd869ec5df59ca432221b7e0dc652cf3a3c'/>
<id>36935bd869ec5df59ca432221b7e0dc652cf3a3c</id>
<content type='text'>
Closing stdin of a container or exec (a.k.a.: task or process) has been
somewhat broken ever since support for ContainerD 1.0 was introduced
back in Docker v17.11: the error returned from the CloseIO() call was
effectively ignored due to it being assigned to a local variable which
shadowed the intended variable. Serendipitously, that oversight
prevented a data race. In my recent refactor of libcontainerd, I
corrected the variable shadowing issue and introduced the aforementioned
data race in the process.

Avoid deadlocking when closing stdin without swallowing errors or
introducing data races by calling CloseIO() synchronously if the process
handle is available, falling back to an asynchronous close-and-log
strategy otherwise. This solution is inelegant and complex, but looks to
be the best that could be done without changing the libcontainerd API.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closing stdin of a container or exec (a.k.a.: task or process) has been
somewhat broken ever since support for ContainerD 1.0 was introduced
back in Docker v17.11: the error returned from the CloseIO() call was
effectively ignored due to it being assigned to a local variable which
shadowed the intended variable. Serendipitously, that oversight
prevented a data race. In my recent refactor of libcontainerd, I
corrected the variable shadowing issue and introduced the aforementioned
data race in the process.

Avoid deadlocking when closing stdin without swallowing errors or
introducing data races by calling CloseIO() synchronously if the process
handle is available, falling back to an asynchronous close-and-log
strategy otherwise. This solution is inelegant and complex, but looks to
be the best that could be done without changing the libcontainerd API.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcontainerd: Upgrade to typeurl/v2</title>
<updated>2023-03-08T10:26:32+00:00</updated>
<author>
<name>Paweł Gronowski</name>
<email>pawel.gronowski@docker.com</email>
</author>
<published>2023-03-01T16:39:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=a8f5c524a09881e0fca5f1612c501c5de500cb73'/>
<id>a8f5c524a09881e0fca5f1612c501c5de500cb73</id>
<content type='text'>
In preparation for containerd v1.7 which migrates off gogo/protobuf
and changes the protobuf Any type to one that's not supported by our
vendored version of typeurl.

This fixes a compile error on usages of `typeurl.UnmarshalAny` when
upgrading to containerd v1.7.

Signed-off-by: Paweł Gronowski &lt;pawel.gronowski@docker.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation for containerd v1.7 which migrates off gogo/protobuf
and changes the protobuf Any type to one that's not supported by our
vendored version of typeurl.

This fixes a compile error on usages of `typeurl.UnmarshalAny` when
upgrading to containerd v1.7.

Signed-off-by: Paweł Gronowski &lt;pawel.gronowski@docker.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcontainerd/client: Rename `cp` to `checkpoint`</title>
<updated>2023-03-01T14:07:58+00:00</updated>
<author>
<name>Paweł Gronowski</name>
<email>pawel.gronowski@docker.com</email>
</author>
<published>2023-03-01T13:25:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=47e9caede7447a8d7afdba894ddb0be01523c3c9'/>
<id>47e9caede7447a8d7afdba894ddb0be01523c3c9</id>
<content type='text'>
Make the variable longer to give a hint about it's broader scope.

Signed-off-by: Paweł Gronowski &lt;pawel.gronowski@docker.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the variable longer to give a hint about it's broader scope.

Signed-off-by: Paweł Gronowski &lt;pawel.gronowski@docker.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcontainerd/client: Fix checkpoint not being set</title>
<updated>2023-03-01T14:07:42+00:00</updated>
<author>
<name>Paweł Gronowski</name>
<email>pawel.gronowski@docker.com</email>
</author>
<published>2023-03-01T13:16:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=0c751f904f39cf8446dcffee84c0268dba420d9f'/>
<id>0c751f904f39cf8446dcffee84c0268dba420d9f</id>
<content type='text'>
`cp` variable is used later to populate the `info.Checkpoint` field
option used by Task creation.
Previous changes mistakenly changed assignment of the `cp` variable to
declaration of a new variable that's scoped only to the if block.

Restore the old assignment behavior.

Signed-off-by: Paweł Gronowski &lt;pawel.gronowski@docker.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`cp` variable is used later to populate the `info.Checkpoint` field
option used by Task creation.
Previous changes mistakenly changed assignment of the `cp` variable to
declaration of a new variable that's scoped only to the if block.

Restore the old assignment behavior.

Signed-off-by: Paweł Gronowski &lt;pawel.gronowski@docker.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libc8d/remote: name task fifos after task ID</title>
<updated>2023-01-31T22:02:43+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2023-01-30T19:20:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=843fcc96f7125cb5b78a6733d1a7749d9c5f55b6'/>
<id>843fcc96f7125cb5b78a6733d1a7749d9c5f55b6</id>
<content type='text'>
The ID of the task is known at the time that the FIFOs need to be
created (it's passed into the IO-creator callback, and is also the same
as the container ID) so there is no need to hardcode it to "init". Name
the FIFOs after the task ID to be consistent with the FIFO names of
exec'ed processes. Delete the now-unused InitProcessName constant so it
can never again be used in place of a task/process ID.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ID of the task is known at the time that the FIFOs need to be
created (it's passed into the IO-creator callback, and is also the same
as the container ID) so there is no need to hardcode it to "init". Name
the FIFOs after the task ID to be consistent with the FIFO names of
exec'ed processes. Delete the now-unused InitProcessName constant so it
can never again be used in place of a task/process ID.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcontainerd/remote: remove stray import comment</title>
<updated>2022-12-08T12:27:50+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2022-12-08T12:27:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=200edf803043ede28f61234ca3bd494834c65f9d'/>
<id>200edf803043ede28f61234ca3bd494834c65f9d</id>
<content type='text'>
Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix containerd task deletion after failed start</title>
<updated>2022-11-02T17:48:13+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2022-11-02T17:48:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=1bef9e3fbfbcedce10f476f890961fd1ba574fbb'/>
<id>1bef9e3fbfbcedce10f476f890961fd1ba574fbb</id>
<content type='text'>
Deleting a containerd task whose status is Created fails with a
"precondition failed" error. This is because (aside from Windows)
a process is spawned when the task is created, and deleting the task
while the process is running would leak the process if it was allowed.
libcontainerd and the containerd plugin executor mistakenly try to clean
up from a failed start by deleting the created task, which will always
fail with the aforementined error. Change them to pass the
`WithProcessKill` delete option so the cleanup has a chance to succeed.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Deleting a containerd task whose status is Created fails with a
"precondition failed" error. This is because (aside from Windows)
a process is spawned when the task is created, and deleting the task
while the process is running would leak the process if it was allowed.
libcontainerd and the containerd plugin executor mistakenly try to clean
up from a failed start by deleting the created task, which will always
fail with the aforementined error. Change them to pass the
`WithProcessKill` delete option so the cleanup has a chance to succeed.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor libcontainerd to minimize c8d RPCs</title>
<updated>2022-08-24T18:59:08+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2022-05-10T19:59:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=4bafaa00aa810dd17fde13e563def08f96fffc31'/>
<id>4bafaa00aa810dd17fde13e563def08f96fffc31</id>
<content type='text'>
The containerd client is very chatty at the best of times. Because the
libcontained API is stateless and references containers and processes by
string ID for every method call, the implementation is essentially
forced to use the containerd client in a way which amplifies the number
of redundant RPCs invoked to perform any operation. The libcontainerd
remote implementation has to reload the containerd container, task
and/or process metadata for nearly every operation. This in turn
amplifies the number of context switches between dockerd and containerd
to perform any container operation or handle a containerd event,
increasing the load on the system which could otherwise be allocated to
workloads.

Overhaul the libcontainerd interface to reduce the impedance mismatch
with the containerd client so that the containerd client can be used
more efficiently. Split the API out into container, task and process
interfaces which the consumer is expected to retain so that
libcontainerd can retain state---especially the analogous containerd
client objects---without having to manage any state-store inside the
libcontainerd client.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The containerd client is very chatty at the best of times. Because the
libcontained API is stateless and references containers and processes by
string ID for every method call, the implementation is essentially
forced to use the containerd client in a way which amplifies the number
of redundant RPCs invoked to perform any operation. The libcontainerd
remote implementation has to reload the containerd container, task
and/or process metadata for nearly every operation. This in turn
amplifies the number of context switches between dockerd and containerd
to perform any container operation or handle a containerd event,
increasing the load on the system which could otherwise be allocated to
workloads.

Overhaul the libcontainerd interface to reduce the impedance mismatch
with the containerd client so that the containerd client can be used
more efficiently. Split the API out into container, task and process
interfaces which the consumer is expected to retain so that
libcontainerd can retain state---especially the analogous containerd
client objects---without having to manage any state-store inside the
libcontainerd client.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
