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

nixos/buildbot: enable configurable rotation of twistd.log files #87861

Open
wants to merge 1 commit into
base: master
from

Conversation

@RomanSharapov
Copy link

RomanSharapov commented May 15, 2020

Motivation for this change

In the current implementation, there's no possibility to modify the default parameters for twistd.log rotation.

By default, twistd daemon rotates log files when they reach 1M and keep all of them what leads to generating a ton of log files in the buildbotDir folder.

In order to avoid disk overflow and have a predictable log rotation, I created this patch which parametrizes log rotation settings and tailors them into buildbot.tac file which is used by twisd daemon.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
In the current implementation, there's no possibility to modify the
default parameters for twistd.log rotation.

By default twistd rotates its log files when they reach 1M and keep
all of them what leads to generating a ton of log files in the buildbotDir
folder.

In order to avoid disk overflow and have a predictable log rotation,
I created this patch  which parametrizes log rotation settings and
tailors them into buildbot.tac file which is used by twisd daemon.
@virusdave
Copy link
Contributor

virusdave commented May 15, 2020

@nand0p @Mic92 can you take a look at this?

@virusdave virusdave requested a review from lopsided98 May 15, 2020
@Mic92 Mic92 requested review from Lassulus and makefu May 15, 2020
@lopsided98
Copy link
Contributor

lopsided98 commented May 15, 2020

Buildbot should be configured to not produce twistd.log files, instead logging to stdout (which goes to the journal), so I'm not sure why your instance is producing these log files.

My instance's state directory only contains http.log files, whose rotation can be controlled by options in the buildbot config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.