Skip to content
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

config: add port 5986 to windows default reserved ports #1577

Merged
merged 1 commit into from
Sep 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ additional details on each available environment variable.
| Environment Key | Example Value(s) | Description | Default value on Linux | Default value on Windows |
|:----------------|:----------------------------|:------------|:-----------------------|:-------------------------|
| `ECS_CLUSTER` | clusterName | The cluster this agent should check into. | default | default |
| `ECS_RESERVED_PORTS` | `[22, 80, 5000, 8080]` | An array of ports that should be marked as unavailable for scheduling on this container instance. | `[22, 2375, 2376, 51678, 51679]` | `[53, 135, 139, 445, 2375, 2376, 3389, 5985, 51678, 51679]`
| `ECS_RESERVED_PORTS` | `[22, 80, 5000, 8080]` | An array of ports that should be marked as unavailable for scheduling on this container instance. | `[22, 2375, 2376, 51678, 51679]` | `[53, 135, 139, 445, 2375, 2376, 3389, 5985, 5986, 51678, 51679]`
| `ECS_RESERVED_PORTS_UDP` | `[53, 123]` | An array of UDP ports that should be marked as unavailable for scheduling on this container instance. | `[]` | `[]` |
| `ECS_ENGINE_AUTH_TYPE` | "docker" | "dockercfg" | The type of auth data that is stored in the `ECS_ENGINE_AUTH_DATA` key. | | |
| `ECS_ENGINE_AUTH_DATA` | See the [dockerauth documentation](https://godoc.org/github.com/aws/amazon-ecs-agent/agent/dockerclient/dockerauth) | Docker [auth data](https://godoc.org/github.com/aws/amazon-ecs-agent/agent/dockerclient/dockerauth) formatted as defined by `ECS_ENGINE_AUTH_TYPE`. | | |
Expand Down
9 changes: 6 additions & 3 deletions agent/config/config_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ const (
rpcPort = 135
// Server Message Block (SMB) over TCP
smbPort = 445
// Windows Remote Management (WinRM) listener
winRMPort = 5985
// HTTP port for Windows Remote Management (WinRM) listener
winRMPortHTTP = 5985
// HTTPS port for Windows Remote Management (WinRM) listener
winRMPortHTTPS = 5986
// DNS client
dnsPort = 53
// NetBIOS over TCP/IP
Expand Down Expand Up @@ -66,7 +68,8 @@ func DefaultConfig() Config {
rdpPort,
rpcPort,
smbPort,
winRMPort,
winRMPortHTTP,
winRMPortHTTPS,
dnsPort,
netBIOSPort,
},
Expand Down
5 changes: 3 additions & 2 deletions agent/config/config_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestConfigDefault(t *testing.T) {
assert.Equal(t, "npipe:////./pipe/docker_engine", cfg.DockerEndpoint, "Default docker endpoint set incorrectly")
assert.Equal(t, `C:\ProgramData\Amazon\ECS\data`, cfg.DataDir, "Default datadir set incorrectly")
assert.False(t, cfg.DisableMetrics, "Default disablemetrics set incorrectly")
assert.Equal(t, 10, len(cfg.ReservedPorts), "Default reserved ports set incorrectly")
assert.Equal(t, 11, len(cfg.ReservedPorts), "Default reserved ports set incorrectly")
assert.Equal(t, uint16(0), cfg.ReservedMemory, "Default reserved memory set incorrectly")
assert.Equal(t, 30*time.Second, cfg.DockerStopTimeout, "Default docker stop container timeout set incorrectly")
assert.Equal(t, 8*time.Minute, cfg.ContainerStartTimeout, "Default docker start container timeout set incorrectly")
Expand Down Expand Up @@ -75,7 +75,8 @@ func TestConfigIAMTaskRolesReserves80(t *testing.T) {
rdpPort,
rpcPort,
smbPort,
winRMPort,
winRMPortHTTP,
winRMPortHTTPS,
dnsPort,
netBIOSPort,
httpPort,
Expand Down