tmobile / monarch

App-level Chaos Engineering
Apache License 2.0
28 stars 4 forks source link

Add Support for Crunchy PostgreSQL Service, Implement Ingress Traffic Manipulation, add Rate Limiting via Netem, Option to use containerd instead of runc #7

Open KevinPoole opened 3 years ago

KevinPoole commented 3 years ago

Crunchy PostgreSQL Service has services that follow the pattern of postgresql-11-odb. Seems like a reasonable assumption that the needed values in the services yaml will be the same across the versions, so chose to cover all postgresql-\d+-odb with a single pattern.

The approach for implementing ingress traffic manipulation was almost entirely copied from here: https://wiki.linuxfoundation.org/networking/netem#how_can_i_use_netem_on_incoming_traffic

The only notes with that are:

Finally, I also added rate limiting via netem to the manipulate_traffic method. This should be nice since it says that the shape traffic can not happen at the same time as manipulate_traffic but this will allow the insertion of throughput limiting alongside other traffic manipulations like latency, loss, etc.

Based on the PCF release notes here: https://docs.pivotal.io/pivotalcf/2-6/pcf-release-notes/runtime-rn.html ... in newer releases, containerd is used instead of runc. I added the ability to use containerd to get a shell / execute commands on a container which can be enabled via a use-containerd entry in the config. this is disabled by default so will not effect behavior unless you choose to.

KevinPoole commented 3 years ago

@karunchennuri let me know what you think of all of this. slightly more involved than the previous PRs, but I believe in all cases backwards compatibility is preserved and the tool is improved some.