Running trex as a container within kubernetes pod fails with EAL: FATAL: Cannot set affinity

57 views
Skip to first unread message

chris...@gmail.com

unread,
May 16, 2024, 9:27:03 AMMay 16
to TRex Traffic Generator
Hi, 

I am running trex within kubernetes pod and i am unable to start trex server due to 
./t-rex-64 -i --cfg trex_cfg.yaml  --software --no-scapy-server
The ports are bound/configured.
Starting  TRex v2.90 please wait  ...
EAL: FATAL: Cannot set affinity
EAL: Cannot set affinity
 You might need to run ./trex-cfg  once
EAL: Error - exiting with code: 1
  Cause: Invalid EAL arguments


My trex_cfg.yaml:

- port_limit: 2
  version   : 2
  interfaces: ['eth0', 'dummy']
  stack     : linux_based
  low_end   : true
  low_end_core: 3

My kubernetes yaml file:

apiVersion: v1
kind: Pod
metadata:
  name: trex-pod
spec:
  containers:
  - name: trex
    image: <localserver>/trexcisco/trex:2.0.0
    securityContext:
      privileged: true
    resources:
      limits:
        cpu: "2"
        memory: "4Gi"
      requests:
        cpu: "2"
        memory: "4Gi"

    command:
    - "/bin/sleep"
    - "360000000000000000000"

Can someone please help me understand , as to why is the EAL init failing with setting cpu affinity ?
Message has been deleted

chris...@gmail.com

unread,
May 24, 2024, 10:28:19 AMMay 24
to TRex Traffic Generator
Hi All , 
It works when  low_end_core is set to 3 . But with this setting I am unable to run two parallel instances of trex on same node. 

low_end_core: 3

If i don't specify  low_end_core: 3, i understand it uses 0 . Without specifying this affinity value , it doesn't work .

So , can someone help me understand , what is the right trex configuration to be used , so that trex can always run successfully and doesn't face the below error?
./t-rex-64 -i --cfg trex_cfg.yaml  --software --no-scapy-server
The ports are bound/configured.
Starting  TRex v2.90 please wait  ...
EAL: FATAL: Cannot set affinity
EAL: Cannot set affinity
 You might need to run ./trex-cfg  once
EAL: Error - exiting with code: 1
  Cause: Invalid EAL arguments


Reply all
Reply to author
Forward
0 new messages