Missing required parameter of LimitRange in translate_outputs._create_k8s_object
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tacker |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
While deploying CNF(deployment) using LimitRange, a parameter error happened:
```
Traceback (most recent call last):
File "/home/
k8s_
File "/home/
self.
File "/home/
self.
File "/home/
eval('client.' + rely_obj_name + '()')
File "<string>", line 1, in <module>
File "/home/
self.type = type
File "/home/
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
ValueError: Invalid value for `type`, must not be `None`
```
This is caused by `type` parameter is required while deploying LimitRange resource:
https:/
Changes to the type mandatory parameter for V1LimitRangeItem have been made since v18.0.0 and the problem is now caused by the release of kubernetes v18.20.0 on 2021/8/17.
https:/
Fix:
in tacker/
add `'V1LimitRangeI
Changed in tacker: | |
status: | New → In Progress |
Reviewed: https:/ /review. opendev. org/c/openstack /tacker/ +/791123 /opendev. org/openstack/ tacker/ commit/ 26a2b5fce201641 b89ca3d7a432e23 df779e5cf3
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 26a2b5fce201641 b89ca3d7a432e23 df779e5cf3
Author: LiangLu <email address hidden>
Date: Thu May 13 17:26:56 2021 +0900
Fix missing required parameter when k8s_obj init
While deploying CNF(deployment) using pod-affinity rules, a
parameter error happended because the topology_key is not
assigned when initializing k8s object.
This patch fixes this bug by adding the topology_key's default outputs. _create_ k8s_object( ). python- client version: v18.20.0
value into `must_param` in translate_
At the same time, in order to deal with the recurrence of this
kind of bug, we checked the required parameters of all resources
in kubernetes again and added them to must_param.
* Kubernetes version: from v1.18.20 to v1.21.1
* Kubernetes-
The major changes from the "must_param" used in the previous
Wallaby release of Tacker are probably as follows:
RuntimeRawE xtension vision` [1] in v11.0.0 nsion`[ 2], but the `RuntimeRawExte nsion` was vision`
The `data` parameter of `V1ControllerRe
was `RuntimeRawExte
not support for v12.0.0 or later. Therefore `V1ControllerRe
in v18.20.0[3] it has been changed to` object` type.
V1ServiceRe ference ec`[4] in v11.0.0 was V1ServiceRefere nce`[5] , but the `V1ServiceRefer ence` was not nV1ServiceRefer ence`[7] .
The `service` parameter of `V1APIServiceSp
`
support for v12.0.0 or later.
Therefore `V1APIServiceSpec` in v18.20.0[6] it has been changed
to `Apiregistratio
V1LimitRang eItem em`[8] in v11.0.0 was
The `type` parameter of `V1LimitRangeIt
optional type, but the parameter has changed to must param
in v18.20.0[9].
Therefore, the parameter should be added into `must_param`.
[1] https:/ /github. com/kubernetes- client/ python/ blob/v11. 0.0/kubernetes/ docs/V1Controll erRevision. md /github. com/kubernetes- client/ python/ blob/v11. 0.0/kubernetes/ docs/RuntimeRaw Extension. md /github. com/kubernetes- client/ python/ blob/v18. 20.0/kubernetes /docs/V1Control lerRevision. md /github. com/kubernetes- client/ python/ blob/v11. 0.0/kubernetes/ docs/V1APIServi ceSpec. md /github. com/kubernetes- client/ python/ blob/v11. 0.0/kubernetes/ docs/V1ServiceR eference. md /github. com/kubernetes- client/ python/ blob/v18. 20.0/kubernetes /docs/V1APIServ iceSpec. md /github. com/kubernetes- client/ python/ blob/v18. 20.0/kubernetes /docs/Apiregist rationV1Service Reference. md /github. com/kubernetes- client/ python/ blob/v11. 0.0/kubernetes/ docs/V1LimitRan geItem. md /github. com/kubernetes- client/ python/ blob/v18. 20.0/kubernetes /docs/V1LimitRa ngeItem. md
[2] https:/
[3] https:/
[4] https:/
[5] https:/
[6] https:/
[7] https:/
[8] https:/
[9] https:/
Closes-Bug: #1928153 6f4c860ae84978f 59772f9a6ee
Closes-Bug: #1940602
Change-Id: If77be98d0c4cec