Skip to content

Commit 0a2f294

Browse files
authored
Merge pull request #273 from foundation-model-stack/doc
sync doc v1.2.7
2 parents 9ad5fe6 + e61f206 commit 0a2f294

File tree

10 files changed

+80
-81
lines changed

10 files changed

+80
-81
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ fix: tidy fmt vet golangci-lint ## Fixup files in the repo.
144144
lint: tidy fmt vet golangci-lint ## Run the lint check
145145
$(GOLANGCI_LINT) run
146146

147+
.PHONY: pr
148+
pr: lint test yaml ## Run targets required for PR
149+
147150
##@ Test
148151
TEST_BIN_DIR = $(BASE_DIR)/tools/testbin
149152
TEST_RESULT_DIR = $(BASE_DIR)/testing

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Leveraging advantage point of managing multiple CNIs together with auto-discover
4141

4242
<img src="./document/docs/img/multi-nic-cni-feature-3.png" alt="drawing" style="width:600px;"/>
4343

44-
The Multi-NIC CNI architecture can be found [here](./document/docs/Developer%20Guide/architecture.md).
44+
The Multi-NIC CNI architecture can be found [here](./document/docs/contributing/architecture.md).
4545

4646
## MultiNicNetwork
4747
The Multi-NIC operator operates over a custom resource named *MultiNicNetwork* defined by users.

document/docs/concept/multi-cloud-support.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ In addition to as-is main CNI (ipvlan and macvlan), we implement a new main CNI
2323

2424
Scenario|Multi-NIC main|IPAM|(generated)<br>Single-NIC main|(generated)<br>Single-NIC IPAM
2525
---|---|---|---|---
26-
On-premise with L2|ipvlan (L2)|whereabouts|ipvlan (L2)|whereabouts
27-
|ipvlan (L2)|multi-nic-ipam|ipvlan (L2)|static
26+
On-premise with L2|ipvlan (L2), macvlan|whereabouts|ipvlan (L2), macvlan|whereabouts
27+
|ipvlan (L2), macvlan|multi-nic-ipam|ipvlan (L2), macvlan|static
2828
VPC with L3 (IBM Cloud, Azure)|ipvlan (L3)|multi-nic-ipam|ipvlan (L3)|static
29-
AWS |aws-ipvlan|multi-nic-ipam|ipvlan (L2)|static
29+
AWS |aws-ipvlan|multi-nic-ipam|ipvlan (L2), macvlan|static
3030

3131
## Multi-NIC CNI with network devices dynamically provided by device plugin
3232

document/docs/concept/network-status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Reported multinicnetwork status
1313
|N/A|`mode!=l3`
1414
lastSyncTime|Date Time|timestamp at last synchronization of interfaces and CIDR
1515

16-
- v1.0.3
16+
- v1.0.3 or later
1717

1818
Field|Value|Description
1919
---|---|---

document/docs/contributing/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ make test
107107
## Coding style guidelines
108108
Follow [effective GO](https://go.dev/doc/effective_go).
109109

110-
Please run `go fmt` for every packages before submitting PRs.
110+
Please run `make pr` before submitting PRs.

document/docs/troubleshooting/troubleshooting.md

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,25 @@ There are two common root causes.
8989
2. Network interfaces are not configured as expected.
9090
* Check [multi-nicd log](#get-multi-nicd-log).
9191

92-
- If getting `cannot list address on <SECONDARY INTERFACE>`, please confirm whether IPv4 address on the host.
92+
- If getting `cannot list address on <SECONDARY INTERFACE>`, please confirm whether IPv4 address on the host.
93+
- If getting `cannot get PCI info: Get "https://pci-ids.ucw.cz/v2.2/pci.ids.gz": net/http: TLS handshake timeout`, some environment variables need to be set in the config for the multi-nicd container to reach the above address via proxy settings.
94+
95+
apiVersion: multinic.fms.io/v1
96+
kind: Config
97+
metadata:
98+
name: multi-nicd
99+
...
100+
spec:
101+
...
102+
daemon:
103+
env:
104+
- name: HTTP_PROXY
105+
value: <REPLACE WITH YOUR HTTPS_PROXY>
106+
- name: HTTPS_PROXY
107+
value: <REPLACE WITH YOUR HTTPS_PROXY>
108+
- name: NO_PROXY
109+
value: <REPLACE WITH YOUR NO_PROXY>
110+
93111
- Otherwise, please refer to [check interfaces at node's host network](#check-host-secondary-interfaces).
94112

95113
### Pod failed to start
@@ -222,20 +240,36 @@ Zero config occurs when CNI cannot generate configurations from the network-atta
222240
### Ping failed
223241
**Issue:** Pods cannot ping each other.
224242

225-
Check route status in multinicnetworks.multinic.fms.io.
226-
```bash
227-
kubectl get multinicnetwork.multinic.fms.io multinic-ipvlanl3 -o json\
228-
| jq -r .status.routeStatus
229-
```
243+
* If the CNI operates at Layer 2 (such as MACVLAN or IPVLAN with L2), please confirm whether the defined Pod CIDR is routable within your cluster.
244+
245+
For bare metal cluster which has only a certain VLAN range opened on the switch,
246+
please define a VLAN interface instead of the physical NIC on the node.
247+
Usually for a bare metal node with a secondary interface,
248+
the two ports of NIC2 will be defined as tenant-bond for redundancy,
249+
the VLAN interface should be defined following the naming vlanXXX@tenant-bond,
250+
where XXX represents a valid open VLAN ID.
251+
252+
Please see the following example:
253+
254+
13769: tenant-bond: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP group
255+
default qlen 1000 link/ether 98:03:9b:8c:55:e4 brd ff:ff:ff:ff:ff:ff
256+
14688: vlan1134@tenant-bond: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP group
257+
default qlen 1000 inet 172.11.3.3/16 brd 172.11.255.255 scope global noprefixroute vlan1134
258+
259+
* If the CNI operates at Layer 3, check route status in `multinicnetworks.multinic.fms.io`.
260+
261+
kubectl get multinicnetwork.multinic.fms.io multinic-ipvlanl3 -o json\
262+
| jq -r .status.routeStatus
263+
264+
- *WaitForRoutes*: the new cidr is just recomputed and waiting for route update.
265+
- *Failed*: some route cannot be applied, need attention. Check [multi-nicd log](#get-multi-nicd-log)
266+
- *Unknown*: some daemon cannot be connected.
267+
- *N/A*: there is no L3 configuration applied. Check whether multinicnetwork.multinic.fms.io is defined with L3 mode and cidrs.multinic.fms.io is created.
230268

231-
- *WaitForRoutes*: the new cidr is just recomputed and waiting for route update.
232-
- *Failed*: some route cannot be applied, need attention. Check [multi-nicd log](#get-multi-nicd-log)
233-
- *Unknown*: some daemon cannot be connected.
234-
- *N/A*: there is no L3 configuration applied. Check whether multinicnetwork.multinic.fms.io is defined with L3 mode and cidrs.multinic.fms.io is created.
269+
kubectl get cidrs.multinic.fms.io
235270

236-
kubectl get cidrs.multinic.fms.io
271+
- *Success*: check [set required security group rules](#set-security-groups)
237272

238-
- *Success*: check [set required security group rules](#set-security-groups)
239273
### TCP/UDP communication failed.
240274
**Issue:** Pods can ping each other but do not get response from TCP/UDP communication such as iPerf.
241275

document/docs/user_guide/index.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,26 +146,35 @@ L3 Route configuration|&check;|X|X|&check;
146146
- [IPVLAN L3](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/ipvlanl3.yaml)
147147

148148
kubectl apply -f config/samples/multinicnetwork/ipvlanl3.yaml
149+
150+
- [Mellanox Host Device with Host Device IPAM](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/mellanox_hostdevice.yaml)
151+
152+
kubectl apply -f config/samples/multinicnetwork/mellanox_hostdevice.yaml
153+
149154

150155
### BareMetal
156+
- [MACVLAN with whereabout IPAM](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/macvlan.yaml)
157+
158+
kubectl apply -f config/samples/multinicnetwork/macvlan.yaml
159+
160+
- [MACVLAN with Multi-NIC IPAM](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/macvlan_ipam.yaml)
161+
162+
kubectl apply -f config/samples/multinicnetwork/macvlan_ipam.yaml
163+
151164
- [IPVLAN L2 with whereabout IPAM](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/ipvlanl2.yaml)
152165

153166
kubectl apply -f config/samples/multinicnetwork/ipvlanl2.yaml
154167

155-
- [SR-IoV with Multi-NIC IPAM](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/sriov.yaml) ( from v1.2.0 )
168+
- [SR-IoV with Multi-NIC IPAM](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/sriov.yaml)
156169

157170
kubectl apply -f config/samples/multinicnetwork/sriov.yaml
158171

159-
- [Mellanox Host Device without IPAM](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/mellanox_hostdevice.yaml) ( from v1.2.0 )
172+
- [Mellanox Host Device with Host Device IPAM](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/mellanox_hostdevice.yaml)
160173

161174
kubectl apply -f config/samples/multinicnetwork/mellanox_hostdevice.yaml
162175

163-
- [IPVLAN L2 with unmanaged HostInterface](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/ipvlanl2_unmanaged.yaml) ( from v1.2.1 )
164-
165-
kubectl apply -f config/samples/multinicnetwork/ipvlanl2_unmanaged.yaml
166-
167176
### AWS
168-
- [IPVLAN L2 with AWS-VPC-connecting IPAM](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/awsipvlan.yaml) ( from v1.1.0 )
177+
- [IPVLAN L2 with AWS-VPC-connecting IPAM](https://github.com/foundation-model-stack/multi-nic-cni/tree/main/config/samples/multinicnetwork/awsipvlan.yaml)
169178

170179
kubectl apply -f config/samples/multinicnetwork/awsipvlan.yaml
171180

document/docs/user_guide/multi-cloud.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

document/docs/user_guide/user.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# User Guide and Testing
1+
# MultiNicNetwork Usage and Testing
22

33
## Steps
44
### 1. check available network

testing/coverage.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
File | Function | Coverage
44
---|---|---
5-
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_controller.go:39: | Reconcile | 83.3% |
5+
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_controller.go:39: | Reconcile | 76.2% |
66
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_controller.go:110: | SetupWithManager | 100.0% |
77
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_controller.go:117: | callFinalizer | 100.0% |
88
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:55: | NewCIDRHandler | 100.0% |
99
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:86: | InitCustomCRCache | 0.0% |
1010
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:104: | GetCIDR | 100.0% |
11-
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:117: | ListCIDR | 0.0% |
11+
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:117: | ListCIDR | 80.0% |
1212
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:134: | SyncAllPendingCustomCR | 0.0% |
1313
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:148: | syncWithMultinicNetwork | 0.0% |
1414
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:172: | syncIPPools | 100.0% |
@@ -20,7 +20,7 @@ File | Function | Coverage
2020
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:277: | NewCIDR | 75.0% |
2121
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:327: | Run | 100.0% |
2222
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:336: | UpdateCIDRs | 100.0% |
23-
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:344: | ProcessUpdateRequest | 70.0% |
23+
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:344: | ProcessUpdateRequest | 60.0% |
2424
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:361: | NewCIDRWithNewConfig | 80.0% |
2525
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:371: | UpdateEntries | 80.9% |
2626
| github.com/foundation-model-stack/multi-nic-cni/controllers/cidr_handler.go:529: | updateCIDR | 52.0% |
@@ -44,12 +44,12 @@ File | Function | Coverage
4444
| github.com/foundation-model-stack/multi-nic-cni/controllers/config_controller.go:44: | getOperatorNamespace | 80.0% |
4545
| github.com/foundation-model-stack/multi-nic-cni/controllers/config_controller.go:70: | getDefaultConfigSpec | 100.0% |
4646
| github.com/foundation-model-stack/multi-nic-cni/controllers/config_controller.go:131: | CreateDefaultDaemonConfig | 0.0% |
47-
| github.com/foundation-model-stack/multi-nic-cni/controllers/config_controller.go:144: | Reconcile | 61.9% |
47+
| github.com/foundation-model-stack/multi-nic-cni/controllers/config_controller.go:144: | Reconcile | 76.2% |
4848
| github.com/foundation-model-stack/multi-nic-cni/controllers/config_controller.go:219: | SetupWithManager | 100.0% |
4949
| github.com/foundation-model-stack/multi-nic-cni/controllers/config_controller.go:226: | UpdateConfigBySpec | 90.5% |
5050
| github.com/foundation-model-stack/multi-nic-cni/controllers/config_controller.go:258: | newCNIDaemonSet | 89.5% |
5151
| github.com/foundation-model-stack/multi-nic-cni/controllers/config_controller.go:344: | getCNIHostPath | 88.2% |
52-
| github.com/foundation-model-stack/multi-nic-cni/controllers/config_controller.go:376: | callFinalizer | 0.0% |
52+
| github.com/foundation-model-stack/multi-nic-cni/controllers/config_controller.go:376: | callFinalizer | 64.7% |
5353
| github.com/foundation-model-stack/multi-nic-cni/controllers/daemon_cache_handler.go:26: | SetCache | 100.0% |
5454
| github.com/foundation-model-stack/multi-nic-cni/controllers/daemon_cache_handler.go:30: | GetCache | 100.0% |
5555
| github.com/foundation-model-stack/multi-nic-cni/controllers/daemon_cache_handler.go:38: | ListCache | 100.0% |
@@ -70,7 +70,7 @@ File | Function | Coverage
7070
| github.com/foundation-model-stack/multi-nic-cni/controllers/daemon_watcher.go:222: | ProcessPodQueue | 52.9% |
7171
| github.com/foundation-model-stack/multi-nic-cni/controllers/daemon_watcher.go:259: | isDaemonPod | 75.0% |
7272
| github.com/foundation-model-stack/multi-nic-cni/controllers/daemon_watcher.go:269: | createHostInterfaceInfo | 80.0% |
73-
| github.com/foundation-model-stack/multi-nic-cni/controllers/daemon_watcher.go:279: | IsDaemonSetReady | 100.0% |
73+
| github.com/foundation-model-stack/multi-nic-cni/controllers/daemon_watcher.go:279: | IsDaemonSetReady | 75.0% |
7474
| github.com/foundation-model-stack/multi-nic-cni/controllers/hostinterface_controller.go:38: | InitHostInterfaceCache | 0.0% |
7575
| github.com/foundation-model-stack/multi-nic-cni/controllers/hostinterface_controller.go:79: | Reconcile | 55.9% |
7676
| github.com/foundation-model-stack/multi-nic-cni/controllers/hostinterface_controller.go:140: | SetupWithManager | 100.0% |
@@ -120,7 +120,7 @@ File | Function | Coverage
120120
| github.com/foundation-model-stack/multi-nic-cni/controllers/multinicnetwork_controller.go:315: | HandleNewNamespace | 0.0% |
121121
| github.com/foundation-model-stack/multi-nic-cni/controllers/multinicnetwork_handler.go:39: | GetNetwork | 100.0% |
122122
| github.com/foundation-model-stack/multi-nic-cni/controllers/multinicnetwork_handler.go:51: | SyncAllStatus | 76.2% |
123-
| github.com/foundation-model-stack/multi-nic-cni/controllers/multinicnetwork_handler.go:86: | updateStatus | 96.0% |
123+
| github.com/foundation-model-stack/multi-nic-cni/controllers/multinicnetwork_handler.go:86: | updateStatus | 92.0% |
124124
| github.com/foundation-model-stack/multi-nic-cni/controllers/multinicnetwork_handler.go:135: | NetStatusUpdated | 100.0% |
125125
| github.com/foundation-model-stack/multi-nic-cni/controllers/multinicnetwork_handler.go:157: | UpdateNetConfigStatus | 86.7% |
126126
| github.com/foundation-model-stack/multi-nic-cni/controllers/multinicnetwork_handler.go:180: | SetCache | 100.0% |
@@ -215,4 +215,4 @@ File | Function | Coverage
215215
| github.com/foundation-model-stack/multi-nic-cni/internal/plugin/utils.go:26: | getBoolean | 100.0% |
216216
| github.com/foundation-model-stack/multi-nic-cni/internal/plugin/utils.go:33: | ValidateResourceName | 100.0% |
217217
| github.com/foundation-model-stack/multi-nic-cni/internal/plugin/utils.go:39: | GetHolderNetName | 100.0% |
218-
| total: | (statements) | 59.5% |
218+
| total: | (statements) | 60.3% |

0 commit comments

Comments
 (0)