2853 Commits

Author SHA1 Message Date
Hongbin Lu
edbd6cfd99 Update installation guide for using python3
Change-Id: Ic64853d9a5ec3a5b30af372dc551bad844541aca
2020-02-17 05:04:38 +00:00
Hongbin Lu
eb1c32951b Add CRI to installation guide
Implements: blueprint add-support-cri-runtime
Change-Id: I61878e646add132e0b685ef3b4f4393a57089bb0
2020-02-17 05:04:38 +00:00
Zuul
6fbf52ae24 Merge "Introduce a CRI driver" 2020-02-08 22:43:52 +00:00
Zuul
1e62d08d28 Merge "Move port deletion code to zun/network/neutron.py" 2020-02-08 22:16:51 +00:00
Hongbin Lu
67b1ec978f Replace tox_envlist 'all-plugin' with 'all'
The tox envlist 'all-plugin' is deprecated in tempest

Change-Id: I6182926db0c314338c03ed02b1d2f28b057f0eb3
2020-02-05 05:27:41 +00:00
Hongbin Lu
6ebf9b65a7 Introduce a CRI driver
Implements: blueprint add-support-cri-runtime
Change-Id: Ia24e3aafd72ca6250c5c61f62352beb569aa7423
2020-02-02 17:44:18 +00:00
Hongbin Lu
63735680c3 Move port deletion code to zun/network/neutron.py
This allows the neutron port cleanup logic to be reused by other
runtimes.

Change-Id: I213fa67057a5fceaa9a150ab7c68aedd5f2eb4b0
2020-02-02 17:44:11 +00:00
Zuul
da8e5e4e9c Merge "Move create_or_update_port to zun/network/neutron.py" 2020-02-02 17:22:44 +00:00
Zuul
ff543b3944 Merge "Split capsule code out of container driver" 2020-02-01 18:48:06 +00:00
Zuul
995fb81e2d Merge "Treat cpu as float (not integer)" 2020-02-01 18:48:05 +00:00
Zuul
6f1663554c Merge "Refactor container driver" 2020-01-31 02:30:47 +00:00
Zuul
18a829c3e2 Merge "Move volume-related code to base container driver" 2020-01-30 04:40:51 +00:00
Zuul
8f8ac3cb4e Merge "Start zun-cni-daemon in devstack" 2020-01-28 02:44:31 +00:00
Hongbin Lu
69844fe9c7 Start zun-cni-daemon in devstack
Change-Id: I2afe6eba3cfd9687a0eea390f23e95a75888aaec
2020-01-26 22:33:19 +00:00
Hongbin Lu
948af86c41 Treat cpu as float (not integer)
Change-Id: I288f833b69693dc36934549a13123415a71e1578
Closes-Bug: #1860937
2020-01-26 21:13:13 +00:00
Hongbin Lu
54640a22f3 Move create_or_update_port to zun/network/neutron.py
This allows the code to be reused by runtimes that are not using
kuryr.

Change-Id: I758883e348fc5980224381167e85c4cda5c3a155
2020-01-25 22:43:41 +00:00
Hongbin Lu
624eebbc8a Split capsule code out of container driver
Introduce a capsule driver in parallel with container driver.
Capsule logic goes to capsule driver and container logic goes to
container driver.

Change-Id: I0c3efdb0068cfa89b8cfc6cad68425838cd2e50f
2020-01-25 19:59:04 +00:00
Hongbin Lu
83dbf2d5c4 Refactor container driver
Introduce a BaseDriver class that is the base class of all drivers.

Change-Id: I9e4b51821f71768f52898290ced69d3849805415
2020-01-25 19:10:49 +00:00
Hongbin Lu
46a2d314ab Move volume-related code to base container driver
The goal is to be able to re-use the code if we introduce
a second container driver.

Change-Id: I55ca8d25990570f64c62542df683ca90d6ba9c0e
2020-01-25 19:10:41 +00:00
Hongbin Lu
7d174c9ad1 Cleanup container driver inferface
* Remove get_container_name (this API is not used)
* Remove get_addresses (this API is not used)
* Remove get_host_info (this is a docker internal method)

Change-Id: I385f5f5526b2e61b7b11c05fadeab40c98a2c5cb
2020-01-25 19:10:33 +00:00
Hongbin Lu
428f9f8375 Refactor get_available_resources in container driver
Move docker-specific code to DockerDriver subclass.
After the refactoring, generic code stays in base class and
docker-specific code is moved to docker driver subclass.
As a result, we can re-use the generic code in base class
if we introduce a non-docker driver in the future.

Change-Id: I4a68b58f46bc7eaac494909647b87ada7813a8eb
2020-01-25 19:10:25 +00:00
Hongbin Lu
112c5a6cd6 Provide default implementation for several methods
* Implement get_total_disk_for_container
* Implement get_available_nodes
* Implement node_support_disk_quota

Later, we will introduce another container driver and these default
implementation can be re-used.

Change-Id: I67d895844aada6c1743741e6d051aa25109fd1b9
2020-01-25 19:10:15 +00:00
Hongbin Lu
9f7922a7ca Load container driver from entry point
Change-Id: I66fed92c4f67b4552aca3bd8d81b6dda32d70442
2020-01-25 19:09:09 +00:00
Hongbin Lu
b0f8488d95 Move neutron binding constants to zun/common/consts.py
Change-Id: I05586fd1bb6a63181756c7b4878ee483f542ecd4
2020-01-19 23:54:53 +00:00
Zuul
065fcac103 Merge "Add python CRI client" 2020-01-19 22:55:53 +00:00
Hongbin Lu
7c7ee59026 Add python CRI client
This commit introduce the python-binding for iteracting with
CRI runtime via GRPC.
The client code is generated by protocol buffer [1] by using api.proto
in kubernetes/cri-api repo.

