Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: get migration target specs from their sources #807

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
9 changes: 7 additions & 2 deletions bin/propolis-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ use anyhow::{anyhow, Context};
use clap::{Parser, Subcommand};
use futures::{future, SinkExt};
use newtype_uuid::{GenericUuid, TypedUuid, TypedUuidKind, TypedUuidTag};
use propolis_client::types::{InstanceMetadata, VersionedInstanceSpec};
use propolis_client::types::{
InstanceMetadata, InstanceSpecStatus, VersionedInstanceSpec,
};
use slog::{o, Drain, Level, Logger};
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio_tungstenite::tungstenite::{
Expand Down Expand Up @@ -504,7 +506,10 @@ async fn migrate_instance(
anyhow!("failed to get src instance properties")
})?;
let src_uuid = src_instance.properties.id;
let VersionedInstanceSpec::V0(spec) = &src_instance.spec;
let InstanceSpecStatus::Present(spec) = &src_instance.spec else {
anyhow::bail!("source instance doesn't have a spec yet");
};
let VersionedInstanceSpec::V0(spec) = &spec;

let request = InstanceEnsureRequest {
properties: InstanceProperties {
Expand Down
Loading
Loading