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

fc-collect-garbage: fix user switching issues, logging #1284

Draft
wants to merge 1 commit into
base: fc-24.11-dev
Choose a base branch
from

Conversation

dpausp
Copy link
Member

@dpausp dpausp commented Feb 12, 2025

@flyingcircusio/release-managers

Release process

  • Created changelog entry using ./changelog.sh

PR release workflow (internal)

  • PR has internal ticket
  • internal issue ID (PL-…) part of branch name
  • internal issue ID mentioned in PR description text
  • ticket is on Platform agile board
  • ticket state set to Pull request ready
  • if ticket is more urgent than within the next few days, directly contact a member of the Platform team

Design notes

  • Provide a feature toggle if the change might need to be adjusted/reverted quickly depending on context. Consider whether the default should be on or off. Example: rate limiting.
  • All customer-facing features and (NixOS) options need to be discoverable from documentation. Add or update relevant documentation such that hosted and guided customers can understand it as well.

Security implications

@@ -6,7 +6,7 @@
with builtins;

let
cfg = config.flyingcircus;
cfg = config.flyingcircus.agent;
fclib = config.fclib;
log = "/var/log/fc-collect-garbage.log";
Copy link
Member Author

Choose a reason for hiding this comment

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

this is actually a stamp file which is read by sensu

# The invocation ID is normally set by systemd when the script is called
# from a systemd unit.
invocation_id = os.environ.get("INVOCATION_ID")
if invocation_id:
formatted_dt = datetime.now().strftime("%Y-%m-%dT%H_%m_%S")
cmd_log_file_name = (
logdir / f"fc-agent/{formatted_dt}_build-output"
f"_{invocation_id}.log"
logdir / f"{formatted_dt}_{log_name}_{invocation_id}.log"
Copy link
Member Author

Choose a reason for hiding this comment

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

we have to clean up old log files, they are not included in the current systemd tmpfiles rules

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.

1 participant