hetznercloud / cli

A command-line interface for Hetzner Cloud
MIT License
1.09k stars 79 forks source link

Snapshot failing with message that all is ok. #101

Closed blyb2592 closed 6 years ago

blyb2592 commented 6 years ago

When running several snapshot in a project at one time they tend to fail. The worst thing is that the tool gives a message:

Image [image number] created from server [server name]

For example when issuing a command:

hcloud server create-image --type snapshot --description "${HOSTNAME}_$(date +%Y%m%d)_DAILY1" "${SERVER_ID}"

I get a respone:

Image 62316 created from server SF1

And after that after issuing:

hcloud image describe 62316

I get a respone:

hcloud: image not found: 62316

Please work on having a message indicating that the snapshot was not executed.

thcyron commented 6 years ago

The problem is that the CLI immediately prints the image ID and does not wait for the corresponding action to be finished. In your case the action failed and the CLI should report it.

thcyron commented 6 years ago

Actually the problem is this line:

https://github.com/hetznercloud/cli/blob/2e73eed2d2e9443581be6aa7385d5c41d8362e0b/util.go#L59

It should be errCh <- err. Will be fixed in #104.

Thanks for reporting and sorry for the trouble.