Git Product home page Git Product logo

chaostoolkit-toxiproxy's People

Contributors

dimzak avatar jesseestum avatar lawouach avatar richierunner avatar russmiles avatar zeisss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chaostoolkit-toxiproxy's Issues

Unable to modify proxy error message despite successful modification

I installed this chaostoolkit extension today. I run an experiment to call function enable_proxy and disable_proxy which reports the following error:

[2019-08-16 13:02:24 ERROR] Unable to modify proxy MY_PROXY_NAME
[2019-08-16 13:02:24 ERROR]   => failed: AssertionError

However, I can verify with toxiproxy-cli that the disable_proxy action does toggle the proxy to disabled status.

This is was encountered with toxiproxy version 2.1.4.

README example wrong and error creating proxy

the json snippets in the documentation refer to the toxiproxy module which doesn't exist, moreover, running the "create_proxy" example snippet, I get this error:

[2019-01-22 18:53:21 INFO] Action: create_proxy
[2019-01-22 18:53:21 ERROR] => failed: AttributeError: 'int' object has no attribute 'startswith'

Creating a toxic for an existent proxy gives an exception

Issue
I'm trying to add an experiment to the catalogue. The idea is to use toxiproxy, and proxy the calls to a mysql database. With that, I can control the type of faults that would be injected,
The environment is on AWS: toxiproxy in a ubuntu machine, and mysql in a rds instance. The app is .net core (not relevant) and exposes a REST API.

The experiment verifies the steady-state (one of the API endpoints) and then creates a toxic. The proxy is already created, due to the fact that the app needs to connect to it.
However, when trying to create the toxic, there is an error:

[2019-10-21 09:47:38 ERROR] [toxiproxyapi:68] Unable to create toxic for proxy: mysql

Digging into that, I used postman to post the same payload to the endpoint. The payload generated by the chaostollokit extensions:

[2019-10-21 09:47:38 INFO] [actions:39] Creating toxy mysql-latency for proxy mysql with type: latency as a downstream with toxicity 1.0 and attributes {'latency': '1234', 'jitter': '89'}

Extracting the full payload (on my environment added a line to output the json), looks like this:

[2019-10-21 09:47:38 DEBUG] [actions:46] json format for toxy creation: {'name': 'mysql-latency', 'type': 'latency', 'stream': 'downstream', 'toxicity': 1.0, 'attributes': {'latency': '1234', 'jitter': '89'}}

Using the same payload on postman, I get the full error:

{"error":"bad request body: json: cannot unmarshal string into Go struct field LatencyToxic.latency of type int64","status":400}

Although the attributes are of type int (from what I got in the code), when parsed to json transforms into string. Toxiproxy is picky with the types.

Environment

  • Toxiproxy
    • Version: 2.1.4
    • OS: Ubuntu
  • Chaostoolkit
    • Version 1.3.0
    • OS: Cataliana 10.15

Possible to modify the README.md to include more 'example usages'

On reading the section in the file which describes Proxy Actions and provides the various proxies (create, modify, disable and delete) there is only one example usage provided which appears to refer to the delete_proxy but is actually for the create_proxy.

Can this be moved below the 'create_proxy' and additional example usages added for the other proxies?

Add support for reset endpoint

Toxiproxy HTTP api provides a reset endpoint that enables all proxies and removes any toxics.

Reset can be very handy as a rollback action for an experiment as it ensures that all failure injections added as toxics, are removed and environment is back to normal

Tox tests failures

Tried to run tox tests using $ tox as described in README with no success

Traceback:
tests/test_toxic_actions.py:2: in <module>
    import chaostoxi.toxic.actions as actions
chaostoxi/toxic/actions.py:4: in <module>
    from chaoslib.types import Configuration
E   ModuleNotFoundError: No module named 'chaoslib'

Looking at tox.ini looks like requirements.txt is not used, hence chaoslib module is not loaded.

Support any toxiproxy-api url

Chaostoolkit-toxiproxy does not support toxiproxy-api urls of this format: http://mydomain:port/path-to-toxiproxy-api.
Looks like the only supported format is http://{host}:{port}
The first format is generally used if toxiproxy-api is behind a reverse proxy like nginx.

Maybe a toxiproxy_url property can exist also to fit all scenarios like:

"configuration": {
    "toxiproxy_url" : "http://domain:port/path-to-toxiproxy-api",
    "some_environment_variable": {
      "type": "environment",
      "key": "ENVIRONMENT_VARIABLE"
    }
  },

?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.