Skip to content

Commit

Permalink
add instruction to add cni log to daemon
Browse files Browse the repository at this point in the history
Signed-off-by: Sunyanan Choochotkaew <[email protected]>
  • Loading branch information
sunya-ch committed Dec 12, 2023
1 parent 2d5311d commit 5015b9f
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion document/docs/user_guide/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,36 @@ If yes, try [restarting multi-nic-cni controller node](#restart-controller) to f
## Actions

### Get CNI log (available after v1.0.3)
To make CNI log available on the daemon pod, you may mount the the host log path to the daemon pod:

- Run

```bash
kubectl edit config.multinic multi-nicd
```

- Add the following mount items

```yaml
# config/multi-nicd
spec:
daemon:
mounts:
...
- hostpath: /var/log/multi-nic-cni.log
name: cni-log
podpath: /host/var/log/multi-nic-cni.log
- hostpath: /var/log/multi-nic-ipam.log
name: ipam-log
podpath: /host/var/log/multi-nic-ipam.log
# For AWS-IPVLAN main plugin log also add the following lines:
# - hostpath: /var/log/multi-nic-aws-ipvlan.log
# name: ipam-log
# podpath: /host/var/log/multi-nic-aws-ipvlan.log
```

Then, you can get CNI log from the following commands:

```bash
# default main plugin
kubectl exec $(kubectl get po -owide -A|grep multi-nicd\
Expand All @@ -163,7 +193,7 @@ kubectl exec $(kubectl get po -owide -A|grep multi-nicd\
# multi-nic on aws main plugin
kubectl exec $(kubectl get po -owide -A|grep multi-nicd\
|grep $FAILED_NODE|awk '{printf "%s -n %s", $2, $1}')\
-- cat /var/log/multi-nic-aws-ipvlan.log
-- cat /host/var/log/multi-nic-aws-ipvlan.log

# IPAM plugin
kubectl exec $(kubectl get po -owide -A|grep multi-nicd\
Expand Down

0 comments on commit 5015b9f

Please sign in to comment.