thombashi / tcconfig

A tc command wrapper. Make it easy to set up traffic control of network bandwidth/latency/packet-loss/packet-corruption/etc. to a network-interface/Docker-container(veth).
https://tcconfig.rtfd.io/
MIT License
792 stars 85 forks source link

Fix sqlite error field not found #178

Closed rglonek closed 6 months ago

rglonek commented 10 months ago

Incorrect field names degined in Param section for model.

thombashi commented 10 months ago

@rglonek Could you explain why you thought those are incorrect field names?

rglonek commented 9 months ago

Ok, I think I am loosing my mind now. Previously when I tried to install this on a barebones docker container, it would show me an sqlite error field not found. a trace shown that the field names themselves were not accepted as valid by the sqlite module. I cannot replicate this now. I'll try to follow the steps I did last time exactly but at this stage I am pretty shocked it works when before it didn't, considering nothing changed.

rglonek commented 8 months ago

@thombashi I can confirm, I do get this before the change to the name:

[INFO] delete enp0s3 qdisc
[INFO] delete enp0s3 ingress qdisc
[INFO] delete enp0s3 ifb device (ifb4618)
$ tcset enp0s3 --direction outgoing --src-port 3001  --rate 5Mbps --delay 150 --delay-distro 1
$ tcset enp0s3 --add --direction outgoing --src-port 27017 --rate 5Mbps  --delay 30  --delay-distro 4
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/simplesqlite/core.py", line 349, in execute_query
    result = self.connection.execute(str(query))
sqlite3.OperationalError: no such column: dst-network

After this change, the error no longer occurs.