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

register agent with "none" log driver capability #1041

Merged
merged 4 commits into from
Oct 30, 2017
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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Feature - Support for provisioning Tasks with ENIs
* Enhancement - Support `init` process in containers by adding support for Docker remote API client version 1.25
[#996](https://github.com/aws/amazon-ecs-agent/pull/996)
* Enhancement - Enable 'none' logging driver capability by default
[#1041](https://github.com/aws/amazon-ecs-agent/pull/1041)
* Bug - Fixed a bug where tasks that fail to pull containers can cause the
agent to fail to restore properly after a restart.
[#1033](https://github.com/aws/amazon-ecs-agent/pull/1033)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ configure them as something other than the defaults.
| `ECS_UPDATE_DOWNLOAD_DIR` | /cache | Where to place update tarballs within the container. | | |
| `ECS_DISABLE_METRICS` | <true | false> | Whether to disable metrics gathering for tasks. | false | true |
| `ECS_RESERVED_MEMORY` | 32 | Memory, in MB, to reserve for use by things other than containers managed by Amazon ECS. | 0 | 0 |
| `ECS_AVAILABLE_LOGGING_DRIVERS` | `["awslogs","fluentd","gelf","json-file","journald","logentries","splunk","syslog"]` | Which logging drivers are available on the container instance. | `["json-file"]` | `["json-file"]` |
| `ECS_AVAILABLE_LOGGING_DRIVERS` | `["awslogs","fluentd","gelf","json-file","journald","logentries","splunk","syslog"]` | Which logging drivers are available on the container instance. | `["json-file","none"]` | `["json-file","none"]` |
| `ECS_DISABLE_PRIVILEGED` | `true` | Whether launching privileged containers is disabled on the container instance. | `false` | `false` |
| `ECS_SELINUX_CAPABLE` | `true` | Whether SELinux is available on the container instance. | `false` | `false` |
| `ECS_APPARMOR_CAPABLE` | `true` | Whether AppArmor is available on the container instance. | `false` | `false` |
Expand Down
1 change: 1 addition & 0 deletions agent/app/agent_capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const (
// com.amazonaws.ecs.capability.logging-driver.fluentd
// com.amazonaws.ecs.capability.logging-driver.journald
// com.amazonaws.ecs.capability.logging-driver.gelf
// com.amazonaws.ecs.capability.logging-driver.none
// com.amazonaws.ecs.capability.selinux
// com.amazonaws.ecs.capability.apparmor
// com.amazonaws.ecs.capability.ecr-auth
Expand Down
2 changes: 1 addition & 1 deletion agent/config/config_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func DefaultConfig() Config {
DataDirOnHost: "/var/lib/ecs",
DisableMetrics: false,
ReservedMemory: 0,
AvailableLoggingDrivers: []dockerclient.LoggingDriver{dockerclient.JSONFileDriver},
AvailableLoggingDrivers: []dockerclient.LoggingDriver{dockerclient.JSONFileDriver, dockerclient.NoneDriver},
TaskCleanupWaitDuration: DefaultTaskCleanupWaitDuration,
DockerStopTimeout: DefaultDockerStopTimeout,
CredentialsAuditLogFile: defaultCredentialsAuditLogFile,
Expand Down
3 changes: 2 additions & 1 deletion agent/config/config_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ func TestConfigDefault(t *testing.T) {
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.False(t, cfg.PrivilegedDisabled, "Default PrivilegedDisabled set incorrectly")
assert.Equal(t, []dockerclient.LoggingDriver{dockerclient.JSONFileDriver}, cfg.AvailableLoggingDrivers, "Default logging drivers set incorrectly")
assert.Equal(t, []dockerclient.LoggingDriver{dockerclient.JSONFileDriver, dockerclient.NoneDriver},
cfg.AvailableLoggingDrivers, "Default logging drivers set incorrectly")
assert.Equal(t, 3*time.Hour, cfg.TaskCleanupWaitDuration, "Default task cleanup wait duration set incorrectly")
assert.False(t, cfg.TaskENIEnabled, "TaskENIEnabled set incorrectly")
assert.False(t, cfg.TaskIAMRoleEnabled, "TaskIAMRoleEnabled set incorrectly")
Expand Down
2 changes: 1 addition & 1 deletion agent/config/config_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func DefaultConfig() Config {
// DisableMetrics is set to true on Windows as docker stats does not work
DisableMetrics: true,
ReservedMemory: 0,
AvailableLoggingDrivers: []dockerclient.LoggingDriver{dockerclient.JSONFileDriver},
AvailableLoggingDrivers: []dockerclient.LoggingDriver{dockerclient.JSONFileDriver, dockerclient.NoneDriver},
TaskCleanupWaitDuration: DefaultTaskCleanupWaitDuration,
DockerStopTimeout: DefaultDockerStopTimeout,
CredentialsAuditLogFile: filepath.Join(ecsRoot, defaultCredentialsAuditLogFile),
Expand Down
3 changes: 2 additions & 1 deletion agent/config/config_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ func TestConfigDefault(t *testing.T) {
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.False(t, cfg.PrivilegedDisabled, "Default PrivilegedDisabled set incorrectly")
assert.Equal(t, []dockerclient.LoggingDriver{dockerclient.JSONFileDriver}, cfg.AvailableLoggingDrivers, "Default logging drivers set incorrectly")
assert.Equal(t, []dockerclient.LoggingDriver{dockerclient.JSONFileDriver, dockerclient.NoneDriver},
cfg.AvailableLoggingDrivers, "Default logging drivers set incorrectly")
assert.Equal(t, 3*time.Hour, cfg.TaskCleanupWaitDuration, "Default task cleanup wait duration set incorrectly")
assert.False(t, cfg.TaskIAMRoleEnabled, "TaskIAMRoleEnabled set incorrectly")
assert.False(t, cfg.TaskIAMRoleEnabledForNetworkHost, "TaskIAMRoleEnabledForNetworkHost set incorrectly")
Expand Down
2 changes: 1 addition & 1 deletion agent/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ type Config struct {
DockerStopTimeout time.Duration

// AvailableLoggingDrivers specifies the logging drivers available for use
// with Docker. If not set, it defaults to ["json-file"].
// with Docker. If not set, it defaults to ["json-file","none"].
AvailableLoggingDrivers []dockerclient.LoggingDriver

// PrivilegedDisabled specified whether the Agent is capable of launching
Expand Down
2 changes: 2 additions & 0 deletions agent/engine/dockerclient/logging_drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const (
SplunklogsDriver LoggingDriver = "splunk"
LogentriesDriver LoggingDriver = "logentries"
SumoLogicDriver LoggingDriver = "sumologic"
NoneDriver LoggingDriver = "none"
)

var LoggingDriverMinimumVersion = map[LoggingDriver]DockerVersion{
Expand All @@ -37,4 +38,5 @@ var LoggingDriverMinimumVersion = map[LoggingDriver]DockerVersion{
SplunklogsDriver: Version_1_22,
LogentriesDriver: Version_1_25,
SumoLogicDriver: Version_1_29,
NoneDriver: Version_1_19,
}