1425 Commits

Author SHA1 Message Date
Michał Dulko
3eba2d3bcd Fix multinode gate after switch to Python 3
The compute1 node of multinode gate was not explicitly set to use Python
3 and failed after Nova dropped support for it. This commit fixes that.

Change-Id: I2f0376091af67bb79dcef51974d11e7a40bb0e4c
2019-11-20 11:31:17 +01:00
Michał Dulko
28b27c5de2 Remove Python 2 support
Ussuri release is the one in which we drop Python 2 support, as its EOL
is pretty close now. This commit does so in kuryr-kubernetes by
removing Python 2 unit test jobs, switching all tempest jobs to Python
3, removing specific jobs for Python 3 and updating Dockerfiles to
centos:8 that includes Python 3 from the box.

Also CentOS 7 job is removed from check queue as it seems it doesn't
play well with Python 3. A CentOS 8 job will get created soon.

Change-Id: Id9983d2fd83cef89e3198b2760816cf4a851008b
2019-11-19 12:34:54 +01:00
Roman Dobosz
5a8681a582 Set explicitly type of language in code-block directive.
It might happen, that on older version of Sphinx code-block directive
will fail without an argument - which is type of language/output/type
used by pygments for syntax highlight. We fix it in this patch.

Change-Id: I2b2ef73859fd7b86dc0c03af010570569854d568
2019-11-18 12:02:19 +01:00
Roman Dobosz
ad4c460093 Correct ordered/unordered lists.
There is a lot of lists in documentation, unfortunately they were used
incorrectly. In this patch we fix that. For ordered lists we use
auto numbering restructuredtext feature.

Change-Id: I77c4aa2fa333a3968daf8cdf9440848c51374582
2019-11-13 12:50:05 +01:00
Roman Dobosz
80b5ecd41b Change inline hyperlinks to link-target pairs.
Inline, named hyperlinks seems to be fine, but often they just provides
noise to the paragrafs. In this patch we propose to use link-target
style for hyperlinks, where named link(s) is (are) placed in paragraph
while its target is at the bottom of the document.

Change-Id: Ia4f4c66f51ea193dc201b3dba5be2788f20765e0
2019-11-13 12:50:05 +01:00
Roman Dobosz
fd440fcdcb Explicitly use code-block.
In this patch we convert preformatted directive (double colon at the end
of line) to code-block sphinx directive. Also, fixed formatting for
existing code-block directives, and changes restructuredtext code
directive into sphinx code-block.

Change-Id: I9db48fbb169263e3bf66eacca7d9bce6c355739f
2019-11-13 12:49:43 +01:00
Roman Dobosz
feff260509 Fix directives formatting.
According to restructuredtext guidelines, directives should have
following formatting:

.. directive_name:: param
   :option:

   body

So it starts with the leading two dots and the space. Next directive
name follows with two colons, and finally optional parameter. Than, line
below it is either some options delimited with colons, or an empty line.
After which body of the directive follows. It should be positioned just
at the same column as directive name, so exactly 3 spaces. Most of the
directives are formatted wrong, including:

- note
- image
- todo
- toctree
- warning
- figure

This patch fixes that.

Change-Id: Ic970f72aeb93bcda82f02e57b70370ab79d6855d
2019-11-13 11:59:37 +01:00
Roman Dobosz
c3c270c752 Fix text blocks formatting
There are the cases, where text blocks in restructuredtext files are
exceeding text 79 column, or are formatted in weeird way. In this patch
it is fixed. Also couple of typos were tided up.

Change-Id: I78c20cbb45c74e817d60582439acc7b01b577a83
2019-11-13 11:39:10 +01:00
Roman Dobosz
e32d796ac7 Fix inconsistency in headlines format.
There are several restructuredtext files, which don't follow guide for
document contribution. Also made a rule for having additional line
between section body and folowing section headline.

Change-Id: I2dfe9aea36299e3986acb16b1805a4dc0cd952d2
2019-11-13 11:39:10 +01:00
Zuul
facc629005 Merge "Ensure Network Policy handles egress traffic to a SVC" 2019-11-12 22:11:13 +00:00
Zuul
0dacfd3ed7 Merge "Ensure LB SG is not updated for egress only policy" 2019-11-12 16:27:37 +00:00
Zuul
779ff98e57 Merge "Fix the misspelling of "openvswitch"" 2019-11-08 06:29:31 +00:00
Zuul
4c3bab64fe Merge "Remove comment about Amphora building being broken" 2019-11-07 16:23:36 +00:00
Michał Dulko
9a214d2f6b Remove comment about Amphora building being broken
TrivialFix

