* OpenStack: add server group name override annotation
* use retries to listinstances
* add support for multiple clusters in same tenant
* run hack-expected.sh
* add test for serverGroupName annotation
* use retry
This makes use of the interface attach method when reconciling server
ports.
The difference between just setting the `DeviceID` on the Port and this
is that with the attachment process the server is also validated. Which
means for example that a Port cannot be attached to a server in `ERROR`
state.
This will make use of the kOps taks engine to retry failed servers.
The former approach had the side effect of not making kOps fail when the
last retry failed:
Because there is now a server present - although in an erroneous state -
the "instance task" which the task engine retried reconciled the server
(port, floating ip) instead of recreating it again.
With the approach of letting the task engine retry the failed servers
this will be handled correctly.
This aims to improve the experience when creating openstack servers and
they run into issues during scheduling, which is not covered by the
create API request.
So after creating the instance kops waits for it to become ACTIVE and if
not, tries to reprovision the instance by deleting the failed instance
and creating a new one.
If the last attempt was still not successful, erroneous instances will
persist to allow further investigation, and the task will fail, which
will ultimately fail the update call.
Openstack is not allowing object tag size of more than 60 characters, as
we can not rename a cluster we have to truncate and limit length to 42
for the tag value.
This adds an additional filter for ports attached to an instance, so
that only ports tagged with the cluster name will be considered.
Basically, this enables adding ports to the server independent from the
provisioning process.
To not break clusters provisioned with older kOps versions, when there
are no tagged ports found it will still consider all the ports of an
instance.
We were adding to the ServerGroup without a mutex, so we introduce a mutex.
Also introduce some defense against the member list changing once
we've observed it, though this is already enforced by GetDependencies.
Originally, floating ips depended on instances, but this causes a dependency cycle now that bootstrap scripts require all IPs for the API cert.
This also requires using networking API for creating floating ips instead of compute so that we can name (and later tag) the floating IPs, which is necessary to know which floating IP belongs to which instance prior to association
We don't call klog.InitFlags yet, because that will cause a flag
redefinition error until we get everyone to stop using glog. That
will happen when we update to k8s 1.13.