New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.03.1] Update containerd to version 4ab9917febca54791c5f071a9d1f404867857fcc #31852

Merged
merged 1 commit into from Mar 15, 2017

Conversation

Projects
None yet
5 participants
@mlaventure
Contributor

mlaventure commented Mar 15, 2017

This fixes an issue preventing containerd from starting if the state
directory didn't exist already.

Signed-off-by: Kenfe-Mickael Laventure mickael.laventure@gmail.com

--

diff --git a/containerd/main.go b/containerd/main.go
index 68bdd8e..c9f5bd3 100644
--- a/containerd/main.go
+++ b/containerd/main.go
@@ -157,6 +157,10 @@ func main() {
 }
 
 func daemon(context *cli.Context) error {
+       stateDir := context.String("state-dir")
+       if err := os.MkdirAll(stateDir, 0755); err != nil {
+               return err
+       }
        s := make(chan os.Signal, 2048)
        signal.Notify(s, syscall.SIGTERM, syscall.SIGINT)
        // Split the listen string of the form proto://addr
@@ -171,7 +175,7 @@ func daemon(context *cli.Context) error {
                return err
        }
        sv, err := supervisor.New(
-               context.String("state-dir"),
+               stateDir,
                context.String("runtime"),
                context.String("shim"),
                context.StringSlice("runtime-args"),
diff --git a/supervisor/supervisor.go b/supervisor/supervisor.go
index e1fd5d6..a6700b1 100644
--- a/supervisor/supervisor.go
+++ b/supervisor/supervisor.go
@@ -20,9 +20,6 @@ const (
 // New returns an initialized Process supervisor.
 func New(stateDir string, runtimeName, shimName string, runtimeArgs []string, timeout time.Duration, retainCount int) (*Supervisor, error) {
        startTasks := make(chan *startTask, 10)
-       if err := os.MkdirAll(stateDir, 0755); err != nil {
-               return nil, err
-       }
        machine, err := CollectMachineInformation()
        if err != nil {
                return nil, err
Update containerd to version 4ab9917febca54791c5f071a9d1f404867857fcc
This fixes an issue preventing containerd from starting if the state
directory didn't exist already.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Mar 15, 2017

Member

does it need a mention in the changelog as well?

Member

thaJeztah commented Mar 15, 2017

does it need a mention in the changelog as well?

@mlaventure

This comment has been minimized.

Show comment
Hide comment
@mlaventure

mlaventure Mar 15, 2017

Contributor

@thaJeztah The issue isn't in 17.03.0, it was added by the previous vendoring of containerd

Contributor

mlaventure commented Mar 15, 2017

@thaJeztah The issue isn't in 17.03.0, it was added by the previous vendoring of containerd

@vieux

This comment has been minimized.

Show comment
Hide comment
@vieux

vieux Mar 15, 2017

Collaborator

LGTM

Collaborator

vieux commented Mar 15, 2017

LGTM

@tonistiigi

This comment has been minimized.

Show comment
Hide comment
@tonistiigi

tonistiigi Mar 15, 2017

Member

LGTM

Member

tonistiigi commented Mar 15, 2017

LGTM

@vieux vieux merged commit 3476dbf into moby:17.03.x Mar 15, 2017

5 of 7 checks passed

powerpc Jenkins build Docker-PRs-powerpc 468 has failed
Details
z Jenkins build is being scheduled
Details
dco-signed All commits are signed
experimental Jenkins build Docker-PRs-experimental 31759 has succeeded
Details
janky Jenkins build Docker-PRs 40381 has succeeded
Details
vendor Jenkins build Docker-PRs-vendor 3018 has succeeded
Details
windowsRS1 Jenkins build Docker-PRs-WoW-RS1 11457 has succeeded
Details

@mlaventure mlaventure deleted the mlaventure:update-containerd-17.03 branch Mar 16, 2017

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Apr 1, 2017

Member

Follow up to #31662

Member

thaJeztah commented Apr 1, 2017

Follow up to #31662

runcom added a commit to projectatomic/containerd that referenced this pull request Jan 19, 2018

BACKPORT: Fix BZ#1529300
moby/moby#31662
moby/moby#31852

Signed-off-by: Antonio Murdaca <runcom@redhat.com>

runcom added a commit to projectatomic/containerd that referenced this pull request Jan 19, 2018

BACKPORT: Fix BZ#1529300
moby/moby#31662
moby/moby#31852

Signed-off-by: Antonio Murdaca <runcom@redhat.com>

runcom added a commit to projectatomic/containerd that referenced this pull request Jan 19, 2018

BACKPORT: Fix BZ#1529300
moby/moby#31662
moby/moby#31852

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment