Browse Source

FIX #3056 ls timeout when instance is stopped

Signed-off-by: David Gageot <david@gageot.net>
David Gageot 3 years ago
parent
commit
aaa4510ed9
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      drivers/openstack/openstack.go

+ 5
- 0
drivers/openstack/openstack.go View File

@@ -276,6 +276,10 @@ func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error {
276 276
 }
277 277
 
278 278
 func (d *Driver) GetURL() (string, error) {
279
+	if err := drivers.MustBeRunning(d); err != nil {
280
+		return "", err
281
+	}
282
+
279 283
 	ip, err := d.GetIP()
280 284
 	if err != nil {
281 285
 		return "", err
@@ -283,6 +287,7 @@ func (d *Driver) GetURL() (string, error) {
283 287
 	if ip == "" {
284 288
 		return "", nil
285 289
 	}
290
+
286 291
 	return fmt.Sprintf("tcp://%s", net.JoinHostPort(ip, "2376")), nil
287 292
 }
288 293
 

Loading…
Cancel
Save