Skip to content

Conversation

@thaJeztah
Copy link
Member

relates to #39402

Windows RS5 builds started to fail recently;

15:20:17 INFO: Extracting git...
15:20:31 INFO: Expanding go...
15:20:36 Remove-Item : Cannot find path 'C:\go\' because it does not exist.
15:20:36 At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Arch
15:20:36 ive\Microsoft.PowerShell.Archive.psm1:411 char:46
15:20:36 + ...                 $expandedItems | % { Remove-Item $_ -Force -Recurse }
15:20:36 +                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15:20:36     + CategoryInfo          : ObjectNotFound: (C:\go\:String) [Remove-Item], I
15:20:36    temNotFoundException
15:20:36     + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.Remov
15:20:36    eItemCommand
15:20:36

That error looks to be triggered by the step downloading Go;

moby/Dockerfile.windows

Lines 214 to 215 in 6f446d0

Write-Host INFO: Downloading go...; `
Download-File $('https://golang.org/dl/go'+$Env:GO_VERSION+'.windows-amd64.zip') C:\go.zip; `

Write-Host INFO: Downloading go...; `
Download-File $('https://golang.org/dl/go'+$Env:GO_VERSION+'.windows-amd64.zip') C:\go.zip; `

The codepath that is causing the actual error is in;
https://github.com/PowerShell/Microsoft.PowerShell.Archive/blob/v1.0.0.0/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psm1#L400-L408

And is only triggered if extracting the archive fails:

if($isArchiveFileProcessingComplete -eq $false)
{
    if($expandedItems.Count -gt 0)
    {
        # delete the expanded file/directory as the archive
        # file was not completly expanded.
        $expandedItems | % { Remove-Item $_ -Force -Recurse }
    }
}

Trying to download the previous version of Go to check if there's something different
with the archive we're downloading.

Signed-off-by: Sebastiaan van Stijn github@gone.nl

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah
Copy link
Member Author

thaJeztah commented Jun 24, 2019

Interesting; it now fails when downloading Git; https://jenkins.dockerproject.org/job/Docker-PRs-WoW-RS5-Process/2810/console

16:54:48 INFO: Extracting git...
16:55:08 Remove-Item : Cannot find path 'C:\git-tmp\_rels' because it does not exist.
16:55:08 At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Arch
16:55:08 ive\Microsoft.PowerShell.Archive.psm1:411 char:46
16:55:08 + ...                 $expandedItems | % { Remove-Item $_ -Force -Recurse }
16:55:08 +                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16:55:08     + CategoryInfo          : ObjectNotFound: (C:\git-tmp\_rels:String) [Remov 
16:55:08    e-Item], ItemNotFoundException
16:55:08     + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.Remov 
16:55:08    eItemCommand
16:55:08  

Wonder if it's some networking issue

@thaJeztah
Copy link
Member Author

Changing to use -Force;

Expand-Archive C:\go.zip -DestinationPath C:\ -Force;

Now produces a different error:

17:13:45 INFO: Expanding go...
17:13:58 �[91mRemove-Item : Access is denied
17:13:58 �[0m�[91mAt C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Arch
17:13:58 �[0m�[91mive\Microsoft.PowerShell.Archive.psm1:411 char:46
17:13:58 + ...                 $expandedItems | % { Remove-Item $_ -Force -Recurse }
17:13:58 �[0m�[91m+                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17:13:58     + CategoryInfo          : PermissionDenied: (C:\go\:String) [Remove-Item], 
17:13:58 �[0m�[91m    UnauthorizedAccessException
17:13:58     + FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.Powe 
17:13:58    rShell.Commands.RemoveItemCommand
17:13:58 �[0m�[91m 
17:13:59 �[0m

Possibly because it tries to remove C:\ (which would obviously fail)

@thaJeztah thaJeztah force-pushed the fix_rs5_powershell branch from cf56bf5 to d6c920d Compare June 24, 2019 17:24
@codecov
Copy link

codecov bot commented Jun 24, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@baa0040). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #39403   +/-   ##
=========================================
  Coverage          ?   37.32%           
=========================================
  Files             ?      609           
  Lines             ?    45197           
  Branches          ?        0           
=========================================
  Hits              ?    16869           
  Misses            ?    26039           
  Partials          ?     2289

@thaJeztah
Copy link
Member Author

thaJeztah commented Jun 24, 2019

Removed the -Force again; trying Go 1.12.5 again

edit: argh

17:25:56 ERROR: Failed 'ERROR: Mismatched GO versions between Dockerfile and Dockerfile.windows. Update your PR to ensure that both files are updated and in sync. 1.12.6 1.12.5' at 06/24/2019 17:25:56
17:25:56 At C:\gopath\src\github.com\docker\docker\hack\ci\windows.ps1:448 char:9
17:25:56 +         Throw "ERROR: Mismatched GO versions between Dockerfile and D ...

@thaJeztah thaJeztah force-pushed the fix_rs5_powershell branch from d6c920d to c740d46 Compare June 24, 2019 17:30
@thaJeztah
Copy link
Member Author

thaJeztah commented Jun 24, 2019

Same with Go 1.12.5; trying the same approach as Git now (temp directory, then move)

edit: no luck there

trying ADD <go download url> - perhaps something weird is happening with the downloads

@thaJeztah thaJeztah force-pushed the fix_rs5_powershell branch from c740d46 to 27782da Compare June 24, 2019 17:35
Windows RS5 builds started to fail recently;

```
15:20:17 INFO: Extracting git...
15:20:31 INFO: Expanding go...
15:20:36 Remove-Item : Cannot find path 'C:\go\' because it does not exist.
15:20:36 At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Arch
15:20:36 ive\Microsoft.PowerShell.Archive.psm1:411 char:46
15:20:36 + ...                 $expandedItems | % { Remove-Item $_ -Force -Recurse }
15:20:36 +                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15:20:36     + CategoryInfo          : ObjectNotFound: (C:\go\:String) [Remove-Item], I
15:20:36    temNotFoundException
15:20:36     + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.Remov
15:20:36    eItemCommand
15:20:36
```

That error looks to be triggered by the step downloading Go;
https://github.com/moby/moby/blob/6f446d041bfd690856e63e1515d0d9514f9b684a/Dockerfile.windows#L214-L215

```
Write-Host INFO: Downloading go...; `
Download-File $('https://golang.org/dl/go'+$Env:GO_VERSION+'.windows-amd64.zip') C:\go.zip; `
```

The codepath that is causing the actual error is in;
https://github.com/PowerShell/Microsoft.PowerShell.Archive/blob/v1.0.0.0/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psm1#L400-L408

And is only triggered if extracting the archive fails:

```powershell
if($isArchiveFileProcessingComplete -eq $false)
{
    if($expandedItems.Count -gt 0)
    {
        # delete the expanded file/directory as the archive
        # file was not completly expanded.
        $expandedItems | % { Remove-Item $_ -Force -Recurse }
    }
}
```

Trying to download the previous version of Go to check if there's something different
with the archive we're downloading.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the fix_rs5_powershell branch from 27782da to 62f5bd3 Compare June 24, 2019 17:39
@thaJeztah
Copy link
Member Author

OK, that worked, so looks like Download-File is broken when downloading Go 🤔

17:40:48 INFO: Extracting git...
17:41:00 INFO: Expanding go...
17:41:24 INFO: Expanding compiler 1 of 3...
17:41:25 INFO: Expanding compiler 2 of 3...

@thaJeztah
Copy link
Member Author

Wondering if it's because a redirect isn't followed;

* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 302 
< date: Mon, 24 Jun 2019 18:02:30 GMT
< content-type: text/html; charset=utf-8
< content-length: 74
< location: https://dl.google.com/go/go1.12.6.windows-amd64.zip
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< via: 1.1 google
< alt-svc: quic=":443"; ma=2592000; v="46,44,43,39"
< 

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the fix_rs5_powershell branch from 3c4be78 to f0092a8 Compare June 24, 2019 18:06
@thaJeztah
Copy link
Member Author

Changed to use the redirect URL, but that doesn't solve the issue;


18:07:25 INFO: Expanding go...
18:07:30 Remove-Item : Cannot find path 'C:\go\' because it does not exist.
18:07:30 At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Arch
18:07:30 ive\Microsoft.PowerShell.Archive.psm1:411 char:46
18:07:30 + ...                 $expandedItems | % { Remove-Item $_ -Force -Recurse }
18:07:30 +                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18:07:30     + CategoryInfo          : ObjectNotFound: (C:\go\:String) [Remove-Item], I 
18:07:30    temNotFoundException
18:07:30     + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.Remov 
18:07:30    eItemCommand
18:07:30  

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

Hm.. looks like there's a networking issue; I changed to use the mcr.microsoft.com/windows/servercore:1809 image to exclude the possibility there's something wrong with the image that's pre-loaded on the machines, but pulling that image fails:

18:24:52 Step 1/7 : FROM mcr.microsoft.com/windows/servercore:1809
18:24:53 1809: Pulling from windows/servercore
18:24:53 65014b3c3121: Pulling fs layer
18:24:53 266cffe9d908: Pulling fs layer
18:24:58 266cffe9d908: Retrying in 5 seconds
18:24:59 266cffe9d908: Retrying in 4 seconds
18:24:59 65014b3c3121: Retrying in 5 seconds
18:25:00 266cffe9d908: Retrying in 3 seconds
18:25:00 65014b3c3121: Retrying in 4 seconds
18:25:01 266cffe9d908: Retrying in 2 seconds
18:25:01 65014b3c3121: Retrying in 3 seconds
18:25:02 266cffe9d908: Retrying in 1 second
18:25:02 65014b3c3121: Retrying in 2 seconds
18:25:03 266cffe9d908: Retrying in 10 seconds
18:25:03 65014b3c3121: Retrying in 1 second
18:25:04 266cffe9d908: Retrying in 9 seconds
18:25:04 65014b3c3121: Retrying in 10 seconds
18:25:05 266cffe9d908: Retrying in 8 seconds
18:25:05 65014b3c3121: Retrying in 9 seconds
18:25:06 266cffe9d908: Retrying in 7 seconds
18:25:06 65014b3c3121: Retrying in 8 seconds
18:25:07 266cffe9d908: Retrying in 6 seconds

@thaJeztah
Copy link
Member Author

So.. changing the base image worked;

21:54:40 Step 1/7 : FROM mcr.microsoft.com/windows/servercore:1809
21:54:40 1809: Pulling from windows/servercore
21:54:41 65014b3c3121: Pulling fs layer
21:54:41 266cffe9d908: Pulling fs layer
21:54:49 266cffe9d908: Download complete
21:55:06 65014b3c3121: Verifying Checksum
21:55:06 65014b3c3121: Download complete
21:57:27 65014b3c3121: Pull complete
21:59:52 266cffe9d908: Pull complete
21:59:52 Digest: sha256:370afa846b124b4674257e193352b38c65790ef75bce27418da0738fa208e66a
21:59:52 Status: Downloaded newer image for mcr.microsoft.com/windows/servercore:1809
...

21:59:59 INFO: Downloading git...
22:00:00 INFO: Downloading go...
22:00:02 INFO: Downloading compiler 1 of 3...
22:00:03 INFO: Downloading compiler 2 of 3...
22:00:03 INFO: Downloading compiler 3 of 3...
22:00:04 INFO: Extracting git...
22:00:17 INFO: Expanding go...
22:00:39 INFO: Expanding compiler 1 of 3...
22:00:41 INFO: Expanding compiler 2 of 3...
22:00:46 INFO: Expanding compiler 3 of 3...
22:00:47 INFO: Removing downloaded files...

And it fails on the image that's preloaded on the machine;

21:54:13 INFO: Running in C:\gopath\src\github.com\docker\docker
21:54:13 INFO: docker/docker repository was found
21:54:13 INFO: Image microsoft/windowsservercore:latest is already loaded in the control daemon
21:54:13 INFO: Version of microsoft/windowsservercore:latest is '10.0.17763.437'
21:54:13 INFO: Docker version of control daemon

...

22:05:33 INFO: Loading windowsservercore .tar from disk into the daemon under test. This may take some time...
22:07:59 Loaded image: microsoft/windowsservercore:10.0.17763.437
22:07:59 Loaded image: microsoft/windowsservercore:latest
22:07:59 INFO: docker load of windowsservercore  into daemon under test completed successfully
22:07:59 INFO: Version of microsoft/windowsservercore:latest is '10.0.17763.437'

So looks like that image is broken

@thaJeztah
Copy link
Member Author

Checking the what version the 1809 image is, and looks like that's more recent than the one that's preloaded (10.0.17763.557 versus 10.0.17763.437)

docker manifest inspect mcr.microsoft.com/windows/servercore:1809 
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 945,
         "digest": "sha256:1daf90c37624fb4abe9556a0d2b8852d866ec62e9696d381a4000ae56c74c362",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.17763.557"
         }
      }
   ]
}

This reverts commit f0092a8.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

Reverting the URL change to confirm that it's indeed an issue with the image

@thaJeztah
Copy link
Member Author

Ok; build still succeeds, so looks to be an issue with that base image?

This reverts commit 62f5bd3.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@ddebroy
Copy link
Contributor

ddebroy commented Jul 2, 2019

It appears the issue is specific to one of the VMs: azure-windows-rs5-1. Could it be running out of temp disk space or something along the lines of that? The CI jobs on azure-windows-rs5-2 seem to go through smooth with identical version strings wrt the images.

@thaJeztah
Copy link
Member Author

interesting; odd that we kept hitting those broken nodes then 😞

I'll close this for now; thanks!

@thaJeztah thaJeztah closed this Jul 2, 2019
@thaJeztah thaJeztah deleted the fix_rs5_powershell branch July 18, 2019 23:34
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.

3 participants