{"action":"created","issue":{"url":"https://api.github.com/repos/google/turbinia/issues/227","repository_url":"https://api.github.com/repos/google/turbinia","labels_url":"https://api.github.com/repos/google/turbinia/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/google/turbinia/issues/227/comments","events_url":"https://api.github.com/repos/google/turbinia/issues/227/events","html_url":"https://github.com/google/turbinia/issues/227","id":350242912,"node_id":"MDU6SXNzdWUzNTAyNDI5MTI=","number":227,"title":"psqworker fails and can't be killed if GCS_MOUNT_DIR points to a non existing directory in a non writable parent","user":{"login":"rgayon","id":15198637,"node_id":"MDQ6VXNlcjE1MTk4NjM3","avatar_url":"https://avatars1.githubusercontent.com/u/15198637?v=4","gravatar_id":"","url":"https://api.github.com/users/rgayon","html_url":"https://github.com/rgayon","followers_url":"https://api.github.com/users/rgayon/followers","following_url":"https://api.github.com/users/rgayon/following{/other_user}","gists_url":"https://api.github.com/users/rgayon/gists{/gist_id}","starred_url":"https://api.github.com/users/rgayon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgayon/subscriptions","organizations_url":"https://api.github.com/users/rgayon/orgs","repos_url":"https://api.github.com/users/rgayon/repos","events_url":"https://api.github.com/users/rgayon/events{/privacy}","received_events_url":"https://api.github.com/users/rgayon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-14T00:49:02Z","updated_at":"2018-08-16T19:04:13Z","closed_at":null,"author_association":"NONE","body":"```$ turbiniactl psqworker\r\n[INFO] Starting PSQ listener on queue turbinia-psq\r\n[INFO] Running Turbinia PSQ Worker.                                                                   \r\n[INFO] Starting Task StatTask c45b770ca70b4c518a6970a67df6d2b8                                        \r\n[INFO] Creating new directory /mnt/turbinia/output/1534207046-c45b770ca70b4c518a6970a67df6d2b8-StatTask\r\n[ERROR] StatTask Task failed with exception: [Permission error ([Errno 13] Permission denied: '/mnt/turbinia')]\r\n[ERROR] Traceback (most recent call last):                                                                     \r\n  File \"/home/romaing/src/turbinia/turbinia/workers/__init__.py\", line 399, in run_wrapper\r\n    self.result = self.setup(evidence)                                             \r\n  File \"/home/romaing/src/turbinia/turbinia/workers/__init__.py\", line 318, in setup\r\n    self.output_manager.setup(self)                                                                               \r\n  File \"/home/romaing/src/turbinia/turbinia/output_manager.py\", line 156, in setup\r\n    self._output_writers = self.get_output_writers(task)\r\n  File \"/home/romaing/src/turbinia/turbinia/output_manager.py\", line 64, in get_output_writers        unique_dir=unique_dir)]                    \r\n  File \"/home/romaing/src/turbinia/turbinia/output_manager.py\", line 221, in __init__\r\n    super(LocalOutputWriter, self).__init__(*args, **kwargs)\r\n  File \"/home/romaing/src/turbinia/turbinia/output_manager.py\", line 177, in __init__\r\n    self.create_output_dir()\r\n  File \"/home/romaing/src/turbinia/turbinia/output_manager.py\", line 235, in create_output_dir\r\n    raise TurbiniaException(msg)\r\nTurbiniaException: Permission error ([Errno 13] **Permission denied: '/mnt/turbinia')**\r\n[ERROR] No TurbiniaTaskResult object found after task execution.                                                \r\n[DEBUG] Checking TurbiniaTaskResult for serializability \r\n[INFO] Result check: Successful                                                                            \r\n[ERROR] Task 1693f13511f24a9c93ce72788fe1f2c7 failed.                                                              \r\nTraceback (most recent call last):                                                                                 \r\n  File \"/home/romaing/venvs/turbinia-dev/local/lib/python2.7/site-packages/psq/task.py\", line 90, \r\nin execute                                                                                                         \r\n    result = self.call_func()                            \r\n  File \"/home/romaing/venvs/turbinia-dev/local/lib/python2.7/site-packages/psq/task.py\", line 104, in call_func                                     \r\n    return self.f(*self.args, **self.kwargs)                                                          \r\n  File \"/home/romaing/src/turbinia/turbinia/task_manager.py\", line 73, in task_runner\r\n    return obj.run_wrapper(*args, **kwargs)                                                            \r\n  File \"/home/romaing/src/turbinia/turbinia/workers/__init__.py\", line 450, in run_wrapper    \r\n    if original_result_id != self.result.id:                                                                   \r\nAttributeError: 'NoneType' object has no attribute 'id'                                                    \r\n[ERROR] Task 1693f13511f24a9c93ce72788fe1f2c7 failed.\r\n[ERROR] Task 1693f13511f24a9c93ce72788fe1f2c7 failed.                                                      [38/188]\r\nTraceback (most recent call last):                                                                   \r\n  File \"/home/romaing/venvs/turbinia-dev/local/lib/python2.7/site-packages/psq/task.py\", line 90,\r\nin execute                                                                                         \r\n    result = self.call_func()                           \r\n  File \"/home/romaing/venvs/turbinia-dev/local/lib/python2.7/site-packages/psq/task.py\", line 104, in call_func                                                                                                          return self.f(*self.args, **self.kwargs)                                                                         File \"/home/romaing/src/turbinia/turbinia/task_manager.py\", line 73, in task_runner\r\n    return obj.run_wrapper(*args, **kwargs)\r\n  File \"/home/romaing/src/turbinia/turbinia/workers/__init__.py\", line 450, in run_wrapper\r\n    if original_result_id != self.result.id:\r\nAttributeError: 'NoneType' object has no attribute 'id'\r\n[INFO] Starting Task PlasoTask e160edc505bf47d893c4d9e9cb93f0d5\r\n[INFO] Creating new directory /mnt/turbinia/output/1534207047-e160edc505bf47d893c4d9e9cb93f0d5-PlasoTask\r\n[ERROR] PlasoTask Task failed with exception: [Permission error ([Errno 13] Permission denied: '/mnt/turbinia')]\r\n[ERROR] Traceback (most recent call last):\r\n  File \"/home/romaing/src/turbinia/turbinia/workers/__init__.py\", line 399, in run_wrapper\r\n    self.result = self.setup(evidence)\r\n  File \"/home/romaing/src/turbinia/turbinia/workers/__init__.py\", line 318, in setup\r\n    self.output_manager.setup(self)\r\n  File \"/home/romaing/src/turbinia/turbinia/output_manager.py\", line 156, in setup\r\n    self._output_writers = self.get_output_writers(task)\r\n  File \"/home/romaing/src/turbinia/turbinia/output_manager.py\", line 64, in get_output_writers\r\n    unique_dir=unique_dir)]\r\n  File \"/home/romaing/src/turbinia/turbinia/output_manager.py\", line 221, in __init__\r\n    super(LocalOutputWriter, self).__init__(*args, **kwargs)\r\n  File \"/home/romaing/src/turbinia/turbinia/output_manager.py\", line 177, in __init__\r\n    self.create_output_dir()\r\n  File \"/home/romaing/src/turbinia/turbinia/output_manager.py\", line 235, in create_output_dir\r\n    raise TurbiniaException(msg)\r\nTurbiniaException: Permission error ([Errno 13] Permission denied: '/mnt/turbinia')[ERROR] No TurbiniaTaskResult object found after task execution.                                                   \r\n[DEBUG] Checking TurbiniaTaskResult for serializability                                                            \r\n[INFO] Result check: Successful                                                                                    \r\n[ERROR] Task 06d539c4cfac49c5a0ccf58addb3bc1d failed.                                                              \r\nTraceback (most recent call last):\r\n  File \"/home/romaing/venvs/turbinia-dev/local/lib/python2.7/site-packages/psq/task.py\", line 90,\r\nin execute\r\n    result = self.call_func()\r\n  File \"/home/romaing/venvs/turbinia-dev/local/lib/python2.7/site-packages/psq/task.py\", line 104$\r\n in call_func\r\n    return self.f(*self.args, **self.kwargs)\r\n  File \"/home/romaing/src/turbinia/turbinia/task_manager.py\", line 73, in task_runner\r\n    return obj.run_wrapper(*args, **kwargs)\r\n  File \"/home/romaing/src/turbinia/turbinia/workers/__init__.py\", line 450, in run_wrapper\r\n    if original_result_id != self.result.id:\r\nAttributeError: 'NoneType' object has no attribute 'id'\r\n[ERROR] Task 06d539c4cfac49c5a0ccf58addb3bc1d failed.\r\nTraceback (most recent call last):\r\n  File \"/home/romaing/venvs/turbinia-dev/local/lib/python2.7/site-packages/psq/task.py\", line 90,\r\nin execute\r\n    result = self.call_func()\r\n  File \"/home/romaing/venvs/turbinia-dev/local/lib/python2.7/site-packages/psq/task.py\", line 104$\r\n in call_func\r\n    return self.f(*self.args, **self.kwargs)\r\n  File \"/home/romaing/src/turbinia/turbinia/task_manager.py\", line 73, in task_runner\r\n    return obj.run_wrapper(*args, **kwargs)\r\n  File \"/home/romaing/src/turbinia/turbinia/workers/__init__.py\", line 450, in run_wrapper\r\n    if original_result_id != self.result.id:\r\nAttributeError: 'NoneType' object has no attribute 'id'\r\n^[[5~^C^C^C^C^C^C^C^C^C^C\r\n\r\n$ turbiniactl server\r\n[DEBUG] Recieved pubsub message: {\"recipe\": {}, \"request_id\": \"877b2ac92f664b918921520726b5d396\", \"type\": \"Turbinia\r\nRequest\", \"context\": {}, \"evidence\": [{\"processed_by\": [], \"description\": null, \"tags\": {}, \"local_path\": \"/var/log\r\n/dmesg\", \"copyable\": false, \"source\": null, \"saved_path\": null, \"cloud_only\": false, \"request_id\": null, \"config\": \r\n{}, \"type\": \"Directory\", \"saved_path_type\": null, \"name\": \"/var/log/dmesg\"}]}                                      \r\n[INFO] Processing PubSub message 166629104334310                                                                   \r\n[INFO] Received evidence [Directory:/var/log/dmesg:/var/log/dmesg] from PubSub message.                            \r\n[INFO] Adding new evidence: Directory:/var/log/dmesg:/var/log/dmesg                                                \r\n[INFO] Adding StatJob job to process /var/log/dmesg                                                                \r\n[INFO] Writing new task StatTask into Datastore                                                                    \r\n[INFO] Adding PSQ task StatTask with evidence /var/log/dmesg to queue                                              \r\n[INFO] Adding PlasoJob job to process /var/log/dmesg                                                               \r\n[INFO] Writing new task PlasoTask into Datastore                                                                   \r\n[INFO] Adding PSQ task PlasoTask with evidence /var/log/dmesg to queue                                             \r\n[DEBUG] Task 1693f13511f24a9c93ce72788fe1f2c7 not yet created                                                      \r\n[DEBUG] Task 06d539c4cfac49c5a0ccf58addb3bc1d not yet created\r\n[INFO] 2 Tasks still outstanding.\r\n[DEBUG] Updating Task StatTask in Datastore\r\n[DEBUG] Updating Task PlasoTask in Datastore\r\n[WARNING] Task 1693f13511f24a9c93ce72788fe1f2c7 failed.\r\n[WARNING] Task 06d539c4cfac49c5a0ccf58addb3bc1d failed.\r\n[INFO] 0 Tasks still outstanding.\r\n[DEBUG] Updating Task StatTask in Datastore\r\n[DEBUG] Updating Task PlasoTask in Datastore\r\n\r\n\r\n$ turbiniactl -w -a -p 10 directory -l /var/log/dmesg                  \r\n/home/romaing/venvs/turbinia-dev/local/lib/python2.7/site-packages/google/auth/_default.py:66: Use\r\nrWarning: Your application has authenticated using end user credentials from Google Cloud SDK. We recommend that mo\r\nst server applications use service accounts instead. If your application continues to use end user credentials from\r\n Cloud SDK, you might receive a \"quota exceeded\" or \"API not enabled\" error. For more information about service ac$\r\nounts, see https://cloud.google.com/docs/authentication/.                                                            warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)                                                                    \r\n[DEBUG] Setting up PSQ Task Manager requirements on project romaing-turbinia-dev                                   \r\n[DEBUG] Trying to create pubsub topic projects/romaing-turbinia-dev/topics/turbinia-dev                            [DEBUG] PubSub topic projects/romaing-turbinia-dev/topics/turbinia-dev already exists.                             \r\n[DEBUG] Setup PubSub publisher at projects/romaing-turbinia-dev/topics/turbinia-dev                                \r\n[INFO] Creating request 877b2ac92f664b918921520726b5d396 with evidence /var/log/dmesg                              [INFO] Published message 166629104334310 to topic turbinia-dev                                                     \r\n[INFO] Waiting for request 877b2ac92f664b918921520726b5d396 to complete                                            \r\n[DEBUG] Calling Cloud Function [gettasks] with args [{u'instance': u'turbinia-dev', u'kind': u'TurbiniaTask', u're$uest_id': '877b2ac92f664b918921520726b5d396'}]                                                                     \r\n[INFO] 0 Tasks found, 0 completed. Waiting 10 seconds.                                                             \r\n[DEBUG] Calling Cloud Function [gettasks] with args [{u'instance': u'turbinia-dev', u'kind': u'TurbiniaTask', u'request_id': '877b2ac92f664b918921520726b5d\r\n<repeats forever>"},"comment":{"url":"https://api.github.com/repos/google/turbinia/issues/comments/413651831","html_url":"https://github.com/google/turbinia/issues/227#issuecomment-413651831","issue_url":"https://api.github.com/repos/google/turbinia/issues/227","id":413651831,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzY1MTgzMQ==","user":{"login":"aarontp","id":2667195,"node_id":"MDQ6VXNlcjI2NjcxOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/2667195?v=4","gravatar_id":"","url":"https://api.github.com/users/aarontp","html_url":"https://github.com/aarontp","followers_url":"https://api.github.com/users/aarontp/followers","following_url":"https://api.github.com/users/aarontp/following{/other_user}","gists_url":"https://api.github.com/users/aarontp/gists{/gist_id}","starred_url":"https://api.github.com/users/aarontp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarontp/subscriptions","organizations_url":"https://api.github.com/users/aarontp/orgs","repos_url":"https://api.github.com/users/aarontp/repos","events_url":"https://api.github.com/users/aarontp/events{/privacy}","received_events_url":"https://api.github.com/users/aarontp/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T19:04:13Z","updated_at":"2018-08-16T19:04:13Z","author_association":"MEMBER","body":"So for the third bullet point above, I ended up filing this bug: https://github.com/GoogleCloudPlatform/psq/issues/41\r\n\r\nI think the previous issue I was thinking about was this one, but it's been closed since then:\r\nhttps://github.com/GoogleCloudPlatform/psq/issues/17"}}
{"actor":{"display_login":"aarontp"}}