Commit Graph

29 Commits

Author SHA1 Message Date
Ghanshyam Mann 6ac2b4a813 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I91c271d46a2b596c1c007b741363ba51f0b1690a
2022-04-30 20:20:07 -05:00
Roman Dobosz 00a0701ef6 Bump docutils version on lower constraints.
Because docutils 0.11 cannot be build anymore from source on python >=
3.8, and there is no wheel package available on pypi, we need to bump it
to version 0.12, since there is still wheel available.

Note, that 0.12 version also will fail building, since it pretty much
ancient - current version is 0.18.1.

Change-Id: I307f09e3c47d3d44084054979be5cb554fa33d60
2022-01-04 08:02:41 +01:00
Michał Dulko 87981d0652 Do not start kuryr-daemon when worker_num <= 1
We've discovered that running kuryr-daemon with [cni_daemon]worker_num=1
breaks pyroute2.IPDB's ability to correctly close threads, leading to a
process leak. This commit makes sure kuryr-daemon will fail to start
when worker_num <= 1.

This required a few more changes in order to make sure that when any
kuryr-daemon subservice dies, kuryr-daemon will shutdown too.

Change-Id: I41afc6fa67abfff62d2f0017db508051a1e7edf4
2021-11-05 14:25:22 +01:00
Iury Gregory Melo Ferreira 2cb2f6a049 Fix l-c and requirements job
- update grpcio in requirements.txt
- update cffi, greenlet and grpcio in l-c to avoid problems
when trying to build the wheels.
- adds .stestr to gitignore

Change-Id: Id2d1c3ea60c33803a35082b9064ccba982b014a7
2021-10-05 21:44:48 +02:00
Maysa Macedo 935d917d48 Export Prometheus metrics
This commit export kuryr_cni_requests_duration, kuryr_quota_free_count,
kuryr_port_quota_per_subnet, kuryr_pod_creation_latency metrics to
Prometheus.

Depends-On: https://review.opendev.org/c/openstack/kuryr-kubernetes/+/811557

Change-Id: I8c8c98153eaf6dd2418efe124c875c1ff9c66205
2021-10-04 09:26:31 +00:00
Maysa Macedo ccc220bbbd Fix CI issues
Bump requirements and lower-constraints libs to allow kuryr to work with
the new pip resolver.

Also update the DevStack plugin to query for docker's cgroup driver
correctly, because the old way suddenly stopped working.

Change-Id: I4f176e2eda194b060abc33e7d1541078cb78d97f
2020-12-10 18:59:13 +01:00
wu.shiming b4775f3234 Remove the unused coding style modules
Python modules related to coding style checks (listed in blacklist.txt
in openstack/requirements repo) are dropped from lower-constraints.txt
as they are not actually used in tests

Change-Id: Ib5aba86111d9f18724a7bcf87cd64c6b3768d82c
2020-10-30 11:00:40 +08:00
wu.shiming 9794359e24 requirements: Drop os-testr
We've switched to stestr.

Change-Id: Ib9ee940acaeb9dec7c4ac3cb9559c02aeb04fd55
2020-09-30 11:54:13 +08:00
Michał Dulko 9f722e6200 Periodically fetch full list of watched resources
Kuryr-Kubernetes relies on watching resources in K8s API using an HTTP
stream served by kube-apiserver. In such a distributed system this is
sometimes unstable and e.g. etcd issues can cause some events to be
omitted. To prevent controller from such situations this patch makes
sure that periodically a full list of resources is fetched and injected
as events into the handlers.

We should probably do the same for kuryr-daemon watcher, but that case
is less problematic as it'll be restarted in event of ADD requests
timing out.

Change-Id: I67874d086043071de072420df9ea5e86b3f2582e
2020-06-30 12:31:32 +02:00
Hervé Beraud 9730f0ab86 drop mock from lower-constraints
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we don't need it
in lower-constraints.

These changes will help us to drop `mock` from openstack/requirements

Change-Id: I01e577ce32814268381ed825fdb30c2d5a0980e9
2020-06-09 01:19:16 +02:00
Andreas Jaeger 110a8ba12d Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I4c358db3b0aae6370875c61120182443532c8e7b
2020-05-30 18:40:53 +02:00
Roman Dobosz ded6b6debc Removing six library.
Since we already migrated fully to Python3, it's time to also remove
bits needed for Python2. One of those libs is six.

