Skip to content

Windows Daemon should respect DOCKER_TMPDIR - #35077

Merged
yongtang merged 1 commit into
moby:masterfrom
ryansimmen:35076-WindowsDaemonTmpDir
Oct 20, 2017
Merged

yongtang merged 1 commit into
moby:masterfrom
ryansimmen:35076-WindowsDaemonTmpDir

Conversation

@ryansimmen

Copy link
Copy Markdown
Contributor

- What I did
Fixes #35076 by instructing the windows daemon to utilize the tmp directory under data-root and respect DOCKER_TMPDIR if it exists.

- How I did it
Leveraged Windows TMP and TEMP environment variables.

- How to verify it

  1. Install Docker for Windows
  2. Pull a large image
  3. Observe disk activity via Resource Monitor

- Description for the changelog
Bug fix: Windows Daemon will now utilize the tmp directory under data-root and respect DOCKER_TMPDIR if it exists instead of leveraging the Temp directory under C:\Windows.

@darstahl

darstahl commented Oct 6, 2017 •

Copy link
Copy Markdown
Contributor

@jhowardmsft @johnstep PTAL

hcsshim uses Golang's built in tmpdir utilities, which create a tmp dir at the env TMP location during layer extraction. This doesn't currently respect Moby's tmpdir settings.

This would also fix any other dependencies using Golang's built in tmpdir utilities.

Note that Golang will not attempt to create TMP if it does not exist (layer extraction will fail in this case). We might want to add a check here to either bail out if TMP doesn't exist, create it, or not set TMP if DOCKER_TMPDIR does not exist.

@lowenna

lowenna commented Oct 6, 2017

Copy link
Copy Markdown
Member

LGTM. But agree with @darrenstahlmsft that it might be good to stat the directory/create it if it doesn't exist, or error out if it doesn't exist. I don't think it matters which though.

@ryansimmen

Copy link
Copy Markdown
Contributor Author

@jhowardmsft the code will now create the directory if it does not exist and error out if it cannot create it.

@ryansimmen ryansimmen closed this Oct 19, 2017
@ryansimmen ryansimmen reopened this Oct 19, 2017
Signed-off-by: Ryan Simmen <ryan.simmen@gmail.com>

@yongtang yongtang left a comment

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.

LGTM

@yongtang
yongtang merged commit ab0eb8f into moby:master Oct 20, 2017
@ryansimmen
ryansimmen deleted the 35076-WindowsDaemonTmpDir branch October 24, 2017 14:22
@PatrickLang

Copy link
Copy Markdown

We need to get this into a new EE release. Azure VMs are deploying with a 30GB C:, but 100GB D: . Many customers are putting DOCKER_ROOT on d: because there is more space available, its faster & cheaper. d: is local SSD storage so its perfect for non-persistent container storage

@thaJeztah

Copy link
Copy Markdown
Member

@PatrickLang I can add an internal tracking issue for that, but catch up on slack internally to discuss prioritisation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows Daemon utilizes C:\Windows\Temp and does not respect DOCKER_TMPDIR

7 participants