Skip to content

Commit 427e14b

Browse files
committed
ft-orchestration nprobe dont start multiple instances if not using zx and add default values for cento and yaf
1 parent 0405236 commit 427e14b

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

tools/ft-orchestration/src/probe/cento.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class CentoSettings(ABC):
8989
active_poll: Optional[bool] = False
9090
tunnel: Optional[bool] = False
9191
skip_fragments: Optional[bool] = False
92-
uniflows: Optional[bool] = False
92+
uniflows: bool = True
9393
send_dont_wait: Optional[bool] = False
9494
hw_timestamp: Optional[bool] = False
9595

tools/ft-orchestration/src/probe/nprobe.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,12 @@ def _before_start(self):
238238
for ifc in interface_names:
239239
if ifc.startswith("zc:"):
240240
self._switch_to_zc(ifc.split(":", 1)[-1])
241-
queues, _ = Tool(
242-
f"ethtool -n {ifc.split(':', 1)[-1]} | head -n1 | cut -c1",
243-
executor=self._executor,
244-
sudo=self._sudo,
245-
).run()
246-
self._settings.rss_queues = int(queues)
241+
queues, _ = Tool(
242+
f"ethtool -n {ifc.split(':', 1)[-1]} | head -n1 | cut -c1",
243+
executor=self._executor,
244+
sudo=self._sudo,
245+
).run()
246+
self._settings.rss_queues = int(queues)
247247

248248
def start(self):
249249
"""Start the probe."""

tools/ft-orchestration/src/probe/yaf.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class OutputOptions(ABC):
5151
groupby: Optional[str] = None
5252
rotate: Optional[str] = None
5353
lock: Optional[str] = None
54-
udp_temp_timeout: Optional[str] = None
54+
udp_temp_timeout: Optional[int] = 600
5555

5656
output: Optional[OutputOptions] = None
5757

@@ -74,13 +74,13 @@ class DecodeOptions(ABC):
7474
@typed_dataclass
7575
@dataclass
7676
class ExportOptions(ABC):
77-
silk: Optional[bool] = None
78-
uniflow: Optional[bool] = None
79-
force_ip6: Optional[bool] = None
80-
flow_stats: Optional[bool] = None
77+
silk: Optional[bool] = False
78+
uniflow: bool = True
79+
force_ip6: Optional[bool] = False
80+
flow_stats: Optional[bool] = False
8181
delta: bool = True # Required for packet and byte counter
82-
mac: Optional[bool] = None
83-
metadata: Optional[bool] = None
82+
mac: Optional[bool] = False
83+
metadata: Optional[bool] = False
8484

8585
export: Optional[ExportOptions] = None
8686

@@ -102,8 +102,8 @@ class ExportOptions(ABC):
102102
export_payload: Optional[bool] = None
103103
export_payload_applabels: Optional[str] = None
104104
udp_payload: Optional[bool] = None
105-
stats: Optional[str] = None
106-
no_tombstone: Optional[bool] = None
105+
stats: int = 0
106+
no_tombstone: Optional[bool] = True
107107
tombstone_configured_id: Optional[int] = None
108108
ingress: Optional[int] = None
109109
egress: Optional[int] = None
@@ -268,7 +268,7 @@ def dataclass_to_lua_table(obj, sep: str = "\n") -> str:
268268
return sep.join(lua)
269269

270270
with open(self._config_file, "w") as f:
271-
f.write("-- Generated yaf.conf (Lua format for --config)\n\n")
271+
f.write("-- Generated settings.conf (Lua format for --config)\n\n")
272272
f.write(dataclass_to_lua_table(settings))
273273
f.write("\n")
274274

@@ -277,7 +277,6 @@ def _prepare_cmd(self, config_file: str) -> str:
277277
args.extend(["-c", config_file])
278278
if self._verbose:
279279
args.append("--verbose")
280-
args.append(f"--ipfix={self._settings.output.protocol}")
281280

282281
return " ".join(args)
283282

0 commit comments

Comments
 (0)