* Add a CoreOS test class TestCoreosKubernetesAPIs
* Add a CoreOS test environment in tox.ini
* Create a base class BaseK8sTest and move OS-agnostic k8s testing
code to that class.
* Increase the disk size from 8G to 10G for m1.magnum and s1.magnum,
since CoreOS image requires more disk space to boot.
* Set os-distro property for CoreOS image.
Partial-Bug: #1546101
Change-Id: Ie56a9442ecebe05f39c7669bc950f5a6ca11df33
If the bay is pending on CREATE_IN_PROCESS, it won't contain the
IP addresses of the nodes. Therefore, we need to get them from
the Heat stack if missing.
Closes-Bug: #1571272
Change-Id: I487f9000b4c229be3e1b576258473e39cda66f9e
tempest-lib is deprecated for future bug-fixes and code changes
in favor of tempest.
On gate testing, we installed tempest from source code so remove
it from test-requirements.txt.
Closes-Bug: #1553047
Change-Id: I405ad31e1c218868c6dbffb967a755163674fc80
Add docker registry support for swarm in heat template. After this
patch is merged, we can use docker registry in swarm bay.
Change-Id: I5161a4c0259a2df89dfc8591453aebc6f037d40d
Partially-Implements: blueprint registryv2-in-master
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
There is no need to get the resource object in validate_flavor and
validate_external_network at all, all the things we want do to are
just validate they are there.
Change-Id: I7ab980958718ae8681a6fe36f46b97cb0ea77042
Use the healthcheck middleware from oslo_middleware. This adds a new
pipeline that depends if /etc/magnum/healthcheck_disable file exists.
The healthcheck middleware is avalible under the /healthcheck URL.
Return values:
200 OK (If the file does not exist)
503 DISABLED BY FILE (If file exists)
Change-Id: I23179d5285831af12de7f392849c490d86a5682e
Initially do a qemu-img check to ensure that the image is valid,
and also check that the image size is the one we expect.
Change-Id: I447372df99303f40fd033b9673ec6cc370e65477
Heat parameters are different in swarm master and swarm node.
So we should use different scripts to write the heat parameters.
Change-Id: I81625613913773e627d96f54374ae57af6fe64d3
Closes-Bug: #1571582
The Mesos slave has many different flags and different user have
different requirement for different parameters, add isolation,
work_dir, image_providers parameters for slave in mesos bay to
give end user more choice. for example Set the parameters to
support Container Images in Mesos Containerizer
Note: support Container Images in Mesos Containerizer needs mesos
version >= 0.28
Partially-Implements:blueprint mesos-slave-flags
Change-Id: Ib4fd7076704a3266f0cf2addf08896729ec6062f
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
Commit I34e5e49ae650219f986a2b0032df65672c319ec6 tried to fix mem_limit
not passed to docker when create container for docker API vesion >=1.19
in a wrong way, this patch fixes it by passing Memory unit to host_config
Closes-Bug: #1567834
Change-Id: Id8da5e40cf165317a9a5453036490cc028bd2e0d
Co-Authored-By: Spyros Trigazis <strigazi@gmail.com>
In Ia400b5b6919753d6241233a6666a2c30c7618bc9, we are
adding a new library to global requirements. This
python-k8sclient library essentially has the same
code that was in Magnum so it's a straight replace.
Change-Id: Ib85bcf532e4163d5c1ac95ef701a1ec3133b69eb
It seems Magnum gate often broke after switching to neutron-lbaas
devstack plugin. To fix the gate, we remove the plugin for now.
We need to add it back once the issue is resolved.
Change-Id: I777c147a34e32a98592d5f5d8229763cceeb83e7
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
Partial fix for problems output by checkbashisms for file
magnum/templates/kubernetes/fragments/write-kube-os-config.sh only.
Change-Id: I68b021da63b6c2d058053023a4fa26d643f0134b
Partial-Bug: #1561232
Fix gate broken, we keep project configs in gate_hook.sh so we don't
need to subumit requests to project-config and wait for their
approval
Change-Id: Ia9cc4c40b41db1159ad6fd3c4ec1b17b502e0f5b
Partial fix for problems output by checkbashisms for file
magnum/templates/swarm/fragments/write-docker-service.sh only.
Quoted variable as recommended.
Change-Id: Iadcd3435b39ad7bd2575bbf838add1c22b04944f
Partial-Bug: #1561232
After this patch is merged, docker registry will be available.
We can push docker images into local repo on a bay node.
Change-Id: I1245bde7ef3173226617e60e6436759f433eb464
Partially-Implements: blueprint registryv2-in-master
Partial fix for problems output by checkbashisms for file
magnum/templates/swarm/fragments/configure-docker-storage.sh only.
Change-Id: I6fc8c789a2b5a1838c0ae98521e236c80a199323
Partial-Bug: #1561232
From http://logs.openstack.org/64/302064/6/check/
gate-magnum-python27/6c92a13/console.html the log clearly
said bay-xx-xx-xx-xx is an invalid UUID. Using UUIDFields
with invalid UUIDs is no longer supported, so in our test
let's use real UUID case for that.
Change-Id: I0f3dbd8748293741cb5501365aee710220eb3ea0
Co-Authored-By: Spyros Trigazis <strigazi@gmail.com>
In order for automated image builds to run, create
this script that can be called from magnum jobs, to
install needed dependencies for diskimage-builder
and fedora-atomic builds.
That script will be run on the VM that will be
spinned to run the image builds, targetted for ubuntu-trusty.
Change-Id: Icf5a2c79e47e632be2ac49bc9ccc528b4f604eb2
Implements blueprint fedora-atomic-image-build
Kubernetes bay needs to be fully functional before notifying Heat
to bring the stack to CREATE_COMPLETE. This patch added a systemd
unit that keeps pinging the kube-apiserver and notify Heat once
it goes through.
Change-Id: Ib4fb22f3040d76d488c6cac6873d64b4d973ebb1
Closes-Bug: #1551824
New image on 4/5 has Kube version 1.2.0
For Kubernetes bay, the scheduler, controller and proxy
are run from container, not from Kube binaries in the
image. The version for these containers are currently
hardcoded in the Heat template as 1.0.6, so update to
the new version 1.2.0. Otherwise, the scheduler and
kubelet would not work properly with the mixed versions.
There is a patch under review to expose the Kube version
as a label:
https://review.openstack.org/#/c/295655/
Implements: blueprint atomic23
Change-Id: I46be4038b62be202ba670749e0a5c6663eeb12d3
* Rename tenant to project in functional test In particular,
rename "admin_tenant_name" to "admin_project_name" and
rename "tenant_name" to "project_name". These configs have been
renamed in tempest [1], so Magnum needs to adapt the change.
* Temporarily remove "subjectAltName" from CSR config, because
it caused failure of certificate signing, possibly, due to a
bug or imcompatible change in pyOpenSSL 16.0.0.
[1] https://review.openstack.org/#/c/301167/
Change-Id: I41438cbfaefd9d04d7e73a4f46f5ece1494b349c
Closes-Bug: #1568212
Closes-Bug: #1567691
Magnum SSH into each bay node and copy logs when a test fails.
The specified SSH key path is relative to the home directory ("~"),
which didn't get expanded correctly.
Change-Id: Ie7265adf8027309a4482247283dd52a18397d5d7
Closes-Bug: #1566501
Trust can only be deleted by the user who creates it. So when
other users in the same project want to delete the bay, we need
use the trustee which can impersonate the trustor to delete the
trust.
Change-Id: I9f87cdf07066d316722e798cd0755f0fff5c2a02
Closes-Bug: #1552457
Currently, we use the users auth token, which expires after a while.
We need to use a trust instead.
Remove user_token at the same time.
Change-Id: Id1d34c59eccd70be24c5b9e00cd921b5a9d59860
Partially-Implements: blueprint use-trust-for-tls-cert-generation
Cpu metric is important to a cluster, add cpu util to notification bus.
After this patch get applied, we will get following metrics:
{'metrics': [{'unit': '%', 'name': 'cpu_util', 'value': 30.0}, {'unit':
'%', 'name': 'memory_util', 'value': 4.795204795204795}]
Change-Id: I450c8b5afe766be4da4fb42c2ecb47db52b245f3
Change the devstack image to the default Atomic 23 image.
Update templates not to rely on interface naming because the names
changed between Atomic 21 and Atomic 23 images.
Add a functional test to validate minion node registration.
Update docs to refer to a generic Atomic image.
Co-Authored-By: Hongbin Lu <hongbin.lu@huawei.com>
Implements: blueprint atomic23
Change-Id: Id67244e3f452b3c7c3c46fdabcca3a5c141a76c0
Cryptography 1.3.1 has been released which closes this bug, meaning this
patch can now be reverted. As the problem has now been fixed.
https://github.com/pyca/cryptography/issues/2844 is now closed.
This reverts commit a75b5fb77a.
Change-Id: I387ff9fe099460f98303cf930b79db1632791ccd
Previously,the kubernetes bay type did not support the Magnum Container
Volume Model. This patch adds support for volume through the following:
1. Add volume_driver, region_name to
kubernetes bay type.
2. Update kubernetes unit tests to support container volume.
3. Update kubernetes heat templates for container volume model.
Note: The Container Volume Model of Kubernetes need the
kubernetes Version >= 1.1.1 and docker version >= 1.8.3
Change-Id: I8f568087f8e8254cb14a81edb526e596da33abcc
Partially-Implements: blueprint magnum-integrate-with-cinder
Cpu metric is important to a clutser, add cpu util to notification bus.
After this patch get applied, we will get following metrics:
{'metrics': [{'unit': '%', 'name': 'cpu_util', 'value': 30.0}, {'unit':
'%', 'name': 'memory_util', 'value': 4.795204795204795}]
Change-Id: I44cc2edf2a33ff2991ba0b006d802dc3efee42b6
It consumes an external deployed tree, and generates a
cloud bootable image based on that. It relies on lvm element
to generate the volumes needed for the image.
Change-Id: Ie681064d799279519adcc8e1bcf7a61ff9120042
The "Patch" function in the magnum/api/controllers/v1/container.py
isn't called,so we should delete it.
Change-Id: I6f7d041978fd5340d13747b11ebf8bb7b3d195f5
Closes-Bug: #1561401
Currently, we use the users auth token, which expires after a while.
We need to use a trust instead.
Change-Id: Ie18e6a1371871720fbfd4af0bd43e166075b0c6d
Closes-Bug: #1503863
Partially-Implements: blueprint use-trust-for-tls-cert-generation
A few of the scripts in magnum/templates/kubernetes/fragments/ pretend
to be using ISO shell (according to the shebang), but they really are
bash scripts because of 2 small bashisms. This makes lintian (the
Debian package linter) yell. Plus this really would fail with dash
as standard shell implementation for /bin/sh.
This patch fixes the bashisms, rather than the shebang, which is the
best thing to do (so one can choose the shell implementation, and
we're not bound to using bash).
Change-Id: I825a176d34ba985dd85a8bf24d5bcaf1771f6c1a