Change-Id: Ib984d7b4b3c1048ed091c78986c634689a8ace8c
2020-02-28 14:45:46 +01:00
Gary Loughnane edc6597fe2 Add DPDK support for nested pods
Add DPDK support for nested K8s pods. Patch includes a new VIF driver on
the controller and a new CNI binding driver.

This patch introduces dependency from os-vif v.1.12.0, since there
a new vif type.

Change-Id: I6be9110192f524325e24fb97d905faff86d0cfef
Implements: blueprint nested-dpdk-support
Co-Authored-By: Kural Ramakrishnan <kuralamudhan.ramakrishnan@intel.com>
Co-Authored-By: Marco Chiappero <marco.chiappero@intel.com>
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
Signed-off-by: Danil Golov <d.golov@samsung.com>
2020-02-04 10:59:45 +03:00
Michał Dulko fb602cd350 Bump openstacksdk to 0.36.0
We have numerous issues with openstacksdk compatibility, let's bump it
to Train version = 0.36.0. Also some other deps need to be bumped too.

Change-Id: Ibdae122c565b294622ebdcadf2e562a37cccd4d1
2019-12-20 12:04:13 +01:00
Roman Dobosz 7bc2cd23d3 Bump OpenStackSDK version to 0.17
We need at least 0.17, since there is a lot of improvements since 0.13,
which we need for smooth transition from clients use to OpenStackSDK.

Change-Id: Ia86fe9ae075a7feba2f15c0804f6b9b37af12e61
Implements: blueprint switch-to-openstacksdk
2019-11-28 16:46:32 +01:00
Michał Dulko 322394050e Fix lower-constraints gate after switch to py36
To make lower-constraints gate work with Python 3 we need to upgrade
eventlet to 0.22.0. Also it's now safe to drop Python 2 entry for
Sphinx.

Change-Id: I50663c428cf5524526055374e53964b86609f653
Depends-On: https://review.opendev.org/#/c/693631/
2019-11-19 12:37:52 +01: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
pengyuesheng 00470c03b6 Bump the openstackdocstheme extension to 1.20
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.

Change-Id: If6fb08ed3e47c6981b9dd6092d57adf7fa914066
2019-08-15 13:50:20 +08:00
Michał Dulko 42734340b9 Raise keystoneauth version in lower-constraints
Seems like openstacksdk haven't raised required keystoneauth version
when merging I04e356e7856b020cd20aa598e291ef31e02730d2. This resulted in
our lower-constraints.txt having 3.4 instead of at least 3.8 being
required to run openstacksdk 0.13.0. This commit solves that by raising
the version to 3.8.

Change-Id: Ib3da6e60e5ed4348fd94109bb6bf48a89f5e22b2
2019-07-01 13:01:26 +02:00
Michał Dulko 1ec05b5581 Add Tempest gate with lower-constraints
Numerous times we hit issues when testing packaged versions of Kuryr
that use dependencies with versions between our lower-constraints.txt
and global requirements/upper-constraints.txt. Each time we found
issues and that's because our lower-constraints gate was not functional.
To further increase test coverage of lower-constraints this commit adds
a functional gate that will run Kuryr with old dependencies.

This is implemented by simply overwriting UPPER_CONSTRAINTS_FILE
build-arg when building Kuryr containers.

Besides that cotyledon's minimum version is raised to 1.5.0 as we're
actively using a feature added back then (it was in late 2016, so we
should be safe here).

Change-Id: Ic148020d1a0ec98150d8c61b21bbbe44b7be2075
2019-06-14 09:32:52 +02:00
Michał Dulko 533ab7cff5 Fix incombatilibity with openstacksdk <= 0.17.2
We keep 0.13.0 as minimum supported version of openstacksdk in
lower-constraints.txt, but we've found an issue running with 0.17.2. The
issue is fixed by switching from dict notation to object notation when
accessing properties of calls to openstacksdk as only newer versions of
openstacksdk support dict notation.

