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

Blocking kube container logs to be sent and some minor changes #4412

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

naiming-zededa
Copy link
Contributor

  • Not sending kube container side of logs, if needed, use collect-info to get the info or logs.
  • kube log directory has changed, adjust various component logging to that

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

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

If we are going to introduce a new /persist/kubelog directory we need to teach all parts of pillar about it (zedagent reports size of directories, onboot ensures there is sufficient space to boot EVE, etc).

Also, do we already manage the size of the existing /persist/newlog/kube using the limit for /persist/newlog? If so, to what value and what code will manage the space for /persist/kubelog?

@naiming-zededa
Copy link
Contributor Author

If we are going to introduce a new /persist/kubelog directory we need to teach all parts of pillar about it (zedagent reports size of directories, onboot ensures there is sufficient space to boot EVE, etc).

Yeh, missed that. add to the patch for the /persist/kubelog in the 'ReportDirPaths'

Also, do we already manage the size of the existing /persist/newlog/kube using the limit for /persist/newlog? If so, to what value and what code will manage the space for /persist/kubelog?

This is handled in the cluster-init.sh

        check_log_file_size "k3s.log"
        check_log_file_size "multus.log"
        check_log_file_size "k3s-install.log"
        check_log_file_size "eve-bridge.log"
        check_log_file_size "containerd-user.log"

we rotate them and keep 3 copies with 5M max to each of them.
and currently the kubelog size range is about 30M-60M

@deitch
Copy link
Contributor

deitch commented Oct 31, 2024

Why are we moving it from /persist/newlog/kube to /persist/kubelog?

@naiming-zededa
Copy link
Contributor Author

Why are we moving it from /persist/newlog/kube to /persist/kubelog?

we first put them inside the 'persist/newlog', since those kubernetes logs does not follow the newlog pattern, and if we want to use 'edgeview' to get the last 15 minutes log, it will get also tons of kuberntes logs. it breaks the way we can precisely getting the time range of newlogs. so we moved it out.

@deitch
Copy link
Contributor

deitch commented Oct 31, 2024

we first put them inside the 'persist/newlog', since those kubernetes logs does not follow the newlog pattern, and if we want to use 'edgeview' to get the last 15 minutes log, it will get also tons of kuberntes logs. it breaks the way we can precisely getting the time range of newlogs

I didn't understand why it does, but it doesn't matter. If you are saying that it breaks it, and we need to move them, good enough. Thanks for explaining.

@naiming-zededa
Copy link
Contributor Author

Also added /persist/kubelog to 'collect-info.sh'

@eriknordmark
Copy link
Contributor

If we are going to introduce a new /persist/kubelog directory we need to teach all parts of pillar about it (zedagent reports size of directories, onboot ensures there is sufficient space to boot EVE, etc).

Yeh, missed that. add to the patch for the /persist/kubelog in the 'ReportDirPaths'

There is also code in pkg/pillar/scripts/onboot.sh with PERSIST_CLEANUPS being a prioritized list of where to cleanup to make sure there is sufficient space for the system containerd (hence pillar, newlogd, etc) being able to start.

 - Not sending kube container side of logs, if needed, use collect-info
   to get the info or logs.
 - kube log directory has changed, adjust various component logging to that

Signed-off-by: Naiming Shen <[email protected]>
@naiming-zededa
Copy link
Contributor Author

There is also code in pkg/pillar/scripts/onboot.sh with PERSIST_CLEANUPS being a prioritized list of where to cleanup to make sure there is sufficient space for the system containerd (hence pillar, newlogd, etc) being able to start.

Got it. updated on this file.

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

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

LGTM

@eriknordmark eriknordmark merged commit 05f2182 into lf-edge:master Nov 6, 2024
30 of 41 checks passed
@naiming-zededa naiming-zededa deleted the naiming-cluster-misc branch November 6, 2024 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants