Skip to content

Windows: require Windows Server RS5 / ltsc2019 (build 17763) as minimum#43254

Merged
thaJeztah merged 2 commits into
moby:masterfrom
thaJeztah:windows_rs5_minimum
Feb 18, 2022
Merged

Windows: require Windows Server RS5 / ltsc2019 (build 17763) as minimum#43254
thaJeztah merged 2 commits into
moby:masterfrom
thaJeztah:windows_rs5_minimum

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented Feb 17, 2022

Windows Server 2016 (RS1) reached end of support, and Docker Desktop requires
Windows 10 V19H2 (version 1909, build 18363) as a minimum.

This patch makes Windows Server RS5 / ltsc2019 (build 17763) the minimum version
to run the daemon, and removes some hacks for older versions of Windows.

There is one check remaining that checks for Windows RS3 for a workaround
on older versions, but recent changes in Windows seemed to have regressed
on the same issue, so I kept that code for now to check if we may need that
workaround (again) (see #43145);

// TODO: For RS3, we can remove the retries. Also consider
// using platform APIs (if available) to get this more succinctly. Also
// consider enhancing the Remove() interface to have context of why
// the remove is being called - that could improve efficiency by not
// enumerating compute systems during a remove of a container as it's
// not required.
computeSystems, err = hcsshim.GetContainers(hcsshim.ComputeSystemQuery{})
if err != nil {
if osversion.Build() >= osversion.RS3 {
return err
}
if (err == hcsshim.ErrVmcomputeOperationInvalidState) || (err == hcsshim.ErrVmcomputeOperationAccessIsDenied) {
if retryCount >= 500 {
break
}
retryCount++
time.Sleep(10 * time.Millisecond)
continue
}
return err
}
break
}

- Description for the changelog

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

@thaJeztah
Copy link
Copy Markdown
Member Author

For reviewers; the changes in libnetwork remove some if conditions, which causes a lot of whitespace changes; to review the changes without whitespace changes, add ?w=1 to the URL; https://github.com/moby/moby/pull/43254/files?w=1

@thaJeztah thaJeztah force-pushed the windows_rs5_minimum branch 2 times, most recently from 3c0c926 to 1c09a1f Compare February 17, 2022 17:50
Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Copy Markdown
Member Author

One failure that could be related (if so, probably due to the second commit); I'll run ci again to see if it's possibly just a flaky, but otherwise will fix;

=== RUN   TestDockerSuite/TestWindowsRunAsSystem
    docker_cli_run_test.go:4410: assertion failed: 
        Command:  /usr/local/cli/docker run --net=none --user=nt authority\system --hostname=XYZZY scratch cmd /c @echo %USERNAME%
        ExitCode: 125
        Error:    exit status 125
        Stdout:   
        Stderr:   Unable to find image 'scratch:latest' locally
        /usr/local/cli/docker: Error response from daemon: 'scratch' is a reserved name.
        See '/usr/local/cli/docker run --help'.
        
        
        Failures:
        ExitCode was 125 expected 0
        Expected no error
    --- FAIL: TestDockerSuite/TestWindowsRunAsSystem (0.02s)


// Verifies that running as local system is operating correctly on Windows
func (s *DockerSuite) TestWindowsRunAsSystem(c *testing.T) {
testRequires(c, DaemonIsWindowsAtLeastBuild(osversion.RS3))
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting; so this is the test that's failing 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this test was perhaps always skipped (see code below that was removed and mentions we can of use the osversion, because the test binaries are not manifested)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I'm stupid! The failure is not on Windows, but on Linux (Windows failure was TestSlowStdinClosing)

And, look at the error:

Stderr:   Unable to find image 'scratch:latest' locally

So testRequires(c, DaemonIsWindowsAtLeastBuild(osversion.RS3)) was just a lazy way to do two checks at once: "if it's windows" and "if it's RS3 or above".

Removing the line makes it run on Linux as well, and in that case minimalBaseImage() is scratch ;

func getPlatformDefaults(info types.Info, osType string) PlatformDefaults {
volumesPath := filepath.Join(info.DockerRootDir, "volumes")
containersPath := filepath.Join(info.DockerRootDir, "containers")
switch osType {
case "linux":
return PlatformDefaults{
BaseImage: "scratch",
VolumesConfigPath: toSlash(volumesPath),
ContainerStoragePath: toSlash(containersPath),
}

Just too many levels of abstraction, plus somewhat "odd" defaults (the Windows image is runnable, but the Linux one isn't)

Windows Server 2016 (RS1) reached end of support, and Docker Desktop requires
Windows 10 V19H2 (version 1909, build 18363) as a minimum.

This patch makes Windows Server RS5 /  ltsc2019 (build 17763) the minimum version
to run the daemon, and removes some hacks for older versions of Windows.

There is one check remaining that checks for Windows RS3 for a workaround
on older versions, but recent changes in Windows seemed to have regressed
on the same issue, so I kept that code for now to check if we may need that
workaround (again);

https://github.com/moby/moby/blob/085c6a98d54720e70b28354ccec6da9b1b9e7fcf/daemon/graphdriver/windows/windows.go#L319-L341

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Copy Markdown
Member Author

And it's green now! Bringing this one in

@zPhilMc
Copy link
Copy Markdown

zPhilMc commented Jan 6, 2025

This was a silly change to remove support for Server 2016. Server 2016 is NOT end of support/end of life yet.

To explain how support works for Windows Server OS versions (this has always been the way MS supports server OS versions):

Microsoft offers both mainstream and extended support for all of their Server OS versions. End of mainstream support for Server 2016 was in January 2022. That DOES NOT mean that Microsoft has stopped supporting this OS version. End of mainstream support means no more broad feature updates. Official support from Microsoft does not end until the end of the EXTENDED SUPPORT date.

Every Windows Server OS version receives 10 years of support from Microsoft. You can still purchase Server 2016 versions of VMs through Azure to this day. MS still fully supports all systems running Server 2016 to this day.

The end of EXTENDED SUPPORT for Server 2016 is January 12, 2027 (more than 2 years from today). Until that day, Microsoft will continue to release security updates and required patches for Server 2016.

Any chance of rolling back this unnecessary change per the information provided above?

@thaJeztah
Copy link
Copy Markdown
Member Author

No, not likely that this will be reverted. While Microsoft may provide commercial support for longer term support, that doesn't require all (open source) projects to continue supporting it.

GitHub actions does not provide machines for 2016, and neither do the official images on Docker hub docker-library/official-images#11661

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.

4 participants