The generated CRI client code couldn't pass the pep8 check so this
commit also configure flake8 to skip the zun/criapi directory.

[1] https://developers.google.com/protocol-buffers/docs/pythontutorial

Implements: blueprint add-support-cri-runtime
Change-Id: I2e1a20b47fec5af1f4977148431e1135abd49812
2020-01-18 20:31:27 +00:00
Zuul
adcea58ade Merge "Add 'annotations' to capsule API" 2020-01-16 04:26:44 +00:00
Zuul
fbc555c1ad Merge "Be robust on finding nova resource provider" 2020-01-15 04:50:47 +00:00
Hongbin Lu
9aa9563a8f Be robust on finding nova resource provider
Nova compute create resource provider based on hypervisor_hostname,
which is hypervisor-specific. We would like to be robust on finding
the resource providers.

Closes-Bug: #1858038
Change-Id: Icf217f7e3e75e9dc52a162cd6bfb5459ee8b1daa
2020-01-12 16:47:41 +00:00
Hongbin Lu
0492c35723 Add 'annotations' to capsule API
Implements: blueprint add-annotations-to-capsule
Change-Id: Ibf3f801596c3a768b05fca9ccbef555ddba319af
2020-01-12 16:47:31 +00:00
Hongbin Lu
22936a9aa6 CNI: handle delete when db record is missing
We should let DEL request to succeed even if the DB record is not
found in database. In this case, we cannot retrieve the vif thus
ignoring the vif disconnect step.

Change-Id: I8207d7b624af17ddf002affb626cc4f1d8bdabec
2020-01-12 16:47:19 +00:00
weikeyou
2bf646e9bd Modify incorrect registry test cases
Registry object has no attributes 'cpuset' and 'cpu_policy'

Change-Id: Id0d2d6fab54714373cc53047443e3065a9bb8a46
2020-01-08 09:52:02 +00:00
Feng Shengqin
69c311a1f1 Failed to delete Creating/Error capsule
Change-Id: I6ebd52a1d5339be506296bf2ffa33f91539bb3da
2020-01-07 10:26:54 +08:00
Zuul
573b9c8a35 Merge "Fix the duplicated words issue of "message message "" 2020-01-06 04:08:08 +00:00
zhufl
4f13f6ec49 Fix the duplicated words issue of "message message "
This is to fix the duplicated words issue of
"The error message message about this action".

Change-Id: Ib67b5104d602f9869d92d5c3bef5a772a6f93ccd
2020-01-06 11:19:04 +08:00
Hongbin Lu
f5286b90c5 Introduce CNI plugin for Zun
The CNI plugin is an executable that interacts with the Zun
CNI daemon.

Implements: blueprint support-cni
Change-Id: Iafc8a12bec04136b0c50aedb4ea7789af324f39d
2020-01-05 16:37:05 +00:00
Hongbin Lu
48d7d617c3 Implement Zun CNI daemon
This is a daemon server that serves as a CNI plugin for Zun.

Implements: blueprint support-cni
Change-Id: I8fa5bf7bcf2d0e8e193f79d0c13ffaeba55c6355
2020-01-02 02:03:32 +00:00
Hongbin Lu
0477428aa5 Refactor common/config.py
Change-Id: Ia0d966d78bdedd2a5592c719a78624e9bbace83c
2020-01-02 00:52:09 +00:00
Zuul
8e135cfbb2 Merge "Add 'cni_metadata' to db layer" 2020-01-01 20:15:23 +00:00
Zuul
f60eff9b12 Merge "Change default of resume_container_state as True" 2020-01-01 18:05:01 +00:00
Hongbin Lu
be5d95ac7c Add 'cni_metadata' to db layer
This field will be used by Zun to pass information to CNI plugin.

Change-Id: Id1beeae646cf41fa217424adf2df46fe588a25a0
Implements: blueprint support-cni
2020-01-01 16:25:56 +00:00
Zuul
2f8ad94bd5 Merge "Remove unused db column 'meta' from 'container' table" 2019-12-31 01:38:18 +00:00
Zuul
afad506c9c Merge "Introduce VIFState object" 2019-12-30 17:52:56 +00:00
Hongbin Lu
4a6cbe7d05 Remove unused db column 'meta' from 'container' table
Change-Id: I6e57b4f5ff7d63a4f876de6453f1aa8c8ca95d23
2019-12-30 17:19:50 +00:00
Zuul
3f5178b7dc Merge "check volume name in capsule" 2019-12-30 07:42:19 +00:00
Hongbin Lu
9cc9267897 Introduce VIFState object
This object will be used by the Zun CNI plugin which is under
development.

Change-Id: I093fdfc5beb1ca45993b36c4c9512fa511773965
Implements: blueprint support-cni
2019-12-28 20:45:14 +00:00
Hongbin Lu
29df262075 Rename Network object to ZunNetwork
There is a Network object defined in os_vif library. To avoid
name conflicting, we rename the object in Zun.

Change-Id: I3fe1d8a6c961745801b07612b8982940aa683b3a
2019-12-28 19:06:45 +00:00
Feng Shengqin
0831310910 check volume name in capsule
Change-Id: I21de241311caa27a5eddc75ad452e8488f913c30
2019-12-28 16:58:43 +08:00
Hongbin Lu
4a8e0301de Add 'annotations' to db layer
Change-Id: Ia515de0698bbdabfd8e6a43c4da230869294b008
Implements: blueprint add-annotations-to-capsule
2019-12-21 23:00:48 +00:00
Hongbin Lu
e9e5473d15 PDF documentation build
Change-Id: Ib48ba316d2395fa07fe74ec21e6dc45afd653382
Implements: blueprint pdfdocs
2019-12-13 03:59:51 +00:00