Skip to content

Commit 92258b4

Browse files
authored
deploy 5 CockroachDB nodes from RSS (#3450)
1 parent 3e020c9 commit 92258b4

File tree

7 files changed

+24
-10
lines changed

7 files changed

+24
-10
lines changed

common/src/sql/dbinit.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ CREATE DATABASE omicron;
3434
CREATE USER omicron;
3535
ALTER DEFAULT PRIVILEGES GRANT INSERT, SELECT, UPDATE, DELETE ON TABLES to omicron;
3636

37+
/*
38+
* Configure a replication factor of 5 to ensure that the system can maintain
39+
* availability in the face of any two node failures.
40+
*/
41+
ALTER RANGE default CONFIGURE ZONE USING num_replicas = 5;
42+
3743
/*
3844
* Racks
3945
*/

end-to-end-tests/src/helpers/ctx.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub async fn nexus_addr() -> Result<IpAddr> {
127127
&resolver,
128128
&dns_name,
129129
Duration::from_secs(1),
130-
Duration::from_secs(300),
130+
Duration::from_secs(600),
131131
)
132132
.await
133133
}
@@ -240,7 +240,7 @@ pub async fn build_client() -> Result<oxide_client::Client> {
240240
})
241241
},
242242
&Duration::from_secs(1),
243-
&Duration::from_secs(300),
243+
&Duration::from_secs(600),
244244
)
245245
.await
246246
.context("logging in")?;

internal-dns-cli/src/bin/dnswait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ async fn main() -> Result<()> {
9090
.await
9191
.context("unexpectedly gave up")?;
9292

93-
for ip in result {
94-
println!("{}", ip)
93+
for (target, port) in result {
94+
println!("{}:{}", target, port)
9595
}
9696

9797
Ok(())

internal-dns/src/resolver.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl Resolver {
137137
pub async fn lookup_srv(
138138
&self,
139139
srv: crate::ServiceName,
140-
) -> Result<Vec<String>, ResolveError> {
140+
) -> Result<Vec<(String, u16)>, ResolveError> {
141141
let name = format!("{}.{}", srv.dns_name(), DNS_ZONE);
142142
trace!(self.log, "lookup_srv"; "dns_name" => &name);
143143
let response = self.inner.srv_lookup(&name).await?;
@@ -148,7 +148,10 @@ impl Resolver {
148148
"response" => ?response
149149
);
150150

151-
Ok(response.into_iter().map(|srv| srv.target().to_string()).collect())
151+
Ok(response
152+
.into_iter()
153+
.map(|srv| (srv.target().to_string(), srv.port()))
154+
.collect())
152155
}
153156

154157
pub async fn lookup_all_ipv6(

sled-agent/src/rack_setup/plan/service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const BOUNDARY_NTP_COUNT: usize = 2;
4747
const NEXUS_COUNT: usize = 1;
4848

4949
// The number of CRDB instances to create from RSS.
50-
const CRDB_COUNT: usize = 1;
50+
const CRDB_COUNT: usize = 5;
5151

5252
// TODO(https://github.com/oxidecomputer/omicron/issues/732): Remove
5353
// when Nexus provisions Oximeter.

smf/sled-agent/non-gimlet/config.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,23 @@ sidecar_revision.soft = { front_port_count = 1, rear_port_count = 1 }
1818
# in-sync, rather than querying its NTP zone.
1919
skip_timesync = true
2020

21-
# A file-backed zpool can be manually created with the following:
21+
# For testing purposes, A file-backed zpool can be manually created with the
22+
# following:
23+
#
2224
# # truncate -s 10GB testpool.vdev
2325
# # zpool create oxp_d462a7f7-b628-40fe-80ff-4e4189e2d62b "$PWD/testpool.vdev"
2426
#
2527
# Note that you'll need to create one such zpool for each below, with a
26-
# different vdev for each.
28+
# different vdev for each. The `create_virtual_hardware.sh` script does this
29+
# for you.
2730
zpools = [
2831
"oxi_a462a7f7-b628-40fe-80ff-4e4189e2d62b",
2932
"oxi_b462a7f7-b628-40fe-80ff-4e4189e2d62b",
3033
"oxp_d462a7f7-b628-40fe-80ff-4e4189e2d62b",
3134
"oxp_e4b4dc87-ab46-49fb-a4b4-d361ae214c03",
3235
"oxp_f4b4dc87-ab46-49fb-a4b4-d361ae214c03",
36+
"oxp_14b4dc87-ab46-49fb-a4b4-d361ae214c03",
37+
"oxp_24b4dc87-ab46-49fb-a4b4-d361ae214c03",
3338
]
3439

3540
# Percentage of usable physical DRAM to use for the VMM reservoir, which

tools/create_virtual_hardware.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function ensure_zpools {
4747
echo "Zpool: [$ZPOOL]"
4848
VDEV_PATH="$OMICRON_TOP/$ZPOOL.vdev"
4949
if ! [[ -f "$VDEV_PATH" ]]; then
50-
dd if=/dev/zero of="$VDEV_PATH" bs=1 count=0 seek=10G
50+
dd if=/dev/zero of="$VDEV_PATH" bs=1 count=0 seek=6G
5151
fi
5252
success "ZFS vdev $VDEV_PATH exists"
5353
if [[ -z "$(zpool list -o name | grep $ZPOOL)" ]]; then

0 commit comments

Comments
 (0)