{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/vault-load-testing/issues/1","repository_url":"https://api.github.com/repos/hashicorp/vault-load-testing","labels_url":"https://api.github.com/repos/hashicorp/vault-load-testing/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/vault-load-testing/issues/1/comments","events_url":"https://api.github.com/repos/hashicorp/vault-load-testing/issues/1/events","html_url":"https://github.com/hashicorp/vault-load-testing/issues/1","id":352715358,"node_id":"MDU6SXNzdWUzNTI3MTUzNTg=","number":1,"title":"TypeError: 'NoneType' object is not subscriptable","user":{"login":"toddmichael","id":142241,"node_id":"MDQ6VXNlcjE0MjI0MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/142241?v=4","gravatar_id":"","url":"https://api.github.com/users/toddmichael","html_url":"https://github.com/toddmichael","followers_url":"https://api.github.com/users/toddmichael/followers","following_url":"https://api.github.com/users/toddmichael/following{/other_user}","gists_url":"https://api.github.com/users/toddmichael/gists{/gist_id}","starred_url":"https://api.github.com/users/toddmichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddmichael/subscriptions","organizations_url":"https://api.github.com/users/toddmichael/orgs","repos_url":"https://api.github.com/users/toddmichael/repos","events_url":"https://api.github.com/users/toddmichael/events{/privacy}","received_events_url":"https://api.github.com/users/toddmichael/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-21T21:22:25Z","updated_at":"2018-09-28T00:29:17Z","closed_at":null,"author_association":"NONE","body":"Hello, appreciate this project.  Unfortunately, I'm struggling to get it to work.\r\n\r\n## Environment\r\n* Mac\r\n* Python 3.6.6\r\n* Locust 0.8.1\r\n* Vault 0.10.4\r\n\r\n## Prepare\r\nPrepare works as expected\r\n```\r\n$ TOKEN=$(cat ~/.vault-token) ./prepare.py --secrets=10\r\nCreating test keys in Vault  [####################################]  100%\r\n```\r\n\r\nand `testdata.json` looks right:\r\n```\r\n$ cat testdata.json | jq .\r\n{\r\n  \"token\": \"52480efd-bb44-cf48-d15f-acc20ad91239\",\r\n  \"num_secrets\": 10,\r\n  \"secret_size\": 1024,\r\n  \"transit_size\": 1048576,\r\n  \"keys\": [\r\n    \"ab/ab7a03b44ec5d6cac11bcf9feb8ae5b7\",\r\n    \"2a/2cc2512ad0a8eb05bcdbaaae1ba0f9cc\",\r\n    \"5d/cbb7336f9a428ab7fdf5dfe008653622\",\r\n    \"df/ac09d3d0dd3af20a83be99eaec1b3ec6\",\r\n    \"a9/08c1ee02db4eeda9d8e9b47aa09112ca\",\r\n    \"8a/be76eff7bfa3c82c73eee8bcb99f7d44\",\r\n    \"bb/aac1befa0396c3dabff1b7190513da41\",\r\n    \"ac/5c84521206bebeb9b7d826edd6baccdf\",\r\n    \"3b/db34ecefcac9b84c3f0beb04a84a1e0f\",\r\n    \"0c/215acd6f8f277beaa3620b6a246ced24\"\r\n  ]\r\n}\r\n```\r\n## Locust Run\r\n\r\nUnfortunately when I run `locust` I get this:\r\n```\r\n$ locust -H http://localhost:8200 -c 1 -r 1 --no-web\r\n[2018-08-21 14:02:26,106] stompy.local/INFO/locust.main: Starting Locust 0.8.1\r\n[2018-08-21 14:02:26,107] stompy.local/INFO/locust.runners: Hatching and swarming 1 clients at the rate 1 clients/s...\r\n Name                                                          # reqs      # fails     Avg     Min     Max  |  Median   req/s\r\n--------------------------------------------------------------------------------------------------------------------------------------------\r\n--------------------------------------------------------------------------------------------------------------------------------------------\r\n Total                                                              0     0(0.00%)                                       0.00\r\n\r\n[2018-08-21 14:02:26,116] stompy.local/ERROR/stderr: Traceback (most recent call last):\r\n  File \"/Users/tmichael/.pyenv/versions/3.6.6/lib/python3.6/site-packages/locust/core.py\", line 271, in run\r\n    self.execute_next_task()\r\n  File \"/Users/tmichael/.pyenv/versions/3.6.6/lib/python3.6/site-packages/locust/core.py\", line 297, in execute_next_task\r\n    self.execute_task(task[\"callable\"], *task[\"args\"], **task[\"kwargs\"])\r\n  File \"/Users/tmichael/.pyenv/versions/3.6.6/lib/python3.6/site-packages/locust/core.py\", line 309, in execute_task\r\n    task(self, *args, **kwargs)\r\n  File \"/Users/tmichael/Documents/orgs/strata/vault/vault-load-testing/locusts/transit.py\", line 23, in encrypt_block\r\n    data = common.random_data(self.locust.testdata['transit_size'])\r\nTypeError: 'NoneType' object is not subscriptable\r\n...\r\n```\r\n\r\nInspecting `self.locust.testdata` from within the function shows:\r\n```\r\n[2018-08-21 14:15:45,078] stompy.local/INFO/stdout: testdata type is None:\r\n```\r\n\r\nWhat am I missing?  Thanks.\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/vault-load-testing/issues/comments/425283232","html_url":"https://github.com/hashicorp/vault-load-testing/issues/1#issuecomment-425283232","issue_url":"https://api.github.com/repos/hashicorp/vault-load-testing/issues/1","id":425283232,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTI4MzIzMg==","user":{"login":"jeffWelling","id":105077,"node_id":"MDQ6VXNlcjEwNTA3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/105077?v=4","gravatar_id":"","url":"https://api.github.com/users/jeffWelling","html_url":"https://github.com/jeffWelling","followers_url":"https://api.github.com/users/jeffWelling/followers","following_url":"https://api.github.com/users/jeffWelling/following{/other_user}","gists_url":"https://api.github.com/users/jeffWelling/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffWelling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffWelling/subscriptions","organizations_url":"https://api.github.com/users/jeffWelling/orgs","repos_url":"https://api.github.com/users/jeffWelling/repos","events_url":"https://api.github.com/users/jeffWelling/events{/privacy}","received_events_url":"https://api.github.com/users/jeffWelling/received_events","type":"User","site_admin":false},"created_at":"2018-09-28T00:29:17Z","updated_at":"2018-09-28T00:29:17Z","author_association":"NONE","body":"@ankitforcode \r\n\r\nThanks for your work on that pull request! I've hit the problem mentioned here so I tried your branch but I'm hitting different errors now, I just wanted to double-check that everything was included in the commit for that PR? I know I can sometimes forget to include a piece of code, not accusing you of anything, just sanity-checking. :smile: \r\n\r\nFor reference, this is the error I'm getting when I try your branch:\r\n\r\n```\r\n[2018-09-27 18:50:51,298] $HOSTNAME/ERROR/stderr: Traceback (most recent call last):\r\n  File \"/usr/lib/python3.6/site-packages/locust/core.py\", line 271, in run\r\n    self.execute_next_task()\r\n  File \"/usr/lib/python3.6/site-packages/locust/core.py\", line 297, in execute_next_task\r\n    self.execute_task(task[\"callable\"], *task[\"args\"], **task[\"kwargs\"])\r\n  File \"/usr/lib/python3.6/site-packages/locust/core.py\", line 309, in execute_task\r\n    task(self, *args, **kwargs)\r\n  File \"/root/vault-load-testing/locusts/dyn_mongodb.py\", line 60, in generate_creds\r\n    r = self.client.get(f'/v1/database/creds/{self.ROLE_NAME}')\r\n  File \"/usr/lib/python3.6/site-packages/requests/sessions.py\", line 525, in get\r\n    return self.request('GET', url, **kwargs)\r\n  File \"/root/vault-load-testing/locusts/__init__.py\", line 107, in request\r\n    '. '.join(response.json()['errors']))\r\n  File \"/usr/lib/python3.6/site-packages/requests/models.py\", line 896, in json\r\n    return complexjson.loads(self.text, **kwargs)\r\n  File \"/usr/lib64/python3.6/json/__init__.py\", line 354, in loads\r\n    return _default_decoder.decode(s)\r\n  File \"/usr/lib64/python3.6/json/decoder.py\", line 339, in decode\r\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\r\n  File \"/usr/lib64/python3.6/json/decoder.py\", line 357, in raw_decode\r\n    raise JSONDecodeError(\"Expecting value\", s, err.value) from None\r\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\r\n```\r\n\r\nI plan to dig into the error further next week, I'll let you know if I manage to fix my problem."}}
{"actor":{"display_login":"jeffWelling"}}