Fails on read/patch_xxx_scale API call when manifest has no namespace

Bug #1953477 reported by Ayumu Ueha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Undecided
Unassigned

Bug Description

The following error occurred when executing to heal SOL 002:

```
Healing wait CNF got an error due to CNF Scale Failed with reason: Failed the request to read a scale information.
 namespace: None, name: vdu2-apache, kind: Deployment, Reason: Missing the required parameter `namespace` when calling `read_namespaced_deployment_scale`
```

This happens because the namespace parameter is not passed to call read_namspace_xxx_scale() API [1] when the namespace is not specified in the manifest file.
The namespace should be set to "default" if it is an empty string or None.

And it also occurs in the case of patch_namespaced_xxx_scale() API [2], so the same fix is required.

[1] https://opendev.org/openstack/tacker/src/branch/master/tacker/vnfm/infra_drivers/kubernetes/kubernetes_driver.py#L1161
[2] https://opendev.org/openstack/tacker/src/branch/master/tacker/vnfm/infra_drivers/kubernetes/kubernetes_driver.py#L1183

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tacker/+/820698

Changed in tacker:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/820698
Committed: https://opendev.org/openstack/tacker/commit/e2fa03fb7ba1d65ddf1c83b3ea856b754afbcec6
Submitter: "Zuul (22348)"
Branch: master

commit e2fa03fb7ba1d65ddf1c83b3ea856b754afbcec6
Author: Ayumu Ueha <email address hidden>
Date: Tue Dec 7 10:03:01 2021 +0000

    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

Changed in tacker:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 7.0.0.0rc1

This issue was fixed in the openstack/tacker 7.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.