Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 13 additions & 85 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions auraed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ tokio-stream = { version = "0.1.17", features = ["net", "sync"] }
tonic = { workspace = true, features = ["tls-ring"] }
tonic-health = { workspace = true }
tracing = { workspace = true, features = ["log"] }
tracing-subscriber = { version = "0.3", features = ["env-filter", "registry"] }
tracing-subscriber = { version = "0.3", features = ["env-filter", "json", "registry"] }
uuid = { workspace = true }
validation = { workspace = true, features = ["regex", "tonic"] }
validation_macros = { path = "../crates/validation/macros" }
Expand All @@ -89,10 +89,8 @@ seccompiler = "0.4.0"

[dev-dependencies]
futures-util = { workspace = true }
multi_log = "0.1.2"
pretty_assertions = "1.3.0"
serial_test = { workspace = true }
simplelog = "0.12.0"
simple_test_case = "1.1.0"
test-helpers = { workspace = true }
test-helpers-macros = { workspace = true }
Expand Down
7 changes: 7 additions & 0 deletions auraed/src/ebpf/perf_buffer_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ pub trait PerfBufferReader<T: Clone + Send + 'static> {
}
};

// Clear cached readiness after an empty read so the next
// call to `readable_mut` waits for more events.
if events.read == 0 && events.lost == 0 {
guard.clear_ready();
continue;
}

if events.lost > 0 {
error!(
"buffer full, dropped {} perf events - this should never happen!",
Expand Down
9 changes: 8 additions & 1 deletion auraed/src/graceful_shutdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
* SPDX-License-Identifier: Apache-2.0 *
\* -------------------------------------------------------------------------- */

use crate::{VmService, cells::CellService, discovery::DiscoveryService};
use crate::{
VmService, cells::CellService, discovery::DiscoveryService,
observe::ObserveService,
};
use proto::{
cells::cell_service_server::CellServiceServer,
discovery::discovery_service_server::DiscoveryServiceServer,
Expand All @@ -31,6 +34,7 @@ pub(crate) struct GracefulShutdown {
health_reporter: HealthReporter,
cell_service: CellService,
vm_service: VmService,
observe_service: ObserveService,
shutdown_broadcaster: Sender<()>,
}

Expand All @@ -39,12 +43,14 @@ impl GracefulShutdown {
health_reporter: HealthReporter,
cell_service: CellService,
vm_service: VmService,
observe_service: ObserveService,
) -> Self {
let (tx, _) = channel(());
Self {
health_reporter,
cell_service,
vm_service,
observe_service,
shutdown_broadcaster: tx,
}
}
Expand Down Expand Up @@ -82,6 +88,7 @@ impl GracefulShutdown {

// health_reporter.set_not_serving::<PodServiceServer<PodService>>().await;

self.observe_service.shutdown_log_streams();
self.shutdown_broadcaster.send_replace(());
// wait for all subscribers to drop
self.shutdown_broadcaster.closed().await;
Expand Down
Loading