It's hard to indentify which node is master and which is slave now, add
prefix `master` or `node` to logs directory on functional testing
failure.
Change-Id: Ida739845d5276d53b037ac32dcb1b72bc717936f
Setting the following in functional_creds.conf doesn't have any effect
for failed functional container tests:
copy_logs = False
Description of changes/issues addressed:
- Client functional tests look in functional_creds.conf for the
copy_logs setting while tempest/api tests look in tempest.conf.
So an accessor method 'get_copy_logs' is added for BaseMagnumTest
(for tempest tests), and this gets overridden by BaseMagnumClient.
- Call to lamda was missing an argument in copy_logs_handler.
- set_copy_logs in config.py was setting cls.copy logs inconsistently
(sometimes boolean True, otherwise to a string).
- BaseMagnumClient was calling bool() on a string: "bool(copy_logs)".
bool() on a string always returns True except for null string.
Change-Id: I234fd0433602914fdf03f04f2394f6dc802df4fd
Closes-Bug: #1570949
The Magnum functional tests currently use a DNS server setting of
8.8.8.8 when configuring nodes in a cluster. In some environments,
this DNS server setting doesn't work. When this is the case, and
functional tests are run locally, bay creation times out and the
functional tests fail.
This patch enhances the functional tests to allow configuration of
DNS nameserver to be used in baymodels that are created in
functional tests.
Change-Id: I958d199565ae5741dd6f4b8764e51ea16a8d505b
Closes-Bug: #1570543
Make thhe minions work correctly without depending on the master.
Removing this dependency decreases provisioning time by provisioning
nodes in parallel.
Change-Id: I025dbf54ef0cdafc4fe26acc33a9faed8cacd1ca
Partial-Bug: 1536739
Partial-Bug: 1551824
This patch will copy logs from nova servers to local environment
on test failures.
Don't delete bays until teardown so log gathering will work.
Give functional test types a common base.
Added timeout to docker ps; else, the command would time out,
failing to run the rest of the tests.
Closes-Bug: 1542390
Change-Id: I016ed8fe311bede407f57b7982126c4b77749bec
Co-Authored-By: Corey O'Brien <coreypobrien@gmail.com>
These two changes have to merge together to pass the gate.
Update import because of magnum client change
Magnum client has moved out apiclient and cliutils from
oslo-incubator, update the import reference here.
Refer to:
https://review.openstack.org/#/c/280050
for magnumclient change.
Change SERVICE_TENANT_NAME to SERVICE_PROJECT_NAME
Devstack is converting from TENANT to PROJECT[1]. This patch changes
SERVICE_TENANT_NAME to SERVICE_PROJECT_NAME in the devstack plugin to
match.
[1] https://review.openstack.org/#/c/281779/
Change-Id: Ib03e421e48a3aa40c11cbc892a3ca724cbd644e7
Closes-Bug: #1548634
Co-Authored-By: Yang Hongyang <hongyang.yang@easystack.cn>
Removed some COE tests that duplicate the functional-api tests.
Consolidated duplicate code around certificates and made BayTest
always create and delete a bay so that the COE api tests can all
work off of a single bay per class.
Change-Id: I2ff7e2fd587657fb4dd171c1470c5bb208c331b5
Closes-Bug: 1544196
Recently, the gate jobs took too long to complete (between 2 to 8
hours). The reason is jenkins slave agent die during the test, which
cause the CI to re-start the whole test in a new VM.
The failure mainly occurred at magnum-api pipeline, but also occurred
at other pipelines. In term of distribution of test nodes, this
failure mainly occurred at OVH nodes, in which there is no dedicated
swap device. As a result, at OVH nodes, local disk is used for swap
when memory is over-consuming. It looks this leads to resource
starvation, which cause the failure.
This patch attempted to reduce the memory consumption of the gate
tests. In the api test, the number of worker nodes was reduced from
2 to 1. In all tests (api/k8s/swarm/mesos), the memory of worker node
was reduced from 1G to 512M.
Closes-Bug: #1542386
Change-Id: If7822d07f95ebc935a8763b92f038f10cf07b5ca
Replaced iter.next() with next(iter)
Replaced __builtin__ with six.moves.builtin
Replaced unicode with six.text_type
Repleaced Configparser with six.moves.configparser
Blueprint magnum-python3
Change-Id: I9f084ef4fae1ec1111e26142e2e89bad18acbf45
Instead of allowing any volume_driver value to be accepted by the
baymodel API. When creating baymodel, the patch can limit the
volume_driver value for the different coe.
Kubernetes <=> volume_driver = "cinder"
Swarm <=> volume_driver = "rexray"
Mesos <=> volume_driver = "rexray"
Co-Authored By: Kai Qiang Wu(Kennan)<wkqwu@cn.ibm.com>
Co-Authored By: Ton Ngo<ton@us.ibm.com>
Partially-Implements: blueprint magnum-integrate-with-cinder
Depends-On: I52c97e2b04ac636ddac611e3677c4ea3972220eb
Change-Id: I25f1cd005a39950c47f31a8b925f664909b79ee3
Add logs for docker and docker-storage-setup services.
docker-storage-setup uses MIN_DATA_SIZE=2G for Docker volume, so we
cannot use Docker volume less that 2G (realistic 3G, because some
space should be allocatedtd for medata-data)
Related-Bug: #1500062
Change-Id: I7a0c0023c164f890b492035c05efdb5ce32ef9f9
This random error is due to the different swap space at different
test hosts. In particular, there is a provider who provides VMs with
0 swap space, while other providers provide VMs with 8G swap space.
As a result, Magnum jobs failed at VMs with 0 swap space.
This commit reduces memory consumption of Magnum jobs by reducing the
bay node flavor from 2G to 1G. I consider this as a temporary fix.
A permanent fix should be from infra side to make the swap space
consistent across test nodes.
Partial-Bug: #1521237
Change-Id: Ia043fab1f7665f7299e4094634e02c42b43dcce1
This patch adds a copy_logs as the handler with unittest's addOnException,
by doing this, we can get logs for all failed cases instead of copy them
before teardown.
If without any failed case, don't copy logs for saving time.
Partially implements: blueprint swarm-functional-testing
Change-Id: I47725d0d16735f650adf325adcf4194eb70c384d
Some time on gate, bay creation is failed, stop testing other cases which
need to be run onside a bay.
Partially implements: blueprint swarm-functional-testing
Change-Id: I48a0b0f07a7c4e5f859e44eb0cef9e629a396400
In functional tests, copy logs from bay nodes to host before the
tests tear down. The bay node logs could be helpful for
trouble-shooting.
Change-Id: I102d2ce37c2253c743719e4ccf978c23a92a3a3f
This patch adds TestSwarmAPIs test class, aimed to test Docker API/and
swarm related api function, we create a bay while setupClass, and destroy
it after test cases finished. Even without any cased added, at least we can
ensure swarm bay can be created successfully.
This will help to ensure any HOT/yml change won't break swarm's cluster
basic functions.
I leave a todo, we need more works to test container actions.
Since we have created a bay, so we can add more case using magnum client to
test container actions, will do this by followed patch.
Depends-On: Ifa028f6f30b7c2bb7b1dd32b22669379e162c7c5
Partially implements: blueprint swarm-functional-testing
Change-Id: I5c3bc5d7735cce17a45887359d1fb44d12dbba48
This patch use tls_enabled mode to test k8sApi.
This patch refactors _create_baymodel, gives _create_baymodel an optional
**kwargs to allow create various baymodel.
This is a preparation for other COE(like swarm, mesos) baymodel testing.
Co-Authored-By: OTSUKA, Yuanying<yuanying@fraction.jp>
Partially implements: blueprint swarm-functional-testin
Change-Id: I7680a7a7dd0f44926741dab8b982bc39a21e11ba
Tests should use:
self.assertIn(value, list)
self.assertNotIn(value, list)
instead of:
self.assertTrue(value in list)
self.assertFalse(value in list)
because assertIn and assertNotIn raise more meaningful errors:
self.assertIn(3, [1, 2])
>>> MismatchError: 3 not in [1, 2]
self.assertTrue(3 in [1, 2])
>>> AssertionError: False is not true
Closes-Bug: #1510007
Change-Id: If33252cc93c06a85e61871fb7b22b726f4a08500
This patch modifies template to generate certificates and configure TLS
settings for kube-apiserver/kubelet/kube-proxy.
Co-Authored-By: Andrew Melton <andrew.melton@rackspace.com>
Partially-Implements: bp secure-kubernetes
Change-Id: I76b0f91f0c44f9880980e35c6b8856ea48ed3ce1
Previously, the client tests for labels were removed due to
functional gate tests failing. The tests were failing because the
associated client patch had not merged. Now that the client patch
has merged, the test can be included.
Change-Id: I2efb19c1042bda560febe9b5da8423d5ba1a7492
This patch splits test_magnum_python_client.py to python_client_base.py
, test_magnum_python_client.py and test_k8s_python_client.py.
python_client_base.py: base class for python client testing.
test_magnum_python_client.py: common python clients testcases.
test_k8s_python_client.py.: k8s specified functional testing.
Futher, there would be swarm/mesos functional testing cases.
Partially implements: blueprint swarm-functional-testing
Change-Id: I1e3e89fd07f7dfe28baeefdc0558f986fd1376bf