Change-Id: Iafa873e9363a0a5388aa3162fbf8456b7184f583
2019-11-07 11:35:05 +00:00
Luis Tomas Bolivar
bf64e959d4 Better log message for pools re-population
Change-Id: I18e0729d2762c68cb604f46e9c6e974c1020b945
2019-11-07 11:33:02 +00:00
Maysa Macedo
971b2ee3bf Fix py3 gate
Netaddr library is supported in py2 and py3. We should be using it
instead of relying on ipaddress, which is only supported in py3.

Co-Authored-By: Michał Dulko <mdulko@redhat.com>
Change-Id: I93ee6343a66de1adcaca800e0614da72a4df60d9
2019-11-07 04:32:51 +01:00
Itzik Brown
0530ddc0d5 Modify Network Policy gate to run all the tests
Change-Id: I5b6b9a908a48eef9aa7cb08ca3a95269b1300578
2019-10-31 12:13:15 +02:00
Maysa Macedo
b0b78b423c Ensure LB SG is not updated for egress only policy
When an egress Network Policy is enforced, there is no
need to allow the update of the LB SG. Right now, as this
operation is being allowed, we can end up with ingress
rules being removed from the LB.

Closes-Bug: 1850715
Change-Id: Idcdef5c4f2f47a165bfb9b38779b591d5b995216
2019-10-30 20:49:50 +00:00
Zuul
36e2611417 Merge "Use pyroute2 to tweak vf in sriov" 2019-10-29 12:08:07 +00:00
Maysa Macedo
db1b24fcf6 Ensure Network Policy handles egress traffic to a SVC
We're not taking into account the case of a Network Policy
with an egress rule to a pod that contains a Service sitting
in front of it. Right now, only an egress rule to the matched
pod is created, when one for the matched SVC is also required.

Related-Bug: 1849139
Change-Id: I9830f30ba1fde3e5ec1a98fcbca22af992dd1bec
2019-10-25 12:57:47 +00:00
Zuul
d6d1ffd6f1 Merge "Remove unused property from DaemonServerService" 2019-10-25 09:13:05 +00:00
Zuul
5e52e1b6fa Merge "Added support for bulk create ports." 2019-10-24 18:14:24 +00:00
Zuul
f270fb0fdb Merge "Move from Neutron client to OpenStackSDK." 2019-10-24 18:01:16 +00:00
Zuul
1046441e17 Merge "Update K8s version support matrix" 2019-10-24 14:03:39 +00:00
Zuul
c35caef1cb Merge "Switch to Ussuri jobs" 2019-10-24 14:03:38 +00:00
Zuul
e3ef4442aa Merge "Set configmap_modifiable=True in pools gate" 2019-10-24 13:54:57 +00:00
Roman Dobosz
e1a7ddf408 Added support for bulk create ports.
Currently, OpenStackSDK network object doesn't provide a method for bulk
create ports. This is a workaround for Kuryr, since we need it for
driver NeutronPodVIFDriver.

Implements: blueprint switch-to-openstacksdk
Change-Id: I4d06f07eb8bd80b4a3042c98fed8acfbc6ccdd4d
2019-10-23 14:08:18 +02:00
Roman Dobosz
1b97158c89 Move from Neutron client to OpenStackSDK.
OpenStack SDK is a framework, which provides consistent and complete
interface for OpenStack cloud. As we already use it for Octavia
integration, in this patch we propose to use it also for other parts of
Kuryr.

Implements: blueprint switch-to-openstacksdk
Change-Id: Ia87bf68bdade3e6f7f752d013f4bdb29bfa5d444
2019-10-23 14:08:18 +02:00
pengyuesheng
1fc9cdce5d Switch to Ussuri jobs
Change-Id: I7e01e1bf827e130a1b491db78b80d877356881a3
2019-10-23 15:42:15 +08:00
Zuul
80f990fed4 Merge "Remove namespace leftover upon kuryr-controller restart" 2019-10-22 12:43:36 +00:00
Itzik Brown
d98c2ed82b Set configmap_modifiable=True in pools gate
Change-Id: I49e0f59008894078f9e40198873caa78767ef0b3
2019-10-22 15:23:23 +03:00
Danil Golov
b53ea8760e Use pyroute2 to tweak vf in sriov
Since possibility to operate with virtual functions
was introduced in pyroute2 it is not necessary
to use ip program in kuryr-kubernetes anymore.

This commit adds a using of pyroute2 library
in sriov binding driver.

Partially implements: bp use-pyroute2-to-tweak-vf-in-sriov
Change-Id: I3cb2da476a6948dc98b2312a5779e47a410832bf
Signed-off-by: Danil Golov <d.golov@samsung.com>
2019-10-22 17:15:47 +09:00
Zuul
dbe742cf59 Merge "Catch right exception for ConnectFailure at activating vif" 2019-10-21 14:48:33 +00:00
Luis Tomas Bolivar
6d43ad4c78 Remove namespace leftover upon kuryr-controller restart
When a namespace is deleted, kuryr-controller is in charge of
deleting its associated openstack resources (net, subnet and ports)
as well as the associated KuryrNet CRD.

