Skip to content

Commit 8af2092

Browse files
authored
Upgrade the docker version to 23.0.6 (#5436)
* Upgrade the docker version to 23.0.6 * Maximize build space * Revert cleaning up docker volumes
1 parent 4fac03a commit 8af2092

File tree

12 files changed

+25
-25
lines changed

12 files changed

+25
-25
lines changed

ansible/group_vars/all

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ invoker:
212212
userCpus: "{{ invoker_user_cpus | default() }}"
213213
# Specify if it is allowed to deploy more than 1 invoker on a single machine.
214214
allowMultipleInstances: "{{ invoker_allow_multiple_instances | default(false) }}"
215-
# Specify if it should use docker-runc or docker to pause/unpause containers
215+
# Specify if it should use runc or docker to pause/unpause containers
216216
useRunc: "{{ invoker_use_runc | default(true) }}"
217217
docker:
218218
become: "{{ invoker_docker_become | default(false) }}"

ansible/roles/invoker/tasks/clean.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@
6666
- name: pause/resume at runc-level to restore docker consistency
6767
shell: |
6868
DOCKER_PAUSED=$(docker ps --filter status=paused --filter name=wsk{{ invoker_index }} -q --no-trunc)
69-
for C in $DOCKER_PAUSED; do docker-runc --root {{ invoker.docker.runcdir }} pause $C; done
69+
for C in $DOCKER_PAUSED; do runc --root {{ invoker.docker.runcdir }} pause $C; done
7070
DOCKER_RUNNING=$(docker ps --filter status=running --filter name=wsk{{ invoker_index }} -q --no-trunc)
71-
for C2 in $DOCKER_RUNNING; do docker-runc --root {{ invoker.docker.runcdir }} resume $C2; done
71+
for C2 in $DOCKER_RUNNING; do runc --root {{ invoker.docker.runcdir }} resume $C2; done
7272
TOTAL=$(($(echo $DOCKER_PAUSED | wc -w)+$(echo $DOCKER_RUNNING | wc -w)))
7373
echo "Handled $TOTAL remaining actions."
7474
register: runc_output

ansible/roles/invoker/tasks/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@
383383
{{ docker_sock | default('/var/run/docker.sock') }}:/var/run/docker.sock"
384384
###
385385
# The root runc directory varies based on the version of docker and runc.
386-
# When docker>=18.06 uses docker-runc the directory is /run/docker/runtime-runc/moby.
387-
# While docker-runc itself uses /run/runc for a root user or /run/user/<uid>/runc for a non-root user.
386+
# When docker>=18.06 uses runc the directory is /run/docker/runtime-runc/moby.
387+
# While runc itself uses /run/runc for a root user or /run/user/<uid>/runc for a non-root user.
388388
# Currently, the invoker is running as a root user so the below configuration works as expected.
389389
# But when the invoker needs to run as a non-root user or the version docker needs to be changed,
390390
# the following configuration should be properly updated as well.

core/controller/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ ENV SWAGGER_UI_DOWNLOAD_SHA256=3d7ef5ddc59e10f132fe99771498f0f1ba7a2cbfb9585f986
2828
# If you change the docker version here, it has implications on invoker runc support.
2929
# Docker server version and the invoker docker version must be the same to enable runc usage.
3030
# If this cannot be guaranteed, set `invoker_use_runc: false` in the ansible env.
31-
ENV DOCKER_VERSION=18.06.3-ce
31+
ENV DOCKER_VERSION=23.0.6
3232

3333
RUN apk add --update openssl
3434

3535
# Uncomment to fetch latest version of docker instead: RUN wget -qO- https://get.docker.com | sh
3636
# Install docker client
3737
RUN curl -sSL -o docker-${DOCKER_VERSION}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz && \
3838
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker && \
39-
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker-runc && \
39+
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/runc && \
4040
rm -f docker-${DOCKER_VERSION}.tgz && \
4141
chmod +x /usr/bin/docker && \
42-
chmod +x /usr/bin/docker-runc
42+
chmod +x /usr/bin/runc
4343
##################################################################################################
4444

4545
# Install swagger-ui

core/controller/Dockerfile-debian

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ ENV SWAGGER_UI_DOWNLOAD_SHA256=3d7ef5ddc59e10f132fe99771498f0f1ba7a2cbfb9585f986
2828
# If you change the docker version here, it has implications on invoker runc support.
2929
# Docker server version and the invoker docker version must be the same to enable runc usage.
3030
# If this cannot be guaranteed, set `invoker_use_runc: false` in the ansible env.
31-
ENV DOCKER_VERSION=18.06.3-ce
31+
ENV DOCKER_VERSION=23.0.6
3232

3333
RUN apt-get -y install openssl
3434

3535
# Uncomment to fetch latest version of docker instead: RUN wget -qO- https://get.docker.com | sh
3636
# Install docker client
3737
RUN curl -sSL -o docker-${DOCKER_VERSION}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz && \
3838
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker && \
39-
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker-runc && \
39+
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/runc && \
4040
rm -f docker-${DOCKER_VERSION}.tgz && \
4141
chmod +x /usr/bin/docker && \
42-
chmod +x /usr/bin/docker-runc
42+
chmod +x /usr/bin/runc
4343
##################################################################################################
4444

4545
# Install swagger-ui

core/invoker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FROM scala
1919

2020
ENV UID=1001 \
2121
NOT_ROOT_USER=owuser \
22-
DOCKER_VERSION=18.06.3-ce
22+
DOCKER_VERSION=23.0.6
2323
# If you change the docker version here, it has implications on invoker runc support.
2424
# Docker server version and the invoker docker version must be the same to enable runc usage.
2525
# If this cannot be guaranteed, set `invoker_use_runc: false` in the ansible env.
@@ -31,10 +31,10 @@ RUN apk add --update openssl
3131
# Install docker client
3232
RUN curl -sSL -o docker-${DOCKER_VERSION}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz && \
3333
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker && \
34-
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker-runc && \
34+
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/runc && \
3535
rm -f docker-${DOCKER_VERSION}.tgz && \
3636
chmod +x /usr/bin/docker && \
37-
chmod +x /usr/bin/docker-runc
37+
chmod +x /usr/bin/runc
3838

3939
ADD build/distributions/invoker.tar ./
4040

core/invoker/Dockerfile-debian

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FROM scala
1919

2020
ENV UID=1001 \
2121
NOT_ROOT_USER=owuser
22-
ENV DOCKER_VERSION=18.06.3-ce
22+
ENV DOCKER_VERSION=23.0.6
2323
# If you change the docker version here, it has implications on invoker runc support.
2424
# Docker server version and the invoker docker version must be the same to enable runc usage.
2525
# If this cannot be guaranteed, set `invoker_use_runc: false` in the ansible env.
@@ -31,10 +31,10 @@ RUN apt-get -y install openssl
3131
# Install docker client
3232
RUN curl -sSL -o docker-${DOCKER_VERSION}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz && \
3333
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker && \
34-
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker-runc && \
34+
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/runc && \
3535
rm -f docker-${DOCKER_VERSION}.tgz && \
3636
chmod +x /usr/bin/docker && \
37-
chmod +x /usr/bin/docker-runc
37+
chmod +x /usr/bin/runc
3838

3939
ADD build/distributions/invoker.tar ./
4040

core/invoker/src/main/resources/application.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ whisk {
5050
}
5151

5252
docker.container-factory {
53-
# Use runc (docker-runc) for pause/resume functionality in DockerContainerFactory
53+
# Use runc for pause/resume functionality in DockerContainerFactory
5454
use-runc: true
5555
}
5656

core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerContainer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ object DockerContainer {
5555
* @param network network to launch the container in
5656
* @param dnsServers list of dns servers to use in the container
5757
* @param name optional name for the container
58-
* @param useRunc use docker-runc to pause/unpause container?
58+
* @param useRunc use runc to pause/unpause container?
5959
* @return a Future which either completes with a DockerContainer or one of two specific failures
6060
*/
6161
def create(transid: TransactionId,

core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/RuncClient.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class RuncClient(timeouts: RuncClientTimeouts = loadConfigOrThrow[RuncClientTime
5656

5757
// Determines how to run docker. Failure to find a Docker binary implies
5858
// a failure to initialize this instance of DockerClient.
59-
protected val runcCmd: Seq[String] = Seq("/usr/bin/docker-runc")
59+
protected val runcCmd: Seq[String] = Seq("/usr/bin/runc")
6060

6161
def pause(id: ContainerId)(implicit transid: TransactionId): Future[Unit] =
6262
runCmd(Seq("pause", id.asString), timeouts.pause).map(_ => ())

docs/deploy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ OpenWhisk used to support both shared state and a sharding model. The former has
4848

4949
The sharding loadbalancer has the caveat of being limited in its scalability in its current implementation. It uses "horizontal" sharding, which means that the slots on each invoker are evenly divided to the loadbalancers. For example: In a system with 2 loadbalancers and invokers which have 16 slots each, each loadbalancer would get 8 slots on each invoker. In this specific case, a cluster of loadbalancers > 16 instances does not make sense, since each loadbalancer would only have a fraction of a slot above that. The code guards against that but it is strongly recommended not to deploy more sharding loadbalancers than there are slots on each invoker.
5050

51-
# Invoker use of docker-runc
51+
# Invoker use of runc
5252

53-
To improve performance, Invokers attempt to maintain warm containers for frequently executed actions. To optimize resource usage, the action containers are paused/unpaused between invocations. The system can be configured to use either docker-runc or docker to perform the pause/unpause operations by setting the value of the environment variable INVOKER_USE_RUNC to true or false respectively. If not set, it will default to true (use docker-runc).
53+
To improve performance, Invokers attempt to maintain warm containers for frequently executed actions. To optimize resource usage, the action containers are paused/unpaused between invocations. The system can be configured to use either runc or docker to perform the pause/unpause operations by setting the value of the environment variable INVOKER_USE_RUNC to true or false respectively. If not set, it will default to true (use runc).
5454

55-
Using docker-runc obtains significantly better performance, but requires that the version of docker-runc within the invoker container is an exact version match to the docker-runc of the host environment. Failure to get an exact version match will results in error messages like:
55+
Using runc obtains significantly better performance, but requires that the version of runc within the invoker container is an exact version match to the runc of the host environment. Failure to get an exact version match will results in error messages like:
5656
```
5757
2017-09-29T20:15:54.551Z] [ERROR] [#sid_102] [RuncClient] code: 1, stdout: , stderr: json: cannot unmarshal object into Go value of type []string [marker:invoker_runc.pause_error:6830148:259]
5858
```
59-
When a docker-runc operations results in an error, the container will be killed by the invoker. This results in missed opportunities for container reuse and poor performance. Setting INVOKER_USE_RUNC to false can be used as a workaround until proper usage of docker-runc can be configured for the deployment.
59+
When a runc operations results in an error, the container will be killed by the invoker. This results in missed opportunities for container reuse and poor performance. Setting INVOKER_USE_RUNC to false can be used as a workaround until proper usage of runc can be configured for the deployment.

tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/RuncClientTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class RuncClientTests
5252
implicit val transid = TransactionId.testing
5353
val id = ContainerId("Id")
5454

55-
val runcCommand = "docker-runc"
55+
val runcCommand = "runc"
5656

5757
/** Returns a RuncClient with a mocked result for 'executeProcess' */
5858
def runcClient(result: Future[String]) = new RuncClient()(global) {

0 commit comments

Comments
 (0)