Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
rcgoodfellow committed May 27, 2023
1 parent 41e4a1a commit 81c6c8c
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 23 deletions.
11 changes: 11 additions & 0 deletions .github/buildomat/jobs/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ _exit_trap() {
standalone \
dump-state
pfexec /opt/oxide/opte/bin/opteadm list-ports
z_swadm link ls
z_swadm addr list
z_swadm route list
z_swadm arp list

PORTS=$(pfexec /opt/oxide/opte/bin/opteadm list-ports | tail +2 | awk '{ print $1; }')
for p in $PORTS; do
LAYERS=$(pfexec /opt/oxide/opte/bin/opteadm list-layers -p $p | tail +2 | awk '{ print $1; }')
Expand All @@ -67,10 +72,16 @@ _exit_trap() {
pfexec zlogin "$z" arp -an
done

pfexec zlogin softnpu cat /softnpu.log

exit $status
}
trap _exit_trap EXIT

z_swadm () {
pfexec zlogin oxz_switch /opt/oxide/dendrite/bin/swadm $@
}

#
# XXX work around 14537 (UFS should not allow directories to be unlinked) which
# is probably not yet fixed in xde branch? Once the xde branch merges from
Expand Down
45 changes: 32 additions & 13 deletions nexus/src/app/rack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ impl super::Nexus {
let loopback_address_params = LoopbackAddressCreate {
address_lot: NameOrId::Name(address_lot_name.clone()),
rack_id,
switch_location,
switch_location: switch_location.clone(),
address: first_address,
mask: 64,
};
Expand All @@ -344,14 +344,26 @@ impl super::Nexus {
Error::internal_error(&format!("unable to retrieve authz_address_lot for infra address_lot: {e}"))
})?;

self.db_datastore
.loopback_address_create(
opctx,
&loopback_address_params,
None,
&authz_address_lot,
)
.await?;
if self
.loopback_address_lookup(
&opctx,
rack_id,
switch_location.into(),
first_address.into(),
)?
.lookup_for(authz::Action::Read)
.await
.is_err()
{
self.db_datastore
.loopback_address_create(
opctx,
&loopback_address_params,
None,
&authz_address_lot,
)
.await?;
}

let body = Ipv6Entry {
addr: Ipv6Addr::from_str("fd00:99::1").map_err(|e| {
Expand All @@ -374,7 +386,7 @@ impl super::Nexus {
})?;

let identity = IdentityMetadataCreateParams {
name,
name: name.clone(),
description: "initial uplink configuration".to_string(),
};

Expand Down Expand Up @@ -431,9 +443,16 @@ impl super::Nexus {
RouteConfig { routes: vec![route] },
);

self.db_datastore
.switch_port_settings_create(opctx, &port_settings_params)
.await?;
if self
.db_datastore
.switch_port_settings_get(opctx, &name.into())
.await
.is_err()
{
self.db_datastore
.switch_port_settings_create(opctx, &port_settings_params)
.await?;
}

let mut dpd_port_settings = PortSettings {
tag: NEXUS_DPD_TAG.into(),
Expand Down
12 changes: 6 additions & 6 deletions package-manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ only_for_targets.image = "standard"
# 2. Copy dendrite.tar.gz from dendrite/out to omicron/out
source.type = "prebuilt"
source.repo = "dendrite"
source.commit = "9ddb6420ed198e225c53c9f55599345c7c194fa1"
source.sha256 = "d12446730e609560a44bfced4803b80b46e8fb4d0815fd8125c01c33f4567183"
source.commit = "746b53dc06d95829307efe211011018f845205cf"
source.sha256 = "86e046be3b2d24bedceb46da5f9a0bc736cb0ffde5176444fe8fefb9b661a37b"
output.type = "zone"
output.intermediate_only = true

Expand All @@ -325,8 +325,8 @@ only_for_targets.image = "standard"
# 2. Copy the output zone image from dendrite/out to omicron/out
source.type = "prebuilt"
source.repo = "dendrite"
source.commit = "9ddb6420ed198e225c53c9f55599345c7c194fa1"
source.sha256 = "f09b4d7da6e1008a5d5f1fd46ce41acb6623afd6650913910048ad221c638787"
source.commit = "746b53dc06d95829307efe211011018f845205cf"
source.sha256 = "fcfcb25b93ee392821a3427645acb2d901f65b418f8132004be7471ee6f5644a"
output.type = "zone"
output.intermediate_only = true

Expand All @@ -343,8 +343,8 @@ only_for_targets.image = "standard"
# 2. Copy dendrite.tar.gz from dendrite/out to omicron/out/dendrite-softnpu.tar.gz
source.type = "prebuilt"
source.repo = "dendrite"
source.commit = "9ddb6420ed198e225c53c9f55599345c7c194fa1"
source.sha256 = "748732e4d23e9063ac087c723320c6b8f8b806b45270e276344f6cec31a2e7b0"
source.commit = "746b53dc06d95829307efe211011018f845205cf"
source.sha256 = "b540fc95746e80dacac20dde0578884849f4ef86a98fb9f5154231bcbdcbadde"
output.type = "zone"
output.intermediate_only = true

Expand Down
2 changes: 1 addition & 1 deletion tools/create_virtual_hardware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function enable_softnpu {
exit 1
}
zlogin softnpu pgrep softnpu || {
zlogin softnpu /stuff/softnpu /stuff/softnpu.toml &
zlogin softnpu 'RUST_LOG=debug /stuff/softnpu /stuff/softnpu.toml &> /softnpu.log &'
}
success "softnpu started"
}
Expand Down
2 changes: 1 addition & 1 deletion tools/dendrite_openapi_version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
COMMIT="9ddb6420ed198e225c53c9f55599345c7c194fa1"
COMMIT="746b53dc06d95829307efe211011018f845205cf"
SHA2="4073eeb768014d6073ba18a7b7b12b2f767467969bf69217f19ff2b974debd51"
4 changes: 2 additions & 2 deletions tools/dendrite_stub_checksums
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CIDL_SHA256_ILLUMOS="d12446730e609560a44bfced4803b80b46e8fb4d0815fd8125c01c33f4567183"
CIDL_SHA256_LINUX_DPD="61d947fb8cffbc1b9e477398e354b59223d74ab5374f0d8f93aa4096c42bb136"
CIDL_SHA256_ILLUMOS="86e046be3b2d24bedceb46da5f9a0bc736cb0ffde5176444fe8fefb9b661a37b"
CIDL_SHA256_LINUX_DPD="96367a835dd9436a530df3b1beb647184cd506f95b6ed8b78e78162c50085dc1"
CIDL_SHA256_LINUX_SWADM="fa4a8725d86d56ff179f0b8c943c87b4e618e5baa497a705d81c80a668003248"

0 comments on commit 81c6c8c

Please sign in to comment.