-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create zone bundles from ZFS snapshots
- Fixes #4010 - Previously, we copied log files directly out of their original locations, which meant we contended with several other components: `logadm` rotating the log file; the log archiver moving the to longer-term storage; and the program writing to the file itself. This commit changes the operation of the bundler, to first create a ZFS snapshot of the filesystem(s) containing the log files, clone them, and then copy files out of the clones. We destroy those clones / snapshots after completing, and when the sled-agent starts to help with crash-safety.
- Loading branch information
Showing
5 changed files
with
743 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
//! Tools for producing metrics from the sled-agent for `oximeter` to collect. | ||
use oximeter_instruments::kstat::foo; | ||
use oximeter_producer::Server as ProducerServer; | ||
|
||
pub struct MetricsManager { | ||
producer_server: ProducerServer, | ||
kstats: foo::KstatSampler, | ||
} | ||
|
||
// Spawn a task to manage all the metrics, people can send messages to register | ||
// new kstat-based targets / metrics. | ||
// | ||
// Questions: | ||
// | ||
// - How do we "unregister" anything? Do we? Or maybe just detect when the kstat | ||
// is gone? That'll work for VNICs, and we don't want to unregister physical | ||
// link stats. | ||
// | ||
// - Does this produce _all_ metrics for the sled agent? That makes the | ||
// interface trickier, if it's using message-passing. |
Oops, something went wrong.