History log of /external/autotest/site_utils/lxc/container_factory.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
83630117bd4d6b3351d999c3de2afee5729718bf 29-Nov-2017 Ben Kwa <kenobi@google.com> [autotest] Enable container pool use.

- Implement a new container factory class that connects to a running
container pool to retrieve containers.
- Add a config kill switch that can be used to disable use of the
pool-based factory.
- Add some logs for easier debugging.

BUG=chromium:720219
TEST=Start pool (lxc_pool_service.py start) then run lxc functional
test. Verify that it does _not_ use the container pool.
TEST=Set LXC_POOL/use_lxc_pool to True in local shadow_config. Run lxc
functional test again and verify that this time it does use the
container pool.
TEST=Stop pool (lxc_pool_service.py stop) then run the functional test
again. Verify that it continues to work by locally creating a
container when the pool operation fails.
TEST=container_pool/client_unittest.py
TEST=container_pool/service_unittest.py
TEST=container_factory_unittest.py
TEST=container_bucket_unittest.py

Change-Id: I14541d36d45b39d6f14f311af4a5cf961702ea6f
Reviewed-on: https://chromium-review.googlesource.com/804823
Commit-Ready: Ben Kwa <kenobi@chromium.org>
Tested-by: Ben Kwa <kenobi@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/site_utils/lxc/container_factory.py
069b9509cd53a7304e2d3f9a8f40bbf8e15baa31 31-Oct-2017 Ben Kwa <kenobi@google.com> [autotest] Complete switching to container IDs.

- Change the container factory interface to provide meaningful defaults
for clients that do not have a container ID at creation time (i.e. the
container pool).
- Change container creation code to generate a random container name in
cases where a container ID is not provided at creation time.

BUG=chromium:720219
TEST=./shared_host_dir_unittest.py
TEST=./container_pool/pool_unittest.py
TEST=./container_pool/async_listener_unittest.py
TEST=./container_pool/service_unittest.py
TEST=./base_image_unittest.py
TEST=./lxc_config_unittest.py
TEST=./container_bucket_unittest.py
TEST=./container_unittest.py
TEST=./container_factory_unittest.py
TEST=./zygote_unittest.py
TEST=./lxc_functional_test.py

Change-Id: Ia9ba17f9574ddd638e0cd14e258e2fa15f5d6472
Reviewed-on: https://chromium-review.googlesource.com/747851
Commit-Ready: Ben Kwa <kenobi@chromium.org>
Tested-by: Ben Kwa <kenobi@chromium.org>
Reviewed-by: Ben Kwa <kenobi@chromium.org>
/external/autotest/site_utils/lxc/container_factory.py
d2bb0a504a7849e47c1758ee67ff116cfeb2ca66 06-Sep-2017 Ben Kwa <kenobi@google.com> [autotest] Introduce container factory.

Implement a ContainerFactory class, which factors container creation out
of the ContainerBucket class. This is necessary in order for the
container pool to take over container creation.

BUG=chromium:720219
TEST=python container_factory_unittest.py
TEST=python container_bucket_unittest.py
TEST=python lxc_functional_test.py

Change-Id: Ifc6ba4b3d7dc55e81741b403ae7628c9adc66447
Reviewed-on: https://chromium-review.googlesource.com/657896
Commit-Ready: Ben Kwa <kenobi@chromium.org>
Tested-by: Ben Kwa <kenobi@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/site_utils/lxc/container_factory.py