openstack: New machine active timeout parameter
* Adds `--openstack-active-timeout` parameter to set the timeout until a machine is active. Closes #1632 Signed-off-by: David Zerulla <ddaze@outlook.de>
This commit is contained in:
parent
f589ab90e1
commit
dec4514e15
|
@ -36,6 +36,7 @@ Options:
|
||||||
there is no IP address already allocated a new IP will be allocated and assigned to the machine.
|
there is no IP address already allocated a new IP will be allocated and assigned to the machine.
|
||||||
- `--openstack-ssh-user`: The username to use for SSH into the machine. If not provided `root` will be used.
|
- `--openstack-ssh-user`: The username to use for SSH into the machine. If not provided `root` will be used.
|
||||||
- `--openstack-ssh-port`: Customize the SSH port if the SSH server on the machine does not listen on the default port.
|
- `--openstack-ssh-port`: Customize the SSH port if the SSH server on the machine does not listen on the default port.
|
||||||
|
- `--openstack-active-timeout`: The timeout in seconds until the OpenStack instance must be active.
|
||||||
|
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
|
@ -62,3 +63,4 @@ Environment variables and default values:
|
||||||
| `--openstack-floatingip-pool` | - | - |
|
| `--openstack-floatingip-pool` | - | - |
|
||||||
| `--openstack-ssh-user` | - | `root` |
|
| `--openstack-ssh-user` | - | `root` |
|
||||||
| `--openstack-ssh-port` | - | `22` |
|
| `--openstack-ssh-port` | - | `22` |
|
||||||
|
| `--openstack-active-timeout` | - | `200` |
|
||||||
|
|
|
@ -151,7 +151,7 @@ func (c *GenericClient) WaitForInstanceStatus(d *Driver, status string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
return false, nil
|
return false, nil
|
||||||
}, 50, 4*time.Second)
|
}, (d.ActiveTimeout / 4), 4*time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *GenericClient) GetInstanceIpAddresses(d *Driver) ([]IpAddress, error) {
|
func (c *GenericClient) GetInstanceIpAddresses(d *Driver) ([]IpAddress, error) {
|
||||||
|
|
|
@ -17,6 +17,7 @@ import (
|
||||||
type Driver struct {
|
type Driver struct {
|
||||||
*drivers.BaseDriver
|
*drivers.BaseDriver
|
||||||
AuthUrl string
|
AuthUrl string
|
||||||
|
ActiveTimeout int
|
||||||
Insecure bool
|
Insecure bool
|
||||||
DomainID string
|
DomainID string
|
||||||
DomainName string
|
DomainName string
|
||||||
|
@ -164,6 +165,11 @@ func GetCreateFlags() []cli.Flag {
|
||||||
Usage: "OpenStack SSH port",
|
Usage: "OpenStack SSH port",
|
||||||
Value: 22,
|
Value: 22,
|
||||||
},
|
},
|
||||||
|
cli.IntFlag{
|
||||||
|
Name: "openstack-active-timeout",
|
||||||
|
Usage: "OpenStack active timeout",
|
||||||
|
Value: 200,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,6 +199,7 @@ func (d *Driver) DriverName() string {
|
||||||
|
|
||||||
func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error {
|
func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error {
|
||||||
d.AuthUrl = flags.String("openstack-auth-url")
|
d.AuthUrl = flags.String("openstack-auth-url")
|
||||||
|
d.ActiveTimeout = flags.Int("openstack-active-timeout")
|
||||||
d.Insecure = flags.Bool("openstack-insecure")
|
d.Insecure = flags.Bool("openstack-insecure")
|
||||||
d.DomainID = flags.String("openstack-domain-id")
|
d.DomainID = flags.String("openstack-domain-id")
|
||||||
d.DomainName = flags.String("openstack-domain-name")
|
d.DomainName = flags.String("openstack-domain-name")
|
||||||
|
|
Loading…
Reference in New Issue