An error occurred when init k8s object in v1 api
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tacker |
Fix Released
|
Medium
|
Yi Feng |
Bug Description
When instantiate CNF resources whose manifest file contains `exec` parameter with v1 api, an error occurred when init k8s object.
The log is shown below.
```
Apr 22 21:36:17 Tacker-On-VM2 tacker-
Apr 22 21:36:17 Tacker-On-VM2 tacker-
```
part of yaml_file:
```
exec:
- rm
- -f
- /usr/local/
```
In the manifest file, there is an `exec` parameter, but in the kubernetes-client module, this parameter is modified to `_exec` due to the need to avoid python keywords. This processing resulted in an unrecognized `exec` parameter in the manifest file, which resulted in an error.
The following resources were found to have the same problem during the investigation.
1. `_not` of V1JsonSchemaProps
2. `_except` of V1IPBlock
3. `_continue` of V1ListMeta
4. `_from` of V1NetworkPolicy
5. `_exec` of V1LifecycleHandler
In order to solve this problem, it is necessary to convert the above keywords into keywords that can be recognized by the kubernetes-client module.
Changed in tacker: | |
assignee: | nobody → Yi Feng (fengyi765) |
Changed in tacker: | |
importance: | Undecided → Medium |
Fix proposed to branch: master /review. opendev. org/c/openstack /tacker/ +/845655
Review: https:/