Another side of the story is that our lower-constraints job doesn't
really install versions from lower-constraints.txt due to a mistake in
tox.ini. Maybe we could have avoided the aformentioned bug if we had
noticed that before. This is fixed by this commit and that also required
me to bump up the pyroute2 to 0.5.3 in upper-constraints.txt as
apparently 0.5.1 isn't py3-compatible. protobuf is bumped to 3.6.0 as
3.5.2 version apparently wasn't compatible with our own code.

The unit tests are now updated to make sure using dict notation to
access openstacksdk objects will fail on lower-constraints job in the
future.

Change-Id: I5113f7574f4d2e450de95494c9287bb7427e67d4
Closes-Bug: 1830398
2019-05-28 09:08:11 +02:00
Ilya Maximets 685f4c456a Add PodResources service client
PodResources client could be used by sriov cni to obtain devices
allocated for container by sriov device-plugin.

KubeletPodResources service is still in alpha, so it should be
explicitly enabled in kubelet feature-gates:
    kubelet --feature-gates KubeletPodResources=true

New config option 'kubelet_root_dir' added to 'sriov' section
that defaults to kubelet default root-dir '/var/lib/kulelet'.
In case kubelet started with non-default root directory passed
via '--root-dir' option, the same value should be configured
in 'kubelet_root_dir'.
Note that if sriov binding driver will be used inside container
'kubelet_root_dir'/pod-resources directory should be mounted
to this container in order to allow communication with kubelet
via gRPC protocol over the unix domain socket.

Partial-Bug: 1826865
Depends-On: https://review.openstack.org/#/c/652629
Change-Id: Icf088b839db079efe9c7647c31be4ead867ed32b
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
2019-05-20 14:16:04 +03:00
Michał Dulko b90ca1b9b9 Switch Octavia API calls to openstacksdk
For a while we were using a dirty hack to call Octavia API - i.e.  we
were mocking python-neutronclient to use a session pointing to Octavia
endpoint. This was a workaround to save some effort that was needed to
introduce python-octaviaclient dependency.

As Kuryr is strongly tied to Kubernetes version it is serving, we should
try to limit its dependency on OpenStack versions. E.g. we should be
able to cooperate with various versions of Octavia. openstacksdk is a
tool that is designed to do exactly that, adding abstraction layer that
hides differences between APIs and as last resort allowing doing bare
HTTP calls, while taking care of all the Keystone stuff for us.

This commit removes the ugly workaround mentioned in first paragraph and
switches all the LBaaS v2 calls to use openstacksdk's Octavia proxy.
Also some leftovers from LBaaS v2 removal are cleaned up, e.g. logic
behind not using cascade deletion or workaround for LbaaS v2 issues with
pools.

Implements: blueprint switch-to-openstacksdk
Change-Id: Ic0bb56f90fe9effcdcb2ae5db96b8a1ec19738df
2019-03-07 17:38:27 +01:00
Luis Tomas Bolivar d8c04167e4 Upgrade Flask version due to security concerns
Change-Id: I080716f5fcdea5d50b4a5c30ffb9c83ab501da46
2019-02-14 10:09:40 +01:00
Zuul c2fbe8a027 Merge "Try pyroute2 0.5.1" 2018-07-17 11:37:16 +00:00
Michał Dulko 6e30059e14 Try pyroute2 0.5.1
Newer pyroute2 includes a few fixes and improvements, let's see if it's
compatible with us.

Change-Id: I7d92f94decfc65d35d27077b2eb931632b9d53a4
2018-07-16 17:34:16 +00:00
Chuck Short 055f31365e Switch to using stestr
According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects should migrate.

Let's switch it then.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: Idf2f91565f9205c745a7110be5bf81267bd3caf5
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-07-16 15:43:10 +00:00
Michał Dulko 5b9bb03e77 Update lower-constraints to match requirements.txt
Seems like we've did something wrong when applying initial
lower-constraints.txt and now the job fails with errors about that file
being incompatible with requirements.txt and test-requirements.txt.

This commit attempts to fix that by updating lower-constraints.txt to
match requirements.

Change-Id: I0a10a408a6ae6e015ce5f5243d61cfcff230df44
Closes-Bug: 1766898
2018-04-25 18:01:27 +02:00
Doug Hellmann 183aeebf5c add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: Ic0e992533d1b5840e665aa1a5a311c3e1b0d74e8
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-23 17:30:00 +01:00