goerz / gc3pie

Automatically exported from code.google.com/p/gc3pie
0 stars 0 forks source link

Switching to 'private_ip_address' as 'preferred_ip' when no connections are available (even temporarily) #444

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Start an ordinary GC3Pie session using a cloud backend and let it connect to 
the VMs through the 'public_ip' address
2. Once the connection is established (and thus the 'preferred_ip' is set to 
the 'public_ip' one), interrupt the ssh connectivity (e.g. change on the fly 
the security group the VM has been started on)
2.1 This simulates a temporary loos of internet connectivity 
3. Stop the running SessionbasedScript 'after' the ssh connection time-out is 
reported
4. Restart the SessionBasedScript, now the 'preferred_ip' is switched to the 
'private_ip_address' value
5. From here on, the failure is systematic as only the 'preferred_ip' will be 
tried.

Note: it probably behaves the same when using 'private_ip_address' first (i.e. 
sets to 'public_ip' and then stick to that)

What is the expected output? What do you see instead?

* All available IP addresses should be tested every time a connection is to be 
established (starting from the 'preferred_ip' if available).

* If none of the available IPs can be used to establish a connection, then 
'preferred_ip' should probably be set to None.

* Review how 'get_resource_status' is invoked by core/engine (by calling 
'get_resource_status' on the ec2/openstack resources it would trigger a new 
attempt to verify the ssh connectivity)

S.

Original issue reported on code.google.com by sergio.m...@gmail.com on 10 Jun 2014 at 1:59

GoogleCodeExporter commented 9 years ago
if the SessionBasedScript is terminated 'gracefully' with Ctrl-C (and actually 
let it run the 'close' method for the ec2/openstack backends) the 
get_resource_status is properly invoked (as part of the close method) and then 
the working IP address is set.

would this be enough ?

S.

Original comment by sergio.m...@gmail.com on 10 Jun 2014 at 2:32

GoogleCodeExporter commented 9 years ago
The procedure is confirmed to work:
. Stop SessionBasescript 'gracefully'
. Restart session

Fix in the code should anyhow consider running ec2/openstack get_resource_status
At least during update_job_status (either systematically or if vm.preferred_ip 
== None)

Original comment by sergio.m...@gmail.com on 11 Jun 2014 at 8:01