Fluentd: add fluentd-request-ack option
This adds a new `fluentd-request-ack` logging option for the Fluentd logging driver. If enabled, the server will respond with an acknowledgement. This option improves the reliability of the message transmission. This change is not versioned, and affects all API versions. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
cc1f3c750e
commit
008fc67974
2 changed files with 16 additions and 0 deletions
|
@ -53,6 +53,7 @@ const (
|
|||
asyncConnectKey = "fluentd-async-connect" // deprecated option (use fluent-async instead)
|
||||
bufferLimitKey = "fluentd-buffer-limit"
|
||||
maxRetriesKey = "fluentd-max-retries"
|
||||
requestAckKey = "fluentd-request-ack"
|
||||
retryWaitKey = "fluentd-retry-wait"
|
||||
subSecondPrecisionKey = "fluentd-sub-second-precision"
|
||||
)
|
||||
|
@ -148,6 +149,7 @@ func ValidateLogOpt(cfg map[string]string) error {
|
|||
case asyncConnectKey:
|
||||
case bufferLimitKey:
|
||||
case maxRetriesKey:
|
||||
case requestAckKey:
|
||||
case retryWaitKey:
|
||||
case subSecondPrecisionKey:
|
||||
// Accepted
|
||||
|
@ -221,6 +223,13 @@ func parseConfig(cfg map[string]string) (fluent.Config, error) {
|
|||
}
|
||||
}
|
||||
|
||||
requestAck := false
|
||||
if cfg[requestAckKey] != "" {
|
||||
if requestAck, err = strconv.ParseBool(cfg[requestAckKey]); err != nil {
|
||||
return config, err
|
||||
}
|
||||
}
|
||||
|
||||
config = fluent.Config{
|
||||
FluentPort: loc.port,
|
||||
FluentHost: loc.host,
|
||||
|
@ -232,6 +241,7 @@ func parseConfig(cfg map[string]string) (fluent.Config, error) {
|
|||
Async: async,
|
||||
AsyncConnect: asyncConnect,
|
||||
SubSecondPrecision: subSecondPrecision,
|
||||
RequestAck: requestAck,
|
||||
}
|
||||
|
||||
return config, nil
|
||||
|
|
|
@ -90,6 +90,12 @@ keywords: "API, Docker, rcli, REST, documentation"
|
|||
option, which remains funtional, but will be removed in a future release. Users
|
||||
are encouraged to use the `fluentd-async` option going forward. This change is
|
||||
not versioned, and affects all API versions if the daemon has this patch.
|
||||
* `POST /containers/create` now accepts a `fluentd-request-ack` option in
|
||||
`HostConfig.LogConfig.Config` when using the Fluentd logging driver. If enabled,
|
||||
the Fluentd logging driver sends the chunk option with a unique ID. The server
|
||||
will respond with an acknowledgement. This option improves the reliability of
|
||||
the message transmission. This change is not versioned, and affects all API
|
||||
versions if the daemon has this patch.
|
||||
* `POST /containers/create`, `GET /containers/{id}/json`, and `GET /containers/json` now supports
|
||||
`BindOptions.NonRecursive`.
|
||||
* `POST /swarm/init` now accepts a `DataPathPort` property to set data path port number.
|
||||
|
|
Loading…
Add table
Reference in a new issue