Skip to content

Commit

Permalink
Remove Nexus dependency on Sled Agent (#1158)
Browse files Browse the repository at this point in the history
  • Loading branch information
smklein authored Jun 3, 2022
1 parent e2bd1e8 commit 5dd6448
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

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

3 changes: 3 additions & 0 deletions common/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ pub const DNS_PORT: u16 = 53;
pub const DNS_SERVER_PORT: u16 = 5353;
pub const SLED_AGENT_PORT: u16 = 12345;

/// The port propolis-server listens on inside the propolis zone.
pub const PROPOLIS_PORT: u16 = 12400;

// Anycast is a mechanism in which a single IP address is shared by multiple
// devices, and the destination is located based on routing distance.
//
Expand Down
3 changes: 0 additions & 3 deletions nexus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ features = [ "usdt-probes" ]
[dependencies.omicron-common]
path = "../common"

[dependencies.omicron-sled-agent]
path = "../sled-agent"

[dependencies.oximeter]
version = "0.1.0"
path = "../oximeter/oximeter"
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/db/model/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use crate::db::schema::{disk, instance};
use crate::external_api::params;
use chrono::{DateTime, Utc};
use db_macros::Resource;
use omicron_common::address::PROPOLIS_PORT;
use omicron_common::api::external;
use omicron_common::api::internal;
use omicron_sled_agent::common::instance::PROPOLIS_PORT;
use std::net::SocketAddr;
use uuid::Uuid;

Expand Down
3 changes: 0 additions & 3 deletions sled-agent/src/common/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ use omicron_common::api::external::InstanceState;
use omicron_common::api::internal::nexus::InstanceRuntimeState;
use propolis_client::api::InstanceState as PropolisInstanceState;

/// The port propolis-server listens on inside the propolis zone.
pub const PROPOLIS_PORT: u16 = 12400;

/// Action to be taken on behalf of state transition.
#[derive(Clone, Debug, PartialEq)]
pub enum Action {
Expand Down
5 changes: 2 additions & 3 deletions sled-agent/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

//! API for controlling a single instance.
use crate::common::instance::{
Action as InstanceAction, InstanceStates, PROPOLIS_PORT,
};
use crate::common::instance::{Action as InstanceAction, InstanceStates};
use crate::illumos::running_zone::{
InstalledZone, RunCommandError, RunningZone,
};
Expand All @@ -23,6 +21,7 @@ use crate::params::{
};
use anyhow::anyhow;
use futures::lock::{Mutex, MutexGuard};
use omicron_common::address::PROPOLIS_PORT;
use omicron_common::api::internal::nexus::InstanceRuntimeState;
use omicron_common::backoff;
use propolis_client::api::DiskRequest;
Expand Down

0 comments on commit 5dd6448

Please sign in to comment.