Bug 1868771 - Error message for whereabouts IPAM CNI is not descriptive when kubeconfig is specified and path is wrong
Summary: Error message for whereabouts IPAM CNI is not descriptive when kubeconfig is ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Douglas Smith
QA Contact: Weibin Liang
URL:
Whiteboard:
Depends On:
Blocks: 1868772
TreeView+ depends on / blocked
 
Reported: 2020-08-13 19:07 UTC by Douglas Smith
Modified: 2020-10-27 16:28 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1868772 (view as bug list)
Environment:
Last Closed: 2020-10-27 16:28:34 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:28:52 UTC

Description Douglas Smith 2020-08-13 19:07:37 UTC
It was reported that a user specified the "kubeconfig" (which is not required in OpenShift) option for whereabouts, using upstream instructions, and the error message was not informative.

The error message as reported:


```
  Multus: [some-component/something-0]: error adding container to network "something-0": delegateAdd: error invoking confAdd - "macvlan": error in getting result from AddNetwork: Error assigning IP: Unauthorized
```

The phrasing "unauthorized" doesn't produce any actionable output for the user.


To verify this bug, create a net-attach-def for whereabouts, and add the "kubeconfig" parameter and specify any invalid filepath.

Comment 2 Douglas Smith 2020-09-11 15:27:36 UTC
I was looking at the wrong PR, this was actually merged in: https://github.com/openshift/whereabouts-cni/pull/24

To replicate the error, you can set a "kubernetes" parameter with an invalid path, such as:

```
"ipam": {
  "type": "whereabouts",
  "kubernetes": { "kubeconfig": "/invalid/path" }
  "range": "192.168.2.225/28"
}
````

To validate it, it should be more descriptive than just "Error assigning IP: Unauthorized"

Thanks!

Comment 3 Weibin Liang 2020-09-15 19:44:49 UTC
Tested and verified in 4.6.0-0.nightly-2020-09-15-063156

code = Unknown desc = failed to create pod network sandbox k8s_whereabouts-pod-1_test2_4f017081-841c-4116-9e82-49ca47bbf389_0(bc7c388fd2e706afc723d8685028424e29b28ebe1cc27d1152f5614f8abcc4a5): [test2/whereabouts-pod-1:whereabouts]: error adding container to network "whereabouts": Error at storage engine: IPAM kubernetes client initialization error: stat /invalid/path: no such file or directory

Comment 6 errata-xmlrpc 2020-10-27 16:28:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196


Note You need to log in before you can comment on or make changes to this bug.