-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
Add AWS logs driver awslogs-create-stream option doc #20928
base: main
Are you sure you want to change the base?
Add AWS logs driver awslogs-create-stream option doc #20928
Conversation
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
7e01c26
to
e25b910
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, ptal @thaJeztah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall LGTM
I left some considerations / ramblings, but would be fine with bringing this in as-is.
@@ -127,6 +127,30 @@ $ docker run \ | |||
> Your AWS IAM policy must include the `logs:CreateLogGroup` permission before | |||
> you attempt to use `awslogs-create-group`. | |||
|
|||
### awslogs-create-stream | |||
|
|||
By default, the log driver will attempt to create the AWS CloudWatch Logs stream to be used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking; we try to avoid future tense in our docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅 should be addressed in 4c60d76
By default, the log driver will attempt to create the AWS CloudWatch Logs stream to be used | ||
for container log persistence. | ||
|
||
To disable AWS CloudWatch Logs stream creation, set `awslogs-create-stream` to `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also non-blocking; try to use active voice where possible; e.g. this could be "Set awslogs-create-stream
to false
to disable AWS CloudWatch Logs stream creation."
> [!NOTE] | ||
> | ||
> By disabling log stream creation, the Docker daemon assumes the log stream configured via | ||
> `awslogs-stream` option or a log stream of the container ID (default) already exists. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens in situations where the option is disabled, and the logstream doesn't exist? Does it produce an error? (and if so; perhaps slightly less relevant; does the error get returned when creating or starting the container?)
I was slightly pondering if we could somehow roll this note up into the text above (trying to avoid too many "notes"), but not sure if that's a good option;
Set awslogs-create-stream to false to disable AWS CloudWatch Logs stream creation. If
this option is disabled, the Docker daemon assumes the log stream configured ....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah my intent was to shout-out this could be a foot gun for folks if there is no other mechanism handling log stream creation. Let me to try to find the error message that will appear in Docker logs so we can be explicit in the messaging.
42c6ba3
e25b910
to
42c6ba3
Compare
Signed-off-by: Austin Vazquez <[email protected]>
42c6ba3
to
4c60d76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
If disabled and log stream does not exist, then log persistence to CloudWatch will fail during container run time | ||
with `Failed to put log events` error messages in daemon logs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If disabled and log stream does not exist, then log persistence to CloudWatch will fail during container run time | |
with `Failed to put log events` error messages in daemon logs. | |
If `awslogs-create-stream` is set to `false` and the log stream does not exist, | |
log persistence to CloudWatch fails during container runtime, resulting in | |
`Failed to put log events` error messages in the daemon logs. |
Description
Adds documentation for AWS CloudWatch Logs driver
awslogs-create-stream
option (added in moby/moby#42132)Related issues or tickets
Reviews
@vbhatt91
@swagatbora90