Commit Graph

2340 Commits (4fa1445d70ffaa548d1d54ce328fbbd11d9677b9)

Author SHA1 Message Date
Renu 4fa1445d70 Software image path miss in uploading VNF package
Software image path is not stored in DB while
uploading VNF package.

Closes-Bug: 1879872
Change-Id: Ifac069a06009bb28ad7dc717c9562a52f52ed7df
2022-01-21 06:20:02 +00:00
Ayumu Ueha d3b8083d35 CI: Extend timeout for CNF entire heal in Helm FT
An error occurred at the FT of CNF LCM with Helm chart on the
sol-kubernetes job due to the time it took to remove the Kubernetes
resources for the entire heal operation.
There is not enough time to wait for the status to COMPLETED, and the
heal operation itself succeeded.
This patch extends the timeout period to avoid errors.

Change-Id: I1a39707e64c481677c9bad9a6c3073dc2b9ed6ce
2021-12-20 09:27:46 +00:00
Zuul a1055b1edf Merge "Update python testing classifier" 2021-12-18 01:51:57 +00:00
Zuul 62aca585e6 Merge "support rollback operation task of v2 API" 2021-12-18 01:50:01 +00:00
Zuul 4f2104a35b Merge "support retry operation task of v2 API" 2021-12-17 08:44:49 +00:00
Itsuro Oda 4b5204b213 support rollback operation task of v2 API
This patch implements rollback operation task defined in ETSI NFV-SOL003
v3.3.1 5.4.15.

This patch supports rollback operation of existing task API, i.e
instantiate. Note that rollback operation of terminate is not supported.

Rollback operation of a task API which is added in the future
(ex. scale) will be implemented in the same patch
of implementing the API.

Functional tests will be provided with another patch.

Implements: blueprint support-nfv-solv3-error-handling
Change-Id: I3b2924287f7b30a85c250602a3f5ecbffd449a5e
2021-12-17 08:36:50 +00:00
Zuul 1e19534563 Merge "Use LOG.warning instead of deprecated LOG.warn" 2021-12-15 09:05:34 +00:00
Zuul 0c9f982eb6 Merge "Set default namespace when caling k8s scale API" 2021-12-15 06:22:04 +00:00
Zuul 05f819c084 Merge "Add doc of Helm chart for Kubernetes VIM" 2021-12-15 05:48:05 +00:00
Takashi Kajinami fee4d127dd Use LOG.warning instead of deprecated LOG.warn
The LOG.warn method is deprecated[1] and the LOG.warning method should
be used instead.

[1] https://docs.python.org/3/library/logging.html#logging.warning

Change-Id: Icafbee2e8615aa8a246de3e2e796c685257b6cd4
2021-12-15 01:28:39 +00:00
Manpreet Kaur 84224f7102 Update python testing classifier
Yoga testing runtime[1] has been updated to add py39
testing as voting. Unit tests update are handled by the
job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit updates the classifier in setup.cfg file.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: I867579b593ed6aa97d8dcab80de2c181a764400b
2021-12-14 21:04:45 +05:30
Zuul 65b7fa8cd5 Merge "Update Pylint config file for development" 2021-12-14 08:47:19 +00:00
Masaki UENO 4f25101c17 Update Pylint config file for development
Current Tacker repository contains .pylintrc, which is a configuration
file of Pylint [1].

[1] https://pylint.org/

However, it is not maintained for 8 years ago,
so it contains some out-of-date configurations
for current Pylint version.

This patch removes those out-of-date configurations,
and introduces some useful configurations for IDE integration.

Signed-off-by: Masaki UENO <masaki.ueno.up@hco.ntt.co.jp>
Change-Id: I9e09a6befef2ef22e09f1a0b0ed2a75bf173a4f6
2021-12-10 02:38:07 +00:00
Itsuro Oda 3b699da0a4 fix grant request of terminate
This patch fixes a bug of making grant request of terminate v2 API.
There was a lack of consideration for a VDU port which was specified
by extLinkPorts of extVirtualLinks in InstantiateVnfRequest when the
vnf instance was instantiated.

Closes-Bug: #1952821
Change-Id: I9dde61ae8a3c9a12b1a89cf62e73a5ab34600882
2021-12-09 22:12:10 +00:00
Itsuro Oda bf51c2bc80 support retry operation task of v2 API
This patch implements retry operation task defined in ETSI NFV-SOL003
v3.3.1 5.4.14.

