If both Zun and Kuryr-libnetwork are enabled in devstack, the script
might fail since etcd will be installed and started twice. This commit
fixed it.
Change-Id: Ieffbb7a86e99a3e9a03cbfcadb2daf92d8f62cfb
After this patch, all containers created by native docker driver
will connect to neutron. Right now, users don't have a choice of
networks the container will be created from (which is a future
work). Instead, Zun will select a neutron network for each
container by looking up all the networks under user's tenant.
This is the first step for enabling Kuryr integration. The following
work needs to be done later:
* Expose network feature via REST API. Allow users to create, inspect,
delete container network, and connect/disconnect container from/to
a network.
* Add support for associate/dissociate floating IPs to containers.
* Add support for tuning security groups of the containers.
Implements: blueprint kuryr-integration
Change-Id: I2701eb9a82a74aedf00c1a2af29850d4bd0e8f7a
Due to docker.errors.APIError is wrapped at DockerHTTPClient,
duplicated exception handle code from docker driver can be removed.
Change-Id: I3accc317cc8a79741934098d853e7749a0f59844
Add meminfo patch changed docker_driver.get_available_resources,
but forget to add ut for get_available_resources. Add test case
in this patch.
Change-Id: Ia5f3af75f82026e5f959863f33d4654f5cb5ba32
The container's host needs to be synced periodically because the
value of the host is mutable (in config file). If the value of
a host is changed but it is not synced to containers, the rpc
request will send to the old host which will fail.
In order to squeeze the logic of syncing host, the existing
periodic task was re-written because the original task was mainly
designed to sync a single container state (i.e. status). This
commit re-wrote the implementation make it generic and can be
leveraged to sync various container states (i.e. host, status).
In addition, this commit moved the implementation to container
driver since syncing container states seems to be driver-specific.
Change-Id: I998af06989363b5329ae1f853dd01388ddaeb1cc
The error info is deleted when the container start or reboot,
but status_reason always exists after the container runs well.
Change-Id: I9772aea1e7a4772d0b1b20a0caf8381b25296443
Closes-Bug: #1682032
According to https://docs.docker.com/engine/api/v1.23/ , the 'Error'
field returned by 'inspect' is a string, but we treated it as
boolean in before. As a result, the state was incorrect.
Change-Id: If85605ed4931c0c021090cf752f80b5200f08f33
An immediate use case is to enable attaching to containers that
are behind the proxy. In this case, the ip address of docker
daemon won't be reachable from outside thus attaching is
impossible. With this config, cloud admins can set a reachable
ip address for external access of docker daemon.
Change-Id: If4981154139c98ad4a8373744d29938214991ca6
This patch adds a new file to define constants, and replaces the
string variables with constants.
Change-Id: Ice4aa493c4713264d43a70c3fde2776a01584228
Implements: blueprint replace-string-with-const
docker.version()['ApiVersion'] in the function
gets error in docker 1.10.6
>>> import docker
>>> docker.version
'1.10.6'
>>>
>>> docker.version()['ApiVersion']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'str' object is not callable
The patch removes compare_version due to
the two functions are unused.
Change-Id: If867394725eca7ee2dd7ed46c21ba4468d756f4a