Container support for TSN: time sync stopped when nic is pci-passthrogh into container
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Invalid
|
Low
|
Brent Rowsell |
Bug Description
Brief Description
-----------------
There is conflict between applying PCI passthrough for TSN Nic to run TSN application in container workload with STX current support for PTP: STX run p4p4l and phc2sys in host and the system time can be used by container directly while after applying PCI-pt, ptp4l and phc2sys cannot run in host.
Severity
--------
Steps to Reproduce
------------------
# create pod for TSN application
kubectl -f apply tsn_pod.yaml
# get PID of tsn contanier
PID=sudo docker inspect -f '{{.State.Pid}}' $container_id
# create network namespace entry for host
sudo ln -sf /proc/$PID/ns/net "/var/run/
# move tsn_nic(enp2s0) to container namespace
sudo ip link set enp2s0 netns tsn_pod_from_k8s
# see the tsn nic from internal of container
kubectl exec -it tsn_pod bash
(tsn_pod_
.....
.....
.....
98: enp2s0: <NO-CARRIER,
link/ether 00:1b:21:00:00:00 brd ff:ff:ff:ff:ff:ff
.....
.....
Expected Behavior
------------------
host can still sync with PTP grandmaster clock outside/ or serve as grandmaster clock
Actual Behavior
----------------
sync stopped
Reproducibility
---------------
100% reproducible
System Configuration
-------
AIO node
Branch/Pull Time/Commit
-------
iso version:
Last Pass
---------
None
Timestamp/Logs
--------------
content of tsn_pod.yaml
''''
apiVersion: v1
kind: Pod
metadata:
name: tsn-pod-priviledge
spec:
containers:
- name: tsn-pod
image: ubuntu:19.04
args:
- sleep
- "1000000"
securityCon
privileged: true
''''
Test Activity
-------------
Other?
[Sanity, Feature Testing, Regression Testing, Developer Testing, Evaluation, Other - Please specify]
Story Page: https:/
tags: | removed: container for support tsn |
Changed in starlingx: | |
importance: | Undecided → Low |
assignee: | nobody → Brent Rowsell (brent-rowsell) |
tags: | added: stx.containers |
Which NIC interface are you moving to the container ?
This is not the right way to expose a PCI device to a container. Please refer to sriov-cni/device plugin.