As removing OpenStack resources may take some time, if the
kuryr-controller is restarted by any different reason during that
process, the resources will be left behind as no new events for the
namespace (already deleted) will happen after the restart. This
patch fixes this problem by ensuring upon reboot that there are no
orphan KuryrNet CRDs for unexisting namespaces, and deleting them
in case there are (including its associated OpenStack resources).

Closes-Bug: 1848761

Change-Id: I0c4852f5bb816756cc1bf536354da20aa3948dc7
2019-10-21 16:45:10 +02:00
Zuul
d29a3c228a Merge "Use upper-constraints in docs builds" 2019-10-18 15:24:40 +00:00
Luis Tomas Bolivar
d442760442 Catch right exception for ConnectFailure at activating vif
Change-Id: I4122d73ca6e653b11c856fc7d3576d5e8af496fd
2019-10-18 12:51:48 +02:00
Zuul
6446f70da0 Merge "Just check k8s 1.16" 2019-10-17 19:21:55 +00:00
Zuul
0e312184b5 Merge "Add not-ready tolerations to kuryr pods" 2019-10-17 19:21:54 +00:00
Zuul
d3944df6ca Merge "NestedVIFPool: React when status.hostIP is missing" 2019-10-17 12:00:55 +00:00
Zuul
ed9150da9d Merge "Avoid race between Retries and Deletion actions" 2019-10-17 08:11:01 +00:00
Zuul
643c8261c1 Merge "Avoid controller crash upon unexpected neutron error handling ports" 2019-10-16 23:01:06 +00:00
Luis Tomas Bolivar
998be3bbda Avoid race between Retries and Deletion actions
This patch set increases the timeout to wait for resources to be
created/deleted. This is needed to better support spikes without
restarting the kuryr-controller. This patch also ensures that
future retry events are not afecting the kuryr controller if
they are retried once the related resources are already deleted,
i.e., the on_delete event was executed before one of the retries.

Closes-Bug: 1847753
Change-Id: I725ba22f0babf496af219a37e42e1c33b247308a
2019-10-16 18:25:01 +02:00
Michał Dulko
5fb1f5908a NestedVIFPool: React when status.hostIP is missing
Seems like there's a race condition or bug in K8s that on DELETE events
we can end up with annotated pod that doesn't have `status.hostIP` field
set. This is problematic for NestedVIFPool driver that used it as one of
the pool key elements.

This patch solves that by looking up host IP through Neutron and trunks
info if the field is missing from the pod.

Change-Id: Ib477213bab7e09bf6520f60b31d7d30584d90199
Closes-Bug: 1848172
2019-10-16 17:52:48 +02:00
Michał Dulko
5f77e77578 Update K8s version support matrix
We haven't updated the Kubernetes version support matrix for a while.
This commit does so and adds a few disclaimers and explanations in
there.

Change-Id: I51bb352f6115ac4c903e77c69d241ae6bb79e5f4
2019-10-16 11:56:25 +02:00
Zuul
3977663c1c Merge "Add a loadbalancer CRD" 2019-10-15 14:47:13 +00:00
Michał Dulko
b95a0c33c9 Use upper-constraints in docs builds
We've just got hit by cffi pypi package upgrade. This is because we're
not using upper-constraints in our `docs` tox environment. This commit
fixes that by adding it to the env.

Change-Id: Ia4719e7f98b2f6632f321b215f4a31015cc1ca69
2019-10-15 15:29:07 +02:00
Alexey Perevalov
1f3ee029dc Just check k8s 1.16
Change-Id: I49ab21e56632cefaaa307ae0e453050e7ca5dd7f
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
2019-10-15 12:26:09 +00:00
Michał Dulko
9c9eac0c80 Add not-ready tolerations to kuryr pods
Seems like Kubernetes 1.16 is more strict regarding not-ready taint on
the node and keeps it until CNI is correctly configured. This means that
we at least need kuryr-cni to have toleration for that. This commit adds
it to both kuryr-cni and kuryr-controller as well as missing master
toleration to kuryr-controller.

Change-Id: Ifa9c27a416c3347441a2568b37e1bb7b0eba2f28
2019-10-15 14:21:32 +02:00
Zuul
f3a675d40b Merge "Fix CNI_COMMAND=VERSION case" 2019-10-15 10:42:05 +00:00
Luis Tomas Bolivar
9cd4ad3b14 Avoid controller crash upon unexpected neutron error handling ports
This PS ensures that kuryr-controller does not crash if neutron
cannot be reached to check the port status, or if neutron replies
with unexpected error when trying to add ports to the trunks

Change-Id: I037a882e1231118b3e85abace8cc13c4e79ee6da
Closes-Bug: 1848012
2019-10-14 18:52:10 +02:00