gana2188 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

UnboundLocalError using gcutil moveinstances #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Trying to move my instance and disk from europe-west1-b to us-central1-b using 
this command:

gcutil moveinstances --replace_deprecated --source_zone=europe-west1-b 
--destination_zone=us-central1-b ".*" --project=[my-project]

gave this error:

UnsupportedCommand: Moving instances is not supported in v1 yet. You may still 
use this subcommand by specifying --service_version=v1beta16.

so i added  --service_version=v1beta16.

gcutil moveinstances --replace_deprecated --source_zone=europe-west1-b 
--destination_zone=us-central1-b ".*" --project=[my-project] 
--service_version=v1beta16.

which deleted the disk and instance on europe-west1-b and created the disk in 
us-central1-b but then failed creating the instance with this exception:

UnboundLocalError: local variable 'ip_addresses' referenced before assignment 
and suggesting that i should try again by using

$ gcutil --project=[my-project] resumemove 
/home/Anders/.gcutil.move.20140311213255 --service_version=v1beta16

however - this also fails with the UnboundLocalError.

So i am stuck - i now don't have my instance anywhere (the snapshot exist 
though - i see it in the dev console) - but i do not know how to proceed. Is 
there something i can update to make this work?

I use windows with cygwin (1.7.28) with python (2.7.3). gcutil version says 
1.14.0 - and "gcloud components update" says "All components are up to date."

Original issue reported on code.google.com by akobbe...@gmail.com on 12 Mar 2014 at 3:34

GoogleCodeExporter commented 9 years ago
I believe this issue has been addressed in an emergency fix we just pushed. If 
you run 'gcloud components update', moveinstances should work now.

Original comment by jasm...@google.com on 13 Mar 2014 at 4:48

GoogleCodeExporter commented 9 years ago
Confirmed that the move worked in gcutil 1.14.1. Thank you for the assistance.

Original comment by akobbe...@gmail.com on 13 Mar 2014 at 7:52

GoogleCodeExporter commented 9 years ago
This issue is fixed in the newest gcutil release, 1.14.1.  You will be able to 
recover from your bad state using this version as well.

Original comment by be...@google.com on 13 Mar 2014 at 5:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes  thank you. As stated in my last message, i already updated gcutil to 
1.14.1 and it worked like a peach.

Original comment by akobbe...@gmail.com on 13 Mar 2014 at 5:43