Skip to content

Commit

Permalink
Merge tag 'v1.3.4' into fork/release/1.3
Browse files Browse the repository at this point in the history
containerd 1.3.4

Welcome to the v1.3.4 release of containerd!

The fourth patch release for `containerd` 1.3 adds `NOTIFY_SOCKET` support, improves shim loggers shutdown
behavior and includes a few bug fixes related to incorrect FIFO clean up and dangling shims.

* Improve host fallback behaviour in docker remote [containerd#4007](containerd#4007)
* Cleanup dangling shim by brand new context [containerd#4054](containerd#4054)
* Support notify socket [containerd#4104](containerd#4104)
* Correct logic of FIFO cleanup [containerd#4150](containerd#4150)
* Rework shim logger shutdown process [containerd#4166](containerd#4166)
* Man page fixes [containerd#4144](containerd#4144)
* Bump Golang 1.13.10 [containerd#4170](containerd#4170)
* sys/mount_linux: use pipe for communicating mount result [containerd#4171](containerd#4171)

Please try out the release binaries and report any issues at
https://github.com/containerd/containerd/issues.

* Sebastiaan van Stijn
* Phil Estes
* Maksym Pavlenko
* Wei Fu
* Michael Crosby
* Derek McGowan
* Davanum Srinivas
* Alex Price
* Chris C
* Erik Sipsma
* Haitao Li
* Josh Dolitsky
* Lantao Liu
* Mike Brown
* Salvador Fuentes
* Ted Yu
* Ulysses Souza

* [`814b7956fa`](containerd@814b795) Merge pull request  [containerd#4167](containerd#4167) from mxpv/prepare-1.3.4
* [`1f0a4fd60d`](containerd@1f0a4fd) Prepare release 1.3.4
* [`3801f2f1f3`](containerd@3801f2f) Merge pull request  [containerd#4187](containerd#4187) from mxpv/release/1.3
* [`910dfcd727`](containerd@910dfcd) Vendor containerd/cgroups 9f1c62dddf4bc7cc72822ebe353bae7006141b1b
* [`60bc128245`](containerd@60bc128) Merge pull request  [containerd#4190](containerd#4190) from mxpv/ci-fix
* [`7a57e50778`](containerd@7a57e50) Fix protobuild
* [`b3b3ea60ac`](containerd@b3b3ea6) Merge pull request  [containerd#4181](containerd#4181) from dmcgowan/1.3-revert-git-sha-pin
* [`e9836d9539`](containerd@e9836d9) Revert pin vendors by git sha
* [`0e625fc987`](containerd@0e625fc) Merge pull request  [containerd#4171](containerd#4171) from thaJeztah/1.3_backport_forkmount_use_pipe_instead_wait4
* [`d3d7a0d57f`](containerd@d3d7a0d) Merge pull request  [containerd#4172](containerd#4172) from thaJeztah/1.3_backport_update_go_events
* [`76c6afbe23`](containerd@76c6afb) Merge pull request  [containerd#4170](containerd#4170) from thaJeztah/1.3_backport_bump_golang_1.13
* [`7d41344804`](containerd@7d41344) vendor: update go-events to fix alignment for 32bit systems
* [`d70d0f1a99`](containerd@d70d0f1) sys/mount_linux: use pipe for communicating mount result
* [`ec5e25d065`](containerd@ec5e25d) Bump Golang 1.13.10
* [`8b79d600f8`](containerd@8b79d60) Bump Golang 1.13.9
* [`13ac9e74c4`](containerd@13ac9e7) Merge pull request  [containerd#4166](containerd#4166) from mxpv/release/1.3
* [`c95854caca`](containerd@c95854c) Rework shim logger shutdown process
* [`7665b4d7fd`](containerd@7665b4d) Merge pull request  [containerd#4158](containerd#4158) from thaJeztah/1.3_revert_bump_bolt
* [`782a4619ce`](containerd@782a461) Revert "vendor: update go.etcd.io/bbolt v1.3.4"
* [`0b27d9364c`](containerd@0b27d93) Merge pull request  [containerd#4150](containerd#4150) from thaJeztah/1.3_backport_no_del_rootdir_ios
* [`114bbed34e`](containerd@114bbed) Merge pull request  [containerd#4148](containerd#4148) from thaJeztah/1.3_backport_bump_console
* [`064ace5914`](containerd@064ace5) Merge pull request  [containerd#4147](containerd#4147) from thaJeztah/1.3_backport_bump_bbolt
* [`fd2c9e381d`](containerd@fd2c9e3) Correct logic of FIFO cleanup
* [`ab89e63c6d`](containerd@ab89e63) Move isFifo from process/io to sys/ and make public
* [`5e9289d4e5`](containerd@5e9289d) Add version numbers for newly tagged repos
* [`4584e7188d`](containerd@4584e71) Update containerd/console vendor for fix
* [`af94dd5f2f`](containerd@af94dd5) Bump containerd console for os.File changes
* [`f74d8a02dd`](containerd@f74d8a0) vendor: update go.etcd.io/bbolt v1.3.4
* [`62b6623a7a`](containerd@62b6623) Merge pull request  [containerd#4143](containerd#4143) from thaJeztah/1.3_reformat_vendor
* [`eac9dc265c`](containerd@eac9dc2) Merge pull request  [containerd#4144](containerd#4144) from thaJeztah/1.3_backport_fix_manpages
* [`57f41a2aad`](containerd@57f41a2) man: move ctr.1, containerd-config to section 8, and fix generation
* [`d1c534916b`](containerd@d1c5349) Makefile: man page: rename containerd.1 to containerd.8
* [`359470201d`](containerd@3594702) vendor.conf: reformat to use columns, and pin by git-commit
* [`001eb3f9af`](containerd@001eb3f) vendor: sort and group vendor.conf
* [`3a4acfbc99`](containerd@3a4acfb) Merge pull request  [containerd#4126](containerd#4126) from chavafg/topic/vendor-cri-1.3
* [`52ca69eb14`](containerd@52ca69e) vendor containerd/cri f864905c93b97db15503c217dc9a43eb65670b53
* [`be54fd9f08`](containerd@be54fd9) Merge pull request  [containerd#4104](containerd#4104) from dims/backport-notify-socket-support
* [`3dc58c824f`](containerd@3dc58c8) avoiding bumping go-systemd dependency
* [`f714035202`](containerd@f714035) Support NOTIFY_SOCKET
* [`b955b149f6`](containerd@b955b14) Merge pull request  [containerd#4069](containerd#4069) from thaJeztah/1.3_backport_bump_golang_1.13
* [`50e5e156ca`](containerd@50e5e15) Merge pull request  [containerd#4065](containerd#4065) from thaJeztah/1.3_backport_namespace_path
* [`59e7ae1993`](containerd@59e7ae1) Update Golang 1.13.8
* [`b512c23a47`](containerd@b512c23) Update Golang 1.13.7 (CVE-2020-0601, CVE-2020-7919)
* [`420a25f120`](containerd@420a25f) Update Golang 1.13.6
* [`60596e52eb`](containerd@60596e5) Update Golang 1.13.5
* [`d8b28e86bc`](containerd@d8b28e8) Update to Golang 1.13.4
* [`bde860b04e`](containerd@bde860b) Revert "Update Golang 1.12.14"
* [`0dbc3d1fcf`](containerd@0dbc3d1) Revert "Update Golang 1.12.15"
* [`dde0ab66c5`](containerd@dde0ab6) Revert "Update Golang 1.12.16 (CVE-2020-0601, CVE-2020-7919)"
* [`b9254dd4cd`](containerd@b9254dd) Revert "Update Golang 1.12.17"
* [`c090014b44`](containerd@c090014) fix killall when use pidnamespace
* [`449e926990`](containerd@449e926) Merge pull request  [containerd#4054](containerd#4054) from fuweid/cp13-4048
* [`e71c7d0d27`](containerd@e71c7d0) bugfix: cleanup dangling shim by brand new context
* [`2d8cc40512`](containerd@2d8cc40) Merge pull request  [containerd#4038](containerd#4038) from thaJeztah/1.3_update_mailmap
* [`a2d1cbf627`](containerd@a2d1cbf) Update .mailmap with changes from master
* [`5811bc9702`](containerd@5811bc9) Merge pull request  [containerd#4036](containerd#4036) from fuweid/cp13-246a560e
* [`de5b1b83ba`](containerd@de5b1b8) script: use github.com/kubernetes-sigs/cri-tools directly
* [`2bd094daec`](containerd@2bd094d) Merge pull request  [containerd#4030](containerd#4030) from thaJeztah/1.3_bump_golang_1.12.17
* [`6a3416449e`](containerd@6a34164) Update Golang 1.12.17
* [`9fcd35a786`](containerd@9fcd35a) Merge pull request  [containerd#4029](containerd#4029) from estesp/cp-1.3-4022
* [`571a231e07`](containerd@571a231) Merge pull request  [containerd#4027](containerd#4027) from estesp/cp-1.3-4017
* [`9a428a3c9e`](containerd@9a428a3) Fix incorrect comment from copy/paste of starting script
* [`09b3b4fcc8`](containerd@09b3b4f) Set octet-stream content-type on put request
* [`c4697a803e`](containerd@c4697a8) Merge pull request  [containerd#4007](containerd#4007) from awprice/issue-3868-backport
* [`37b9a347a2`](containerd@37b9a34) Improve host fallback behaviour in docker remote

* [`9f1c62d`](containerd/cgroups@9f1c62d) Merge pull request  [containerd#156](containerd/cgroups#156) from mxpv/bug-fix
* [`6725ffd`](containerd/cgroups@6725ffd) [release/1.1 backport] throttle.* metrics must be kept for non-CFQ schedulers

* [`8375c34`](containerd/console@8375c34) Merge pull request  [#34](containerd/console#34) from sipsma/close-once
* [`38c5469`](containerd/console@38c5469) Only close epoller FD at most once.
* [`02ecf6a`](containerd/console@02ecf6a) Merge pull request  [#33](containerd/console#33) from ulyssessouza/add-file-interface
* [`f652dc3`](containerd/console@f652dc3) Add File interface instead of using os.File
* [`53a0f1d`](containerd/console@53a0f1d) Merge pull request  [#32](containerd/console#32) from estesp/check-vendor
* [`6214f20`](containerd/console@6214f20) Add vendor check now that content is vendored
* [`4b1ac2b`](containerd/console@4b1ac2b) Merge pull request  [#31](containerd/console#31) from TwinProduction/master
* [`55928bd`](containerd/console@55928bd) Enable vendoring

* [`f864905c`](containerd/cri@f864905) Merge pull request  [containerd#1420](containerd/cri#1420) from chavafg/topic/fix-tests-go1.13
* [`98a694ed`](containerd/cri@98a694e) Fix integration test for golang 1.13

* **github.com/containerd/cgroups**  c4b9ac5 -> 9f1c62dddf4b
* **github.com/containerd/console**  0650fd9eeb50 -> v1.0.0
* **github.com/containerd/cri**      50b9e10ea54a -> f864905c93b9
* **github.com/docker/go-events**    9461782956ad -> e31b211e4f1c

Previous release can be found at [v1.3.3](https://github.com/containerd/containerd/releases/tag/v1.3.3)
  • Loading branch information
kevpar committed Oct 26, 2020
2 parents 36d136c + 814b795 commit 158c4c0
Show file tree
Hide file tree
Showing 296 changed files with 51,144 additions and 30,000 deletions.
3 changes: 2 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ clone_folder: c:\gopath\src\github.com\containerd\containerd
branches:
only:
- master
- /release\/.*/

environment:
GOPATH: C:\gopath
CGO_ENABLED: 1
matrix:
- GO_VERSION: 1.13.4
- GO_VERSION: 1.13.10

before_build:
- choco install -y mingw --version 5.3.0
Expand Down
53 changes: 47 additions & 6 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -1,38 +1,76 @@
Abhinandan Prativadi <abhi@docker.com>
Abhinandan Prativadi <abhi@docker.com> <aprativadi@gmail.com>
Ace-Tang <aceapril@126.com>
Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> <suda.akihiro@lab.ntt.co.jp>
Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> <suda.kyoto@gmail.com>
Allen Sun <shlallen1990@gmail.com> <allensun@AllenSundeMacBook-Pro.local>
Alexander Morozov <lk4d4math@gmail.com> <lk4d4@docker.com>
Amit Krishnan <krish.amit@gmail.com> <amit.krishnan@oracle.com>
Andrei Vagin <avagin@virtuozzo.com> <avagin@openvz.org>
Andrey Kolomentsev <andrey.kolomentsev@gmail.com>
Arnaud Porterie <icecrime@gmail.com>
Arnaud Porterie <icecrime@gmail.com> <arnaud.porterie@docker.com>
Bob Mader <swapdisk@users.noreply.github.com>
Boris Popovschi <zyqsempai@mail.ru>
Brent Baude <bbaude@redhat.com>
Cao Zhihao <caozhihao@163.com>
Cao Zhihao <caozhihao@163.com> <caozhihao.xd@bytedance.com>
Carlos Eduardo <me@carlosedp.com> <me@carlosedp.com>
Cristian Staretu <cristian.staretu@gmail.com>
Cristian Staretu <cristian.staretu@gmail.com> <unclejack@users.noreply.github.com>
Daniel Dao <dqminh89@gmail.com>
Edgar Lee <edgarl@netflix.com> <edgar.lee@docker.com>
Eric Ren <renzhen.rz@alibaba-linux.com> <renzhen.rz@alibaba-inc.com>
Fahed Dorgaa <fahed.dorgaa@gmail.com>
Frank Yang <yyb196@gmail.com>
Fupan Li <lifupan@gmail.com>
Georgia Panoutsakopoulou <gpanoutsak@gmail.com>
Guangming Wang <guangming.wang@daocloud.io>
Haiyan Meng <haiyanmeng@google.com>
Harry Zhang <harryz@hyper.sh> <harryzhang@zju.edu.cn>
Hu Shuai <hus.fnst@cn.fujitsu.com>
Hu Shuai <hus.fnst@cn.fujitsu.com> <hushuaiia@qq.com>
Jaana Burcu Dogan <burcujdogan@gmail.com> <jbd@golang.org>
Jess Valarezo <valarezo.jessica@gmail.com>
Jess Valarezo <valarezo.jessica@gmail.com> <jessica.valarezo@docker.com>
Jian Liao <jliao@alauda.io>
Jian Liao <jliao@alauda.io> <liaojian@Dabllo.local>
Ji'an Liu <anthonyliu@zju.edu.cn>
Jie Zhang <iamkadisi@163.com>
John Howard <john.howard@microsoft.com> <jhoward@microsoft.com>
John Howard <john.howard@microsoft.com> <jhowardmsft@users.noreply.github.com>
John Howard <github@lowenna.com>
John Howard <github@lowenna.com> <john.howard@microsoft.com>
John Howard <github@lowenna.com> <jhoward@microsoft.com>
John Howard <github@lowenna.com> <jhowardmsft@users.noreply.github.com>
Luc Perkins <lucperkins@gmail.com>
Julien Balestra <julien.balestra@datadoghq.com>
Justin Cormack <justin.cormack@docker.com> <justin@specialbusservice.com>
Justin Terry <juterry@microsoft.com>
Justin Terry <juterry@microsoft.com> <jterry75@users.noreply.github.com>
Kenfe-Mickaël Laventure <mickael.laventure@gmail.com>
Kevin Kern <kaiwentan@harmonycloud.cn>
Kevin Xu <cming.xu@gmail.com>
Kohei Tokunaga <ktokunaga.mail@gmail.com>
Krasi Georgiev <krasi.root@gmail.com> <krasi@vip-consult.solutions>
Lantao Liu <lantaol@google.com>
Lantao Liu <lantaol@google.com> <taotaotheripper@gmail.com>
Lifubang <lifubang@aliyun.com> <lifubang@acmcoder.com>
Lu Jingxiao <lujingxiao@huawei.com>
Maksym Pavlenko <makpav@amazon.com> <pavlenko.maksym@gmail.com>
Mario Hros <spam@k3a.me>
Mario Hros <spam@k3a.me> <root@k3a.me>
Mark Gordon <msg555@gmail.com>
Michael Katsoulis <michaelkatsoulis88@gmail.com>
Mike Brown <brownwm@us.ibm.com> <mikebrow@users.noreply.github.com>
Nishchay Kumar <mrawesomenix@gmail.com>
Oliver Stenbom <oliver@stenbom.eu> <ostenbom@pivotal.io>
Phil Estes <estesp@gmail.com> <estesp@linux.vnet.ibm.com>
Reid Li <reid.li@utexas.edu>
Ross Boucher <rboucher@gmail.com>
Ruediger Maass <ruediger.maass@de.ibm.com>
Rui Cao <ruicao@alauda.io> <ruicao@alauda.io>
Sakeven Jiang <jc5930@sina.cn>
Seth Pellegrino <spellegrino@newrelic.com> <30441101+sethp-nr@users.noreply.github.com>
Shengbo Song <thomassong@tencent.com>
Stephen J Day <stevvooe@gmail.com> <stephen.day@getcruise.com>
Stephen J Day <stevvooe@gmail.com> <stevvooe@users.noreply.github.com>
Stephen J Day <stevvooe@gmail.com> <stephen.day@docker.com>
Expand All @@ -42,8 +80,11 @@ Tõnis Tiigi <tonistiigi@gmail.com>
Wei Fu <fuweid89@gmail.com> <fhfuwei@163.com>
Xiaodong Zhang <a4012017@sina.com>
Xuean Yan <yan.xuean@zte.com.cn>
Yue Zhang <zy675793960@yeah.net>
Yuxing Liu <starnop@163.com>
zhenguang zhu <zhengguang.zhu@daocloud.io>
zhongming chang<zhongming.chang@daocloud.io>
zhoulin xie <zhoulin.xie@daocloud.io>
zhoulin xie <zhoulin.xie@daocloud.io> <42261994+JoeWrightss@users.noreply.github.com>
Zhang Wei <zhangwei555@huawei.com>
Zhenguang Zhu <zhengguang.zhu@daocloud.io>
Zhongming Chang<zhongming.chang@daocloud.io>
Zhoulin Xie <zhoulin.xie@daocloud.io>
Zhoulin Xie <zhoulin.xie@daocloud.io> <42261994+JoeWrightss@users.noreply.github.com>
张潇 <xiaozhang0210@hotmail.com>
26 changes: 13 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ os:
- linux

go:
- "1.13.4"
- "1.13.10"

env:
- TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic
- TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic
- TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic
- TRAVIS_GOOS=darwin TRAVIS_CGO_ENABLED=0
- TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic GOPROXY=direct
- TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic TRAVIS_RELEASE=yes GOPROXY=direct
- TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic GOPROXY=direct
- TRAVIS_GOOS=darwin TRAVIS_CGO_ENABLED=0 GOPROXY=direct

matrix:
include:
# Skip testing previous LTS (Xenial / Ubuntu 16.04 LTS) on pull requests
- if: type != pull_request
os: linux
dist: xenial
env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=xenial
env: TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=xenial GOPROXY=direct

go_import_path: github.com/containerd/containerd

Expand Down Expand Up @@ -59,9 +59,9 @@ install:
- if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-runc ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-cni ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-critools ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then wget https://github.com/checkpoint-restore/criu/archive/v3.12.tar.gz -O /tmp/criu.tar.gz ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then wget https://github.com/checkpoint-restore/criu/archive/v3.13.tar.gz -O /tmp/criu.tar.gz ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then tar -C /tmp/ -zxf /tmp/criu.tar.gz ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then cd /tmp/criu-3.12 && sudo make install-criu ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then cd /tmp/criu-3.13 && sudo make install-criu ; fi
- cd $TRAVIS_BUILD_DIR

before_script:
Expand All @@ -73,18 +73,19 @@ script:
- DCO_VERBOSITY=-q ../project/script/validate/dco
- ../project/script/validate/fileheader ../project/
- travis_wait ../project/script/validate/vendor
- GOOS=linux script/setup/install-dev-tools
- GOOS=linux GO111MODULE=off script/setup/install-dev-tools
- go build -i .
- make check
- if [ "$GOOS" = "linux" ]; then make check-protos check-api-descriptors; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then make man ; fi
- make build
- make binaries
- if [ "$TRAVIS_GOOS" = "linux" ]; then sudo make install ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then make coverage ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make root-coverage ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make integration ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make integration EXTRA_TESTFLAGS=-no-criu ; fi
# Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759
- if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH TESTFLAGS_PARALLEL=1 make integration ; fi
- if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH TESTFLAGS_PARALLEL=1 make integration EXTRA_TESTFLAGS=-no-criu ; fi
- |
if [ "$TRAVIS_GOOS" = "linux" ]; then
sudo mkdir -p /etc/containerd
Expand All @@ -106,8 +107,7 @@ after_success:
- bash <(curl -s https://codecov.io/bash) -F linux

before_deploy:
- make release
- if [ "$TRAVIS_GOOS" = "linux" ]; then make cri-release; fi
- if [ "$TRAVIS_RELEASE" = "yes" ]; then make release cri-release; fi

deploy:
- provider: releases
Expand Down
23 changes: 18 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,14 @@ TEST_REQUIRES_ROOT_PACKAGES=$(filter \
done | sort -u) \
)

ifdef SKIPTESTS
PACKAGES:=$(filter-out ${SKIPTESTS},${PACKAGES})
TEST_REQUIRES_ROOT_PACKAGES:=$(filter-out ${SKIPTESTS},${TEST_REQUIRES_ROOT_PACKAGES})
endif

# Project binaries.
COMMANDS=ctr containerd containerd-stress
MANPAGES=ctr.1 containerd.1 containerd-config.1 containerd-config.toml.5
MANPAGES=ctr.8 containerd.8 containerd-config.8 containerd-config.toml.5

ifdef BUILDTAGS
GO_BUILDTAGS = ${BUILDTAGS}
Expand Down Expand Up @@ -111,7 +116,7 @@ GO_GCFLAGS=$(shell \
BINARIES=$(addprefix bin/,$(COMMANDS))

# Flags passed to `go test`
TESTFLAGS ?= $(TESTFLAGS_RACE)
TESTFLAGS ?= $(TESTFLAGS_RACE) $(EXTRA_TESTFLAGS)
TESTFLAGS_PARALLEL ?= 8

.PHONY: clean all AUTHORS build binaries test integration generate protos checkprotos coverage ci check help install uninstall vendor release mandir install-man genman
Expand Down Expand Up @@ -203,11 +208,19 @@ man: mandir $(addprefix man/,$(MANPAGES))
mandir:
@mkdir -p man

genman: FORCE
go run cmd/gen-manpages/main.go man/
# Kept for backwards compatability
genman: man/containerd.8 man/ctr.8

man/containerd.8: FORCE
@echo "$(WHALE) $@"
go run cmd/gen-manpages/main.go $(@F) $(@D)

man/ctr.8: FORCE
@echo "$(WHALE) $@"
go run cmd/gen-manpages/main.go $(@F) $(@D)

man/%: docs/man/%.md FORCE
@echo "$(WHALE) $<"
@echo "$(WHALE) $@"
go-md2man -in "$<" -out "$@"

define installmanpage
Expand Down
7 changes: 4 additions & 3 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ The current state is available in the following table:
| [0.1](https://github.com/containerd/containerd/releases/tag/v0.1.0) | End of Life | Mar 21, 2016 | - |
| [0.2](https://github.com/containerd/containerd/tree/v0.2.x) | End of Life | Apr 21, 2016 | December 5, 2017 |
| [1.0](https://github.com/containerd/containerd/releases/tag/v1.0.3) | End of Life | December 5, 2017 | December 5, 2018 |
| [1.1](https://github.com/containerd/containerd/releases/tag/v1.1.7) | Extended | April 23, 2018 | October 23, 2019 |
| [1.2](https://github.com/containerd/containerd/releases/tag/v1.2.6) | Active | October 24, 2018 | max(October 24, 2019, release of 1.3.0 + 6 months) |
| [1.3](https://github.com/containerd/containerd/milestone/20) | Next | TBD | max(TBD+1 year, release of 1.4.0 + 6 months) |
| [1.1](https://github.com/containerd/containerd/releases/tag/v1.1.8) | Extended | April 23, 2018 | October 23, 2019 |
| [1.2](https://github.com/containerd/containerd/releases/tag/v1.2.10) | Active | October 24, 2018 | March 26, 2020 |
| [1.3](https://github.com/containerd/containerd/releases/tag/v1.3.0) | Active | September 26, 2019 | max(September 26, 2020, release of 1.4.0 + 6 months) |
| [1.4](https://github.com/containerd/containerd/milestone/27) | Next | TBD | max(TBD+1 year, release of 1.5.0 + 6 months) |

Note that branches and release from before 1.0 may not follow these rules.

Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ func init() {
flag.StringVar(&address, "address", defaultAddress, "The address to the containerd socket for use in the tests")
flag.BoolVar(&noDaemon, "no-daemon", false, "Do not start a dedicated daemon for the tests")
flag.BoolVar(&noCriu, "no-criu", false, "Do not run the checkpoint tests")
flag.Parse()
}

func testContext(t testing.TB) (context.Context, context.CancelFunc) {
Expand All @@ -67,6 +66,7 @@ func testContext(t testing.TB) (context.Context, context.CancelFunc) {
}

func TestMain(m *testing.M) {
flag.Parse()
if testing.Short() {
os.Exit(m.Run())
}
Expand Down
4 changes: 4 additions & 0 deletions cmd/containerd/command/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ can be used and modified as necessary as a custom configuration.`
}
serve(ctx, l, server.ServeGRPC)

if err := notifyReady(ctx); err != nil {
log.G(ctx).WithError(err).Warn("notify ready failed")
}

log.G(ctx).Infof("containerd successfully booted in %fs", time.Since(start).Seconds())
<-done
return nil
Expand Down
4 changes: 4 additions & 0 deletions cmd/containerd/command/main_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ func handleSignals(ctx context.Context, signals chan os.Signal, serverC chan *se
case unix.SIGPIPE:
continue
default:
if err := notifyStopping(ctx); err != nil {
log.G(ctx).WithError(err).Error("notify stopping failed")
}

if server == nil {
close(done)
return
Expand Down
5 changes: 5 additions & 0 deletions cmd/containerd/command/main_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ func handleSignals(ctx context.Context, signals chan os.Signal, serverC chan *se
server = s
case s := <-signals:
log.G(ctx).WithField("signal", s).Debug("received signal")

if err := notifyStopping(ctx); err != nil {
log.G(ctx).WithError(err).Error("notify stopping failed")
}

if server == nil {
close(done)
return
Expand Down
62 changes: 62 additions & 0 deletions cmd/containerd/command/notify_linux.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// +build linux

/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package command

import (
"context"
"os"

sd "github.com/coreos/go-systemd/daemon"

"github.com/containerd/containerd/log"
)

const (
// SdNotifyReady tells the service manager that service startup is finished
// or the service finished loading its configuration.
SdNotifyReady = "READY=1"

// SdNotifyStopping tells the service manager that the service is beginning
// its shutdown.
SdNotifyStopping = "STOPPING=1"
)

// notifyReady notifies systemd that the daemon is ready to serve requests
func notifyReady(ctx context.Context) error {
return sdNotify(ctx, SdNotifyReady)
}

// notifyStopping notifies systemd that the daemon is about to be stopped
func notifyStopping(ctx context.Context) error {
return sdNotify(ctx, SdNotifyStopping)
}

func sdNotify(ctx context.Context, state string) error {
if os.Getenv("NOTIFY_SOCKET") != "" {
notified, err := sd.SdNotify(false, state)
log.G(ctx).
WithError(err).
WithField("notified", notified).
WithField("state", state).
Debug("sd notification")
return err
}

return nil
}
31 changes: 31 additions & 0 deletions cmd/containerd/command/notify_unsupported.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// +build !linux

/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package command

import (
"context"
)

func notifyReady(ctx context.Context) error {
return nil
}

func notifyStopping(ctx context.Context) error {
return nil
}
2 changes: 1 addition & 1 deletion cmd/containerd/command/service_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func serviceFlags() []cli.Flag {
return nil
}

// applyPlatformFlags applys platform-specific flags.
// applyPlatformFlags applies platform-specific flags.
func applyPlatformFlags(context *cli.Context) {
}

Expand Down
Loading

0 comments on commit 158c4c0

Please sign in to comment.