Tacker CI jobs have been failing due to multiple issues:
1. DevStack builds failed with Neutron logger errors and setuptools
incompatibility when Global_Venv=False.
2. python-tackerclient was always installed from PyPI instead of Git
due to missing installation function in Tacker's DevStack plugin.
3. Stricter relationship validation in tosca-parser v2.13.0 caused
template validation errors.
This patch updates sample test data for Tosca-parser validation,
enables Git installation for python-tackerclient, and adjusts job
configurations (Neutron driver and Global_Venv) to resolve Neutron
and setuptools related errors.
Closes-Bug: https://bugs.launchpad.net/tacker/+bug/2118586
Closes-Bug: https://bugs.launchpad.net/tacker/+bug/2119435
Closes-Bug: https://bugs.launchpad.net/tacker/+bug/2119433
Change-Id: If9bb32267c3006bfda53053a5a2b4d59e62e1c2b
Signed-off-by: Shivam Shukla <shivam.shukla3@india.nec.com>
Enhancement of the Ansible Driver To improve flexibility, we will add:
1. Ansible version selection in the VNF-Package
2. Environment variable config for ansible-playbook in tacker.conf
Feature 1 allows tenants to specify the Ansible version for their
validated playbooks. This prevents issues caused by using a single
Ansible version in Tacker.
Feature 2 enables administrators to configure ansible-playbook
options (e.g., log storage locations, callback plugins) via
tacker.conf, removing the need for source code modifications.
Implements: blueprint enhance-ansible-driver-2024oct
Change-Id: Iafd64e6647d8b1868244fb52ef1ae900c066ad61
It is necessary to specify "expand_partial=True" in IPNetwork init
to expand partial addresses from netaddr v1.3.0.
This patch fixes it so that "expand_partial" can be specified
in IPNetwork init.
And bump the hacking version to 7.0.0 and fix the pep8
error:
- AttributeError: 'EntryPoints' object has no attribute 'get'
Closes-Bug: #2089815
Closes-Bug: #2088356
Change-Id: I2deb71242f555bbae5ee7c798add18490cb38344
Correct vimType in vimConnectionInfo or vim_type in vim_connection_info
to `ETSINFV.OPENSTACK_KEYSTONE.V_2` as defined in ETSI-NFV SOL specs.
Closes-bug: #2069800
Change-Id: Ida18790772250a087c03c6e898577747aad0bff4
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Co-Authored-By: Yoshiro Watanabe <fj3838ct@fujitsu.com>
This patch creates a tool to generate VNF Packages
for the following VIM types.
- ETSINFV.OPENSTACK_KEYSTONE.V_3
- ETSINFV.KUBERNETES.V_1
- ETSINFV.HELM.V_3
Each VNF Package is created based on the following VNF Packages.
- samples/tests/functional/
- sol_v2_common/userdata_standard
- sol_kubernetes_v2/test_instantiate_cnf_resources
- sol_kubernetes_v2/test_helm_instantiate
This patch also refactors pkggen.py, which generates VNF packages
for these FTs, and the associated FTs.
Change-Id: I19fe633ae00f70ddf5fff7223f6bfe2afae80489
This patch fixes the path to userdata_standard.py and
container_update_mgmt_v2.py specified in pkggen.py
to the correct one below.
* userdata_standard.py
```
# samples/tests/functional/sol_v2_common/sampleX
userdata_dir =
"../../../../../tacker/sol_refactored/infra_drivers/openstack/"
```
* container_update_mgmt_v2.py
```
mgmt_driver_path = os.path.join(
cur_dir, '../../../../../tacker/sol_refactored',
'mgmt_drivers/container_update_mgmt_v2.py')
```
Closes-Bug: #2074332
Change-Id: Iea5d417bba0e1f9a6518df59ced77d6e50ba34de
This patch is a sample of mgmt driver for vnflcm v2 API
which deploying Kubernetes cluster using cilium CNI.
Implements: blueprint intro-cilium
Change-Id: Ibfd6958048204b53da7ebc8dd1d1694dfb7ee8f1
Co-Author: Yasufumi Ogawa <yasufum.o@gmail.com>
This patch obsoletes Legacy APIs excluding VIM feature.
And this patch mainly contains the following changes:
* Drop the implementation/db of NS and VNFFG functions.
* Remove the implementation that was used only by Legacy VNFM features.
* Remove the following components used only by Legacy features.
* ceilometer
* fenix
* blazar
* Drop the functional test jobs for Legacy features.
* Delete the unnecessary files that were used in Legacy tests.
Implements: blueprint deprecate-legacy-apis
Change-Id: I76ba79f42cf7c3f04c48a87de4ae893f2d53e467
This patch separates the documents for v1 API and v2 API
that are described in the same document in UseCaseGuide.
Existing documents are modified for v1 API, and
v2 API documents are newly placed under `doc/source/user/v2`.
And some VNF Package samples have also been added.
Change-Id: I6d99a660df32b457ea70a64bfd153bc76ac2d9fe
Previously there are a lot of warning messages of setuptools
in the log files of tox jobs. This is mainly caused by test
samples because these are in python codes directories.
This patch moves test samples from under {tacker_root}/tacker/
to under {tacker_root}/samples/.
This patch reduces log messages drastically. For example,
the log file of py38 tox job decreased about 34,000 lines.
Change-Id: I8187ef892c6fe8be323fa5cc20969d298843f1ea
This patch is a part of Legacy APIs deprecation.
Currently, the Tacker uses Mistral for the VIM monitoring but for
nothing else. Maintaining dependency on Mistral only for this feature
is ineffective in terms of maintainability. Moreover, the main use case
of Tacker is now VNFM that is not responsible for VIM monitoring.
This patch removes the dependency on Mistral for VIM monitoring.
Note: although there's no actual use, Tacker also depends on Mistral in
NS LCM, which will be removed by a different patch.
Implements: blueprint deprecate-legacy-apis
Change-Id: Ia11496da7942457239df59b52af817c76e736013
This patch fixes the problem of aborting the wait process even if there
are pods left to be removed by replace when container update feature.
Closes-Bug: #1998756
Change-Id: I6bc5c10fe4c7f646b84798d3b4a296721ccea0f8
The Ansible driver can only run specific script files.
Due to multi artifact support of mgmt driver, it will be extended to
specify script files to be executed in each life cycle.
Implements: blueprint add-ansible-mgmt-driver-sample
Change-Id: Id584a41fc7ae64a682d6dd390a38913e2c7e655b
In the current implementation, when users invoke update operation of
ConfigMaps and Secrets, all Pods are restarted even if they don't use
those updated ConfigMaps and Secrets.
This patch filters out ['Pod', 'Deployment ', 'Replicaset',
'Daemonset'] using the updated ConfigMap/Secret on the original
functionality and updates these resources. No more restarting all
Pods.
Implements: blueprint enhancement-container-update
Change-Id: I2c058979a65fc80c4486bd1f7dfada26ea89d7fd
Tested the Mgmt Driver in the Yoga version and found some bugs.
To fix these bugs, the following things have been done in this
patch:
1. When checking whether the node has k8s installed, since the
value of result.get_stderr() is a list, an error will occur
in the if branch, and the value needs to be modified.
2. Use the _init_commander_and_send_install_scripts function
instead of the RemoteCommandExecutor function to prevent the
VM from getting an error when the connection fails during
the startup phase.
3. Added the type of exceptions caught by the
_init_commander_and_send_install_scripts function.
4. Change the scale_stack_id to scale_out_id_list uniformly to
solve the parameter mismatch between the input values for
mgmt_drvier in vnflcm_driver and mgmt_driver.
5. Add modify_information_start and modify_information_end to
Mgmt Driver.
6. When using the Mgmt Driver to modify the content of the
haproxy configuration file, use the exact match of grep to
find the corresponding line number.
Closes-Bug: #1976440
Change-Id: I94f011fd5061b04dff0840bf90ca10ae2a677874
This patch contains a sample VNF Package that has ansible driver
artifacts. It will be a useful reference for users who choose to use
ansible to configure their target VNFs.
User document of ansible driver usage will be added.
It describes the conditions for running the script, how to create the
package, and an example of how it works.
Implements: blueprint add-ansible-mgmt-driver-sample
Spec: https://review.opendev.org/c/openstack/tacker-specs/+/814689
Change-Id: Ibbb9115a938de19e48f06c59af6bd7e7b222706d
Added a sample Ansible Driver as an option for users
who want to use ansible for configuration of VNFs.
In this Sample Ansible Driver, the following key LCMs
are supported:
- instantiate_end
- scale_start
- scale_end
- heal_end
- terminate_start
Implements: blueprint add-ansible-mgmt-driver-sample
Spec: https://review.opendev.org/c/openstack/tacker-specs/+/814689
Change-Id: I539f1ab5442196865155f12fe0b2b4106feedeae
Added a sample VNF package for practical use cases.
In this sample, the use cases listed below is supported.
- using multiple deployment flavours
- deploying VNF connected to an external network
- deploying VNF as HA cluster
- deploying scalable VNF
Implements: blueprint add-vnf-package-sample-for-practical-use-cases
Spec: https://review.opendev.org/c/openstack/tacker-specs/+/814511
Change-Id: I1c55e028b96ba3c1ad26270d359e0b1165670078
This patch supports MgmtDriver in the operation of modifying VNF.
It provides a sample script MgmtDriver, when modifying CNF,
If the ConfigMap and Secret are updated, the Pod and Deployment will
also be updated (image only).
Implements: blueprint container-update
Change-Id: I1e7a1b03fef13f4c7a83488f6d2fdd7efc2e454b
The LCM retry operation of CNF and MgmtDriver(k8s-cluster)
was verified.
To fix these errors, the following things is done in this patch:
1. When executing retry, if the status of vnf is ERROR, change ERROR to
the status of the corresponding lifecycle.
2. In the scale operation, the judgment condition is added. When vim is
not kubernetes, the `scaleGroupDict` assignment will be used.
3. When an exception occurs in terminate, the task_state in
vnf_instance is changed to None.
4. In the scale operation, add an else branch. If before_error_point is
greater than 4, get resource_changes from vnf_info first. If
resource_changes does not exist, get it by calling the
self._scale_resource_update method.
5. At the beginning of instantiate/heal/terminate, when modifying the
status of vnf, add the judgment condition. When the status is not
ERROR, it can be modified.
6. In the heal/scale operation, add a judgment condition to judge
whether the node exists, and only when the node exists, the delete node
command will be executed.
7. In the instantiate operation, before creating the stack, add to
determine whether the stack already exists.
8. (1) When installing the k8s node with MgmtDriver, add to determine
whether the node already exists in the cluster. If it exists, skip
the node and install the next node.
(2) After installing the k8s cluster, when registering VIM, add to
determine whether the VIM already exists, and if it exists, use it
directly.
Closes-Bug: #1942277
Change-Id: If4e695120eb432155499a2e866ae651a18a320ab
As the current Tacker only provides a limited number of sample VNFs,
this patch adds free5GC VNF samples for the operation verification,
which corresponds to ETSI NFV Plugtests Conformance testing.
This patch adds the following VNF packages.
- VNF
- VNF base
- ChangeExtConn
- Anti-Affinity
Implements: blueprint free5gc-vnf-samples
Change-Id: Ie3e501452b58d4f51ceb793dc1246fb3021546c6
As the current Tacker only provides a limited number of sample VNFs,
this patch adds free5GC CNF samples for the operation verification,
which corresponds to ETSI NFV Plugtests Conformance testing.
Implements: blueprint free5gc-vnf-samples
Change-Id: I414d5c550dc7a45df1c873f8e4313bcc19955a3d
As the current Tacker only provides a limited number of sample VNFs,
this patch adds free5GC CNF on VM samples for the operation
verification, which corresponds to ETSI NFV Plugtests Conformance
testing.
This patch adds the following VNF packages.
- CNF on VM
- CNF
- VNF
Implements: blueprint free5gc-vnf-samples
Change-Id: Ie70b1ebbf43f2ed26fe8e7e3b5dd720c11fdca51
After the X version was released, regression tests were performed
on all functions of MgmtDriver. This patch is used to fix
these bugs.
1. Add the process of getting 'FloatingIP' to kuberenetes_mgmt.py
and private_registry_mgmt.py files, so that users can access the
Registry and Storage VM through the floatingIP when using the CIR
and Storage functions.
2. When the registry is accessed through https, add a `break`
process to the while loop connection in the
`_connect_to_private_registries` method in kuberenetes_mgmt.py
to break out of the loop.
3. Modify the type field in podaffinity_hot_top.yaml to match
the name in the nested directory.
4. When using the pod-affinity function, if multiple
'OS::Nova::ServerGroup' resources are created at the same time,
the id of the resource cannot be matched to the workerNode.
Modify the original process of obtaining the id directly,
instead, first obtain the `physical_resource_id` of all
'OS::Nova::ServerGroup' resources, and then match the id in the
workerNode information to obtain the target id.
5. Modify the method of obtaining the kubespray VM's password
in kubespray_mgmt.py.
Closes-Bug: #1949926
Change-Id: I2e966df35f874e14c39792a6882ee913ac424663
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
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
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
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
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
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