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

Add AWS logs driver awslogs-create-stream option doc #20928

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

austinvazquez
Copy link
Contributor

@austinvazquez austinvazquez commented Sep 18, 2024

Description

Adds documentation for AWS CloudWatch Logs driver awslogs-create-stream option (added in moby/moby#42132)

Related issues or tickets

Reviews

@vbhatt91
@swagatbora90

  • Technical review
  • Editorial review
  • Product review

Copy link

netlify bot commented Sep 18, 2024

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 4c60d76
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/66eb86027e23a000083f232b
😎 Deploy Preview https://deploy-preview-20928--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

dvdksn
dvdksn previously approved these changes Sep 18, 2024
Copy link
Contributor

@dvdksn dvdksn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, ptal @thaJeztah

thaJeztah
thaJeztah previously approved these changes Sep 18, 2024
Copy link
Member

@thaJeztah thaJeztah left a 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
Copy link
Member

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.

Copy link
Contributor Author

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`.
Copy link
Member

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."

Comment on lines 149 to 153
> [!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.

Copy link
Member

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 ....

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/engine Issue affects Docker engine/daemon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants