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

pubsys: use requested size for volume, keeping snapshot to minimum size #1118

Merged
merged 1 commit into from
Sep 14, 2020
Merged
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
6 changes: 4 additions & 2 deletions tools/pubsys/src/aws/ami/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async fn _register_image(
let root_snapshot = snapshot_from_image(
&ami_args.root_image,
&uploader,
ami_args.root_volume_size,
None,
ami_args.no_progress,
)
.await
Expand All @@ -53,7 +53,7 @@ async fn _register_image(
let data_snapshot = snapshot_from_image(
&ami_args.data_image,
&uploader,
Some(ami_args.data_volume_size),
None,
ami_args.no_progress,
)
.await
Expand Down Expand Up @@ -88,6 +88,7 @@ async fn _register_image(
delete_on_termination: Some(true),
snapshot_id: Some(root_snapshot.clone()),
volume_type: Some(VOLUME_TYPE.to_string()),
volume_size: ami_args.root_volume_size,
..Default::default()
}),
..Default::default()
Expand All @@ -97,6 +98,7 @@ async fn _register_image(
data_bdm.device_name = Some(DATA_DEVICE_NAME.to_string());
if let Some(ebs) = data_bdm.ebs.as_mut() {
ebs.snapshot_id = Some(data_snapshot.clone());
ebs.volume_size = Some(ami_args.data_volume_size);
}

let register_request = RegisterImageRequest {
Expand Down