Skip to content

Commit

Permalink
fix(guestos): initialize basic firewall upon ic-replica start.
Browse files Browse the repository at this point in the history
  • Loading branch information
DFINITYManu committed Feb 14, 2024
1 parent bdf8b3b commit d7569f0
Show file tree
Hide file tree
Showing 10 changed files with 271 additions and 150 deletions.
2 changes: 1 addition & 1 deletion rs/monitoring/context_logger/src/lib.rs
Expand Up @@ -34,7 +34,7 @@ pub trait Logger<T>: Clone {
///
/// Methods of this trait should not be used directly, instead use the macros
/// found in macros.rs
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct ContextLogger<C, L>
where
C: Clone + Default,
Expand Down
1 change: 1 addition & 0 deletions rs/monitoring/logger/src/replica_logger.rs
Expand Up @@ -26,6 +26,7 @@ impl From<LogEntryLogger> for ReplicaLogger {
}

/// Logs `LogEntry`s using `slog`
#[derive(Debug)]
pub struct LogEntryLogger {
pub root: slog::Logger,
// Only logs at `level` or above
Expand Down
1 change: 1 addition & 0 deletions rs/orchestrator/BUILD.bazel
Expand Up @@ -69,6 +69,7 @@ rust_binary(
deps = [
":lib",
"//rs/async_utils",
"//rs/monitoring/logger",
"@crate_index//:clap",
"@crate_index//:tokio",
],
Expand Down
2 changes: 1 addition & 1 deletion rs/orchestrator/src/args.rs
Expand Up @@ -85,7 +85,7 @@ impl OrchestratorArgs {

/// Parse `self.replica_config_file` and persist in
/// [`TempDir`][tempfile::TempDir] "ic_config"
pub(crate) fn get_ic_config(&self) -> Config {
pub fn get_ic_config(&self) -> Config {
let tmpdir = tempfile::Builder::new()
.prefix("ic_config")
.tempdir()
Expand Down
6 changes: 1 addition & 5 deletions rs/orchestrator/src/error.rs
Expand Up @@ -5,7 +5,7 @@ use ic_types::{registry::RegistryClientError, NodeId, RegistryVersion, ReplicaVe
use std::error::Error;
use std::fmt;
use std::io;
use std::path::{Path, PathBuf};
use std::path::PathBuf;

pub type OrchestratorResult<T> = Result<T, OrchestratorError>;

Expand Down Expand Up @@ -67,10 +67,6 @@ pub enum OrchestratorError {
}

impl OrchestratorError {
pub(crate) fn file_write_error(file_path: &Path, e: io::Error) -> Self {
OrchestratorError::IoError(format!("Failed to write to file: {:?}", file_path), e)
}

pub(crate) fn invalid_configuration_error(msg: impl ToString) -> Self {
OrchestratorError::InvalidConfigurationError(msg.to_string())
}
Expand Down

0 comments on commit d7569f0

Please sign in to comment.