Skip to content
← Back to activity

Public problem

Huge data loss when deploying refinery configuration without restarting

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Deploying new refinery.toml/rules.toml without restarting the refinery systemd service causes almost total trace loss: traces making it to Honeycomb drop to near zero after config deploy. The service keeps running and live-reload picks up the new rules. Deployment script wrote configs with Ruby's File.write then called systemctl start (a noop when already running).

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The reporter tracked the data loss down to how the config files were written: Ruby's File.write modifies the file in place while refinery's live-reload reads it. Switching the deployment script to cp instead of File.write fixed it, and trace volume returned to normal in the graphs. If your live-reload config deploys are mysteriously breaking sampling, try switching the write to an atomic replacement and see whether the loss disappears.

Source: https://github.com/honeycombio/refinery/issues/384

Source: https://github.com/honeycombio/refinery/issues/384