create-amis.sh: use status message
The progress ID is fairly useless. Status message is more useful for humans. (cherry picked from commit 4410ccc211c9127f343d8dceada26e9ba0f72687)
This commit is contained in:
parent
ff568a49ec
commit
db82eef3ec
@ -123,11 +123,11 @@ wait_for_import() {
|
|||||||
local state snapshot_id
|
local state snapshot_id
|
||||||
log "Waiting for import task $task_id to be completed"
|
log "Waiting for import task $task_id to be completed"
|
||||||
while true; do
|
while true; do
|
||||||
read -r state progress snapshot_id < <(
|
read -r state message snapshot_id < <(
|
||||||
aws ec2 describe-import-snapshot-tasks --region "$region" --import-task-ids "$task_id" | \
|
aws ec2 describe-import-snapshot-tasks --region "$region" --import-task-ids "$task_id" | \
|
||||||
jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail | "\(.Status) \(.Progress) \(.SnapshotId)"'
|
jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail | "\(.Status) \(.StatusMessage) \(.SnapshotId)"'
|
||||||
)
|
)
|
||||||
log " ... state=$state progress=$progress snapshot_id=$snapshot_id"
|
log " ... state=$state message=$message snapshot_id=$snapshot_id"
|
||||||
case "$state" in
|
case "$state" in
|
||||||
active)
|
active)
|
||||||
sleep 10
|
sleep 10
|
||||||
|
Loading…
Reference in New Issue
Block a user