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

slogfiles grow without bound, contrary to devops norms a la logrotate #3779

Closed
dckc opened this issue Aug 30, 2021 · 4 comments
Closed

slogfiles grow without bound, contrary to devops norms a la logrotate #3779

dckc opened this issue Aug 30, 2021 · 4 comments
Assignees
Labels
bug Something isn't working cosmic-swingset package: cosmic-swingset
Milestone

Comments

@dckc
Copy link
Member

dckc commented Aug 30, 2021

Describe the bug

By setting $SLOGFILE or $SOLO_SLOGFILE, operators can produce detailed diagnostics about swingset events. Unfortunately, these files grow without bound, which is awkward for the node operators and for data analysis.

Expected behavior

logrotate is a norm for splitting logfiles into manageable pieces.

Ideally, these files would be split on block boundaries.

Additional context

originally noted in #3630

cc @rowgraus @warner @FUDCo

@dckc dckc added bug Something isn't working SwingSet package: SwingSet cosmic-swingset package: cosmic-swingset labels Aug 30, 2021
@dckc dckc self-assigned this Aug 30, 2021
@dckc dckc changed the title slogfiles grow without bound slogfiles grow without bound, contrary to devops norms a la logrotate Sep 8, 2021
@dckc
Copy link
Member Author

dckc commented Sep 8, 2021

@michaelfig I'm inclined to take the SwingSet label off this one, leaving it on the cosmic-swingset agenda.

@dckc dckc removed the SwingSet package: SwingSet label Sep 8, 2021
@dckc
Copy link
Member Author

dckc commented Sep 8, 2021

adding @dtribble in a customer role assignment

@dckc
Copy link
Member Author

dckc commented Oct 4, 2021

In order to investigate what seems like unnecessary round-trips in the governance demo (#3869), I looked into the options here and found a couple that seem workable plus others that I would rather avoid:

named pipe + multilog / svlogd

This option appeals to me:

Have each worker log to stdout, but connect each stdout to a utility that automatically spools and rotates logs based on size or time. multilog and svlogd are examples of such. -- pilcrow Feb '13

add log rotation to swingset slogger with logrotate-stream npm package

logrotate-stream - npm seems to be designed just for this case. It would only need to go in the controller, not the kernel, right?

ad-hoc script with named pipes: let's not

I suppose this is possible...

... but the docs for multilog make it clear that there are lots of corner cases...

file descriptor + systemd: unlikely

I went to flesh out the idea o f using SLOGFILE=&7 to mean: log to file descriptor 7, with the expectation that systemd / journald would listen there and provided log rotation. But I don't see any support for anything like that in systemd.unit docs nor systemd-journald.service.

@Tartuffo Tartuffo assigned michaelfig and unassigned dckc and dtribble Feb 2, 2022
@Tartuffo Tartuffo added MN-1 and removed MN-1 labels Feb 2, 2022
@Tartuffo
Copy link
Contributor

Tartuffo commented Feb 24, 2022

Solved by @michaelfig (Flight Recorder #3742)

@dckc dckc added the duplicate label Feb 24, 2022
@Tartuffo Tartuffo added this to the Mainnet 1 milestone Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cosmic-swingset package: cosmic-swingset
Projects
None yet
Development

No branches or pull requests

4 participants