Basically retry operation is not task API specific. Thus retry
operation of a task API which is added in the future (ex. scale)
will be supported naturally.

Functional tests will be provided with another patch.

Implements: blueprint support-nfv-solv3-error-handling
Change-Id: I2717540f042882363cce3d1a0da22c71789a36cb
2021-12-08 04:30:51 +00:00
Ayumu Ueha e2fa03fb7b Set default namespace when caling k8s scale API
The error is occur on calling read/patch_xxx_scale API of kubernetes
python client when using manifest that has no namespace in Helm chart.
This patch fixes this problem by setting namespace to "default" if it
is an empty string or None.

Closes-Bug: #1953477
Change-Id: I5f5bc38c023bbe7674c7513e4a0609c217936595
2021-12-08 03:52:14 +00:00
Zuul e501198b0f Merge "Add fenix in k8s local.conf example" 2021-12-07 02:03:22 +00:00
Zuul 02c1d81c76 Merge "CI: Use python-aodhclient from git repo in Zuul FT" 2021-12-06 01:45:51 +00:00
Ayumu Ueha 777c2f06ec CI: Use python-aodhclient from git repo in Zuul FT
python-aodhclient must be installed from the git code in order for Zuul
FT to succeed until the patch [1] fix is applied to it installed by pip.

[1] https://review.opendev.org/c/openstack/python-aodhclient/+/819393

This patch changes to use python-aodhclient from git repo in Zuul FT.

Change-Id: I2cf11c47ab64a29c72e3ccbbe4baa3c45c446364
2021-11-30 02:57:16 +00:00
Zuul 92b892a03c Merge "Revert "Skip some FTs failed due to heat bug"" 2021-11-29 15:18:08 +00:00
Yasufumi Ogawa dc85dc254d Add fenix in k8s local.conf example
This update is to add Fenix plugin in the example of `local.conf` for
Kubernetes.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: I2a7c9c57e2f651057f1a3f170f34555d8ece02f5
2021-11-24 16:12:00 +09:00
Itsuro Oda 8029f4e101 fix contents of grant request
This patch fixes some attributes of grant request for instantiate
and terminate of v2 API.

In the process of fixing bug #1949318 and adding UTs, some other
mistakes are found and fixed at the same time.

* fix number of STORAGE resource definitions of instantiate grant
  request is not correct.
* fix extManagedVLs are included in VL resource definitions of
  instantiate grant mistakenly.
* fix interpretation of vnfcCpInfo attributes is not correct when
  making terminate grant request.
* fix an incorrect variable used to handle extManagedVirtualLinkInfo
  when making terminate grant request. (fix bug #1949318)

Closes-Bug: #1949318
Change-Id: I61baaee8fec5bb2e1e954900dd2b9361ac594546
2021-11-24 03:53:07 +00:00
ueha.ayumu bb7d75daff Revert "Skip some FTs failed due to heat bug"
This reverts commit 5eced54d7f.

The heat bug has been fixed in patch [1] and merged, so remove the
added skips.
[1] https://review.opendev.org/c/openstack/heat/+/813124

Change-Id: Id05eae9e5141d8baeea3c5336062a41e9d6366f5
2021-11-24 01:43:19 +00:00
ueha.ayumu 79ad3ec71f Add doc of Helm chart for Kubernetes VIM
Usage guide for how to install Helm to Kubernetes Cluster and deploy
CNF using helm chart is added in user docs.

Change-Id: I62e73f1457741ad811a89ab08630ce133cad8837
2021-11-24 01:43:12 +00:00
Ayumu Ueha 975cce621e CI: Create admin endpoint for keystone
A recent devstack change [1] has switched off the creation of an admin
endpoint for keystone, which we need. Create it again until we update
Tacker to stop using it.

And devstack patch [2] has stopped creating userrc_early and If we do
not use OS_CLOUD, we must override the --os-cloud option of the
openstack command.
So, this patch fixes to set default OS_CLOUD setting overridden.

And for UUID formatting checks in db/types.py, fix to use first
element for List, since value may be passed as a List.

[1] https://review.opendev.org/c/openstack/devstack/+/735472
[2] https://review.opendev.org/c/openstack/devstack/+/780417

Change-Id: I39be7c48aca4be9a4e0bcec6dc6fa45b11c623b3
2021-11-22 09:16:33 +00:00
Ayumu Ueha 6cab16be36 Exclude db/types.py from sphinx-apidoc target
SQLAlchemy 1.4.27 released on Nov 11, and tox-docs job error become
to occur since then.
`:ref:` attribute introduced from 1.4.27 in docstring of the parent
class of our TypeDecorator cannot be referred.
This patch fixes the error by excluding db/types.py from target of
sphinx-apidoc.

Change-Id: If7944774f2336d8f98124e9934da47b11801c607
2021-11-16 23:53:59 +00:00
Marcin Juszkiewicz 8c69dda51f drop anyjson requirement
Anyjson 0.3.3 is 9 years old project and is not installable on Python 3:

INFO:kolla.common.utils.tacker-base:Collecting anyjson>=0.3.3
INFO:kolla.common.utils.tacker-base:  Downloading anyjson-0.3.3.tar.gz (8.3 kB)
INFO:kolla.common.utils.tacker-base:ESC[91m    ERROR: Command errored out with exit status 1:
INFO:kolla.common.utils.tacker-base:     command: /var/lib/kolla/venv/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zkeekfya/anyjson_956fe77196244503b52f1d5b9cacb75f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zkeekfya/anyjson_956fe77196244503b52f1d5b9cacb75f/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6n_kkxqa
INFO:kolla.common.utils.tacker-base:         cwd: /tmp/pip-install-zkeekfya/anyjson_956fe77196244503b52f1d5b9cacb75f/
INFO:kolla.common.utils.tacker-base:    Complete output (1 lines):
INFO:kolla.common.utils.tacker-base:    error in anyjson setup command: use_2to3 is invalid.
INFO:kolla.common.utils.tacker-base:    ----------------------------------------

And use of anyjson was dropped over 5 years ago:

commit aaeda502bb
Author: gong yong sheng <gong.yongsheng@99cloud.net>
Date:   Tue Jun 7 13:48:39 2016 +0800

    Use oslo serialization jsonutils

    Change-Id: I081697d987fc7c2bcd4ae73b97aedc058c57a84f

Change-Id: Ic4ceea9461a4d7e2e7afb3d7df93e530f7cd1ac3
2021-10-20 15:26:29 +02:00
Zuul 52d530b027 Merge "Add Location to responses of Create VNF Package" 2021-09-30 06:20:32 +00:00
Hiromu Asahina 36ef500c41 Add Location to responses of Create VNF Package
According to SOL005 v3.3.1 Table 9.4.2.3.1-1 [1], the HTTP response
shall include a "Location" HTTP header that contains the resource URI of
the individual VNF package resource.

In order to realize the above, this patch adds a Location header, which
includes a URL of a created VNF Package, to responses for `POST
{apiRoot}/vnfpkgm/{apiMajorVersion}/vnf_packages` requests.

Also, this patch removes unused arguments from methods in ViewBuilder.

[1] https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/03.03.01_60/gs_NFV-SOL005v030301p.pdf

Signed-off-by: Hiromu Asahina <hiromu.asahina.az@hco.ntt.co.jp>
Change-Id: I754afaaf910de0048f4f11e259c644b3e0baea99
Closes-Bug: #1915109
2021-09-30 09:36:54 +09:00
Zuul 03fe8aebed Merge "Modify Network Resource Information used by FT" 2021-09-29 08:58:28 +00:00
Zuul 0f4555f2ba Merge "Fix create duplicated subscriptions" 2021-09-27 12:47:00 +00:00
Hiromu Asahina 2d9521b2bd Fix scaling during the heat cooldown
When scaling occurs during the heat cooldown, VNF is not actually
scaled but the scale_level value in the VNF information will change.
This bug happens because Heat does not return any error responses when
it cannot perform scaling action due to the cooldown, and thus Tacker
cannot detect a scaling failure.

To fix this bug, this patch changes the ``scale`` method of OpenStack
infra-driver to wait for scaling until cooldown ends.

Closes-Bug: #1925119
Change-Id: Ieca345d7e46e03756d34f7d00b37ebc9c25d8d8b
Signed-off-by: Hiromu Asahina <hiromu.asahina.az@hco.ntt.co.jp>
2021-09-26 14:17:34 +00:00
Yasufumi Ogawa 9c7308ec6f Update version of doc8 to 0.9.0
As the version of doc8 in upper-constraints.txt in requirements project
was changed to `0.9.0`, it's required to update the version in tacker.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: Ib41af0a9b6402d9c0644d5270ed4f532d01a0ece
2021-09-23 06:03:54 +00:00
Yi Feng db9b91aecc Fix create duplicated subscriptions
When creating a duplicated subscription, according to spec SOL003,
the api should return 303 See Other instead of 201 Created.

To fix this error, the following things is done in this patch:
1.Fix the error when the database virtual field extracts
the value from json in table `vnf_lcm_filters`.
2.Fix the error of sql query statement when querying subscription.
3.The attribute VnfProductsFromProviders should be an array, not an
object. Fix this error in UT, FT and schemas.
4.Fix typos when writing "object" as "objects" in dict "_versions"
in vnf_lcm schemas.
5.Rewrite the throwing and catching of SeeOther exception of this
api to fix the following errors: SeeOther should be thrown instead
of Exception; the return body should be empty instead of
ProblemDetail; the return header should contain location instead
of link.

Closes-Bug: #1933169
Change-Id: I51c198d60001dba94dd369f495cecef526e79800
2021-09-20 17:16:25 +09:00
OpenStack Release Bot 14e7fb568e Add Python3 yoga unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for yoga.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I8f3325c4a9d938bdd7185befd34eb1b166a3e0c6
2021-09-17 14:02:59 +00:00
OpenStack Release Bot 0e231710d0 Update master for stable/xena
Add file to the reno documentation build to show release notes for
stable/xena.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.

Sem-Ver: feature
Change-Id: I80feb85ac58a3ffe498f11560cf847975b0c5f63
2021-09-17 14:02:57 +00:00
Yi Feng 6929cbc3f1 Support PVs for k8s cluster with MgmtDriver
Support deploying Kubernetes cluster VNF which has a storage server
with Cinder volume. This feature enables users to deploy CNF which
has PersistentVolume on it. The following changes are added for
MgmtDriver.

1.Create a storage server VM with Cinder volume.
2.Expose Cinder volume as NFS shared directories in the storage
server.
3.Register NFS shared directories as Kubernetes PersistentVolumes.
4.Install NFS client on newly created Master/Worker VMs in all LCM
operations.

Implements: blueprint pv-k8s-cluster
Change-Id: Iaab9b6393e6f2007c637f83a82de0d27cf9db257
2021-09-17 18:57:49 +09:00
Zuul a7de7a589b Merge "Update instructions of installing k8s VIM" 2021-09-17 09:45:22 +00:00
Zuul c6c8c7b6ba Merge "Support TOSCA route for ChgExternalConnectivity" 2021-09-17 09:45:20 +00:00
Zuul 4477c75393 Merge "Private registry for deploying Kubernetes cluster" 2021-09-17 09:45:18 +00:00
Masaki UENO 34aec336d9 Update instructions of installing k8s VIM
The current `Kubernetes VIM installation` page has some
out-of-date instructions.

This patch replaces those out-of-date instructions with current
kubernetes manner, and fixes some other trivial mistakes
in the document.

Change-Id: I3d37aa215a9629f4ded92d0b4cb1b930658a2113
Signed-off-by: Masaki UENO <masaki.ueno.up@hco.ntt.co.jp>
2021-09-17 18:11:10 +09:00
Zuul 69d13ce365 Merge "Add groups under topology_template in vnf_dict" 2021-09-17 09:09:44 +00:00
Yi Feng 26910f1c27 Private registry for deploying Kubernetes cluster
This patch implements spec
Support deployed Kubernetes cluster using the images in a Docker
private registry with MgmtDriver in blueprint bp/cir-k8s-cluster.

It includes mgmt_driver scripts of deploying a Docker private
registry to vm created by openstack_driver.
Support instantiate/terminate/heal function.

It includes mgmt_driver scripts of deploying kubernetes cluster
that can use images in Docker private registry to vm created by
openstack_driver.
Support instantiate/terminate/scale/heal function.

It also includes a shell script that actual install kubernetes
cluster and configure environment to support Docker private registry
on vm.

Implements: blueprint cir-k8s-cluster
Change-Id: I7adab1d1eaa491a37399d0b615cbee4c6ae86657
2021-09-17 15:45:58 +09:00
Navum Gupta 9e9741b132 Add groups under topology_template in vnf_dict
This patch will include `groups` in `topology_template`
of `vnf_dict`.

Closes-Bug: #1929811
Change-Id: Ic05b58a2c4a605459822936b21a87a97b1899ce5
2021-09-17 05:45:20 +00:00
Yi Feng 2bd3d5670b Sample script for healing k8s with kubespray
This patch and "Sample script for deploying k8s with kubespray",
"Sample script for scaling k8s with kubespray" are actually the
same one. For the convenience of review, they
were submitted separately.

This patch is only about the content of heal k8s nodes. However,
since the processing of scale_start is similar to heal_start,
and the processing of scale_end is similar to the processing of
heal_end, the code of scale has been refactored and the common
processing is extracted as a common method. At the same time,
when CNF needs to perform `heal_entire`, the configuration file
of Load Balancer needs to be re-modified, so heal-related
processing is added to the example MgmtDriver of CNF's `NodePort`.

Because the input parameter of terminate and heal is limited,
the type of this parameter is also modified. In
`NFV-SOL003 v2.6.1`[1], the `additionalParams`'s type is
`KeyValuePairs`, so we changed the additionalParams's type from
`list` to `dict` in heal_vnf_request. In order not to affect
the original function, we modified the original additional_params
to legacy_additional_params and retained the original processing,
and revised the UT code.

[1] https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.06.01_60/gs_NFV-SOL003v020601p.pdf

Implements: blueprint k8s-mgmtdriver-kubespray
Change-Id: Ibf8b56904b1326f5c7d323c9295d10e303f4b4b8
2021-09-17 12:04:50 +09:00
Yi Feng c185114092 Sample script for scaling k8s with kubespray
This patch and "Sample script for deploying k8s with kubespray"
are actually the same one. For the convenience of review, they
were submitted separately.

This patch is only about the content of scale k8s nodes. Since
the content of `NodePort` is not involved when scaling CNF,
there is no need to modify the configuration of Load Balancer.

The type of input parameter `additionalParams` of
ScaleVnfRequest is `DictOfStringsField`. The type of Kubernetes
cluster parameters used in MgmtDriver is dict, `DictOfStringsField`
type cannot adapt it. So we modify the type of additionalParams to
`DictOfNullableField`.

Implements: blueprint k8s-mgmtdriver-kubespray
Change-Id: Ib5e009c53dd834624d91ea38c9facba832d65d2b
2021-09-17 11:24:28 +09:00
Yi Feng b3bf4ec2ce Sample script for deploying k8s with kubespray
This patch provides a sample script that allows users to install
or delete kubernetes on VMs in the VNF when executing
instantiate/terminate/scale/heal through the kubespray ansible
server.
It also provides script to install and configure Load Balancer
for kubernetes cluster in the VNF.

When instantiating CNF with service resource whose type is
`NodePort` on Kubernetes VIM deployed by kubespray, its port must
be added into Load Balancer's configuration and restart it. So
this patch also provides a sample MgmtDriver and shell script
to fix this problem.

At the same time, we found that if instantiate operation fails,
after the `instantiate_end` operation, the `terminate_end` operation
will not be executed in the rollback, which may cause the
modification in `instantiate_end` remains in the environment, so
this patch adds a `terminate_end` operation in `post_rollback_vnf`.

Implements: blueprint k8s-mgmtdriver-kubespray
Change-Id: I45661b5d8006e87db5f46a595756231849723ce6
2021-09-17 10:53:59 +09:00
Zuul 89c3afc72d Merge "Sample script of pod-affinity in kubernetes cluster" 2021-09-16 17:27:46 +00:00
Zuul 9cc3cc1a34 Merge "Fix zuul settings to use latest kuryr-kubernetes" 2021-09-16 16:05:12 +00:00
LiangLu f7796901ea Sample script of pod-affinity in kubernetes cluster
This patch support pods to be scheduled on the different
physical Compute server. Through the policy attribute of
the VDU, the Worker node can be instantiated on different
Compute server. Then we can obtain the Compute information
where the worker node is located, and use it as the label
of the Worker node. Finally, pod will be deployed on
different Worker nodes based on labels.

Implements: blueprint hardware-aware-pod-affinity
Change-Id: I71dc5bed94654c19bace77c11fe1202ccdc549c9
2021-09-16 14:49:40 +00:00