Skip to content

Commit

Permalink
config: add port 5986 to windows default reserved ports
Browse files Browse the repository at this point in the history
  • Loading branch information
fenxiong committed Sep 17, 2018
1 parent b0819e6 commit 70cee33
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
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

0 comments on commit 70cee33

Please sign in to comment.