)]}'
{"swift/common/middleware/notifications.py":[{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"4c4f923aeca0cde55142b11e593b0bbdedb3b893","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        else:"},{"line_number":140,"context_line":"            self.logger.debug(\u0027Notification send for %s\u0027 % parsed_url.geturl())"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    @wsgify"},{"line_number":143,"context_line":"    def __call__(self, request):"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        if request.method not in (\"POST\", \"PUT\", \"COPY\", \"DELETE\"):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_ccc9297a","line":142,"updated":"2015-07-01 05:12:04.000000000","message":"I think if the request fails in next middleware, it\u0027s not necessary to send a notification to zaqar. I feel like it\u0027s better to handle a request to zaqar after start_response called.","commit_id":"3ccce4029bc51d619675f49e091b22564e247bbd"},{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"4c4f923aeca0cde55142b11e593b0bbdedb3b893","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                \u0027method\u0027: request.method,"},{"line_number":178,"context_line":"                \u0027account\u0027: account,"},{"line_number":179,"context_line":"                \u0027container\u0027: container,"},{"line_number":180,"context_line":"                \u0027object\u0027: obj"},{"line_number":181,"context_line":"            }}]"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        response_body \u003d json.dumps(_body)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_0ca5d1a0","line":180,"updated":"2015-07-01 05:12:04.000000000","message":"Do we need to have a time here because there are some proxy-server and they send requests for same target (account, container, object) to zaqar. I think we need to have time to understand their sequence.","commit_id":"3ccce4029bc51d619675f49e091b22564e247bbd"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"a810cdfd0a7370e58e9ea63b9c16e819f444aad7","unresolved":false,"context_lines":[{"line_number":37,"context_line":"A queue called can be created like this (note that you have to use your account"},{"line_number":38,"context_line":"name as project ID)::"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    curl -i -X PUT http://localhost:8888/v1/queues/samplequeue \\"},{"line_number":41,"context_line":" -H \"Content-type: application/json\" \\"},{"line_number":42,"context_line":" -H \"X-Project-Id: AUTH_test\""},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_f26b62b7","line":40,"updated":"2015-07-02 08:02:17.000000000","message":"I\u0027d recommend using either v1.1 or v2. In these 2, creating a queue is not necessary as they\u0027ve been made lazy resources. That is to say, the only required action is to post the message and Zaqar will take care of the rest.\n\nAlso, v1 is deprecated now.","commit_id":"712fc4493addf314de47a933e5382c3161e593b2"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"ef20765bba64e761521a745364f3abb35a22aedf","unresolved":false,"context_lines":[{"line_number":19,"context_line":"DELETE). To enable this a special meatadata settings must be set on the"},{"line_number":20,"context_line":"container."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"In an OpenStack environment is is most likely that the OpenStack messaging"},{"line_number":23,"context_line":"service Zaqar will be used to receive and process messages. However, this"},{"line_number":24,"context_line":"middleware can be used with other messaging service that accepts the REST API"},{"line_number":25,"context_line":"calls defined below."}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_5cce79b5","line":22,"updated":"2015-07-06 10:30:04.000000000","message":"nit: \"it\"","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a0fa5be8005794510b7149db8025016f2e73f77b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"DELETE). To enable this a special meatadata settings must be set on the"},{"line_number":20,"context_line":"container."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"In an OpenStack environment is is most likely that the OpenStack messaging"},{"line_number":23,"context_line":"service Zaqar will be used to receive and process messages. However, this"},{"line_number":24,"context_line":"middleware can be used with other messaging service that accepts the REST API"},{"line_number":25,"context_line":"calls defined below."}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_bd26d064","line":22,"in_reply_to":"ba3cc151_5cce79b5","updated":"2015-09-08 07:31:32.000000000","message":"Done","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"ef20765bba64e761521a745364f3abb35a22aedf","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                \"method\": \"\u003cmethod\u003e\","},{"line_number":48,"context_line":"                \"account\": \"\u003caccount\u003e\","},{"line_number":49,"context_line":"                \"container\": \"\u003ccontainer\u003e\","},{"line_number":50,"context_line":"                \"object\": \"\u003cobject\u003e\""},{"line_number":51,"context_line":"            }"},{"line_number":52,"context_line":"        }"},{"line_number":53,"context_line":"    ]}"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_1c48f12c","line":50,"updated":"2015-07-06 10:30:04.000000000","message":"Is there a use-case (like dlo, slo) for sending query params (or headers) as well ? \n\nIf the number of fields are going to change (say you extended this middleware to send container creation/deletion notification) in future, you might as well include a \"version\" field.","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"ef20765bba64e761521a745364f3abb35a22aedf","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    X-Auth-Token: \u003cAuth token if set\u003e"},{"line_number":60,"context_line":"    Accept: application/json"},{"line_number":61,"context_line":"    X-Project-Id: \u003caccount\u003e"},{"line_number":62,"context_line":"    Client-ID: \u003crandom UUID4, generated on class instantiation\u003e"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"The ``notifications`` middleware should be added to the pipeline in your"},{"line_number":65,"context_line":"``/etc/swift/proxy-server.conf`` file just after any auth middleware. You also"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_fcd0adf9","line":62,"updated":"2015-07-06 10:30:04.000000000","message":"Would the proxy\u0027s \u003cip\u003e:\u003cport\u003e be more useful instead ?","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a0fa5be8005794510b7149db8025016f2e73f77b","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    X-Auth-Token: \u003cAuth token if set\u003e"},{"line_number":60,"context_line":"    Accept: application/json"},{"line_number":61,"context_line":"    X-Project-Id: \u003caccount\u003e"},{"line_number":62,"context_line":"    Client-ID: \u003crandom UUID4, generated on class instantiation\u003e"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"The ``notifications`` middleware should be added to the pipeline in your"},{"line_number":65,"context_line":"``/etc/swift/proxy-server.conf`` file just after any auth middleware. You also"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_1defbce9","line":62,"in_reply_to":"ba3cc151_fcd0adf9","updated":"2015-09-08 07:31:32.000000000","message":"The Client-ID is a strict requirement from the Zaqar API, and it has to be an UUID: https://wiki.openstack.org/wiki/Zaqar/specs/api/v1.1#Common_Headers","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"73b6c3afdc3037274f352baa622f1819e203843b","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        self.client_id \u003d str(uuid.uuid4())"},{"line_number":118,"context_line":"        self.allowed_hosts \u003d conf.get(\u0027allowed_hosts\u0027, \u0027localhost\u0027).split()"},{"line_number":119,"context_line":"        self.send_auth_token \u003d config_true_value("},{"line_number":120,"context_line":"            conf.get(\u0027send_auth_token\u0027, \u0027true\u0027))"},{"line_number":121,"context_line":"        self.logger \u003d get_logger(conf, log_route\u003d\u0027notifications\u0027)"},{"line_number":122,"context_line":"        self.pool \u003d GreenPool(self.concurrency)"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_a92e17f8","line":120,"updated":"2015-07-07 17:52:16.000000000","message":"given the security implication should this default to False or be per container?  What about Zaqar tempurl queues?","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a0fa5be8005794510b7149db8025016f2e73f77b","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        self.client_id \u003d str(uuid.uuid4())"},{"line_number":118,"context_line":"        self.allowed_hosts \u003d conf.get(\u0027allowed_hosts\u0027, \u0027localhost\u0027).split()"},{"line_number":119,"context_line":"        self.send_auth_token \u003d config_true_value("},{"line_number":120,"context_line":"            conf.get(\u0027send_auth_token\u0027, \u0027true\u0027))"},{"line_number":121,"context_line":"        self.logger \u003d get_logger(conf, log_route\u003d\u0027notifications\u0027)"},{"line_number":122,"context_line":"        self.pool \u003d GreenPool(self.concurrency)"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_dd75c497","line":120,"in_reply_to":"ba3cc151_a92e17f8","updated":"2015-09-08 07:31:32.000000000","message":"Good point, I like the per-container approach. AFAIK there are no tempurl-like queues in Zaqar.","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"73b6c3afdc3037274f352baa622f1819e203843b","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        self.send_auth_token \u003d config_true_value("},{"line_number":120,"context_line":"            conf.get(\u0027send_auth_token\u0027, \u0027true\u0027))"},{"line_number":121,"context_line":"        self.logger \u003d get_logger(conf, log_route\u003d\u0027notifications\u0027)"},{"line_number":122,"context_line":"        self.pool \u003d GreenPool(self.concurrency)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def _log_error(self, request, reason):"},{"line_number":125,"context_line":"        self.logger.error(\"Notification send failed: %s (%s)\" %"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_a9f1376c","line":122,"updated":"2015-07-07 17:52:16.000000000","message":"10 doesn\u0027t seem that high to me, the entire worker is sharing this pool.","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a0fa5be8005794510b7149db8025016f2e73f77b","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        self.send_auth_token \u003d config_true_value("},{"line_number":120,"context_line":"            conf.get(\u0027send_auth_token\u0027, \u0027true\u0027))"},{"line_number":121,"context_line":"        self.logger \u003d get_logger(conf, log_route\u003d\u0027notifications\u0027)"},{"line_number":122,"context_line":"        self.pool \u003d GreenPool(self.concurrency)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def _log_error(self, request, reason):"},{"line_number":125,"context_line":"        self.logger.error(\"Notification send failed: %s (%s)\" %"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_9da2ecfa","line":122,"in_reply_to":"ba3cc151_a9f1376c","updated":"2015-09-08 07:31:32.000000000","message":"OK, set to 100.","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"73b6c3afdc3037274f352baa622f1819e203843b","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        request_body \u003d \u0027{\"messages\": [{\"body\": \u0027 \\"},{"line_number":131,"context_line":"            \u0027{\"account\": \"%s\", \"container\": \"%s\", \u0027 \\"},{"line_number":132,"context_line":"            \u0027\"object\": \"%s\", \"method\": \"%s\"}}]}\u0027 % ("},{"line_number":133,"context_line":"            account, container, obj, request.method)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        headers \u003d {"},{"line_number":136,"context_line":"            \"Content-Type\": \"application/json\","}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_29c68749","line":133,"updated":"2015-07-07 17:52:16.000000000","message":"can we just use json.dumps","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a0fa5be8005794510b7149db8025016f2e73f77b","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        request_body \u003d \u0027{\"messages\": [{\"body\": \u0027 \\"},{"line_number":131,"context_line":"            \u0027{\"account\": \"%s\", \"container\": \"%s\", \u0027 \\"},{"line_number":132,"context_line":"            \u0027\"object\": \"%s\", \"method\": \"%s\"}}]}\u0027 % ("},{"line_number":133,"context_line":"            account, container, obj, request.method)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        headers \u003d {"},{"line_number":136,"context_line":"            \"Content-Type\": \"application/json\","}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_dd4e246e","line":133,"in_reply_to":"ba3cc151_29c68749","updated":"2015-09-08 07:31:32.000000000","message":"Sure! Just thought it might be a little bit overkill, given that this is the only json.dumps in this middleware. I\u0027m changing this.","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"73b6c3afdc3037274f352baa622f1819e203843b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # users by directing messages to a separate Zaqar instance that is in"},{"line_number":146,"context_line":"        # the list of allowed_hosts."},{"line_number":147,"context_line":"        token \u003d request.environ.get("},{"line_number":148,"context_line":"            \u0027HTTP_X_AUTH_TOKEN\u0027, request.environ.get(\u0027HTTP_X_STORAGE_TOKEN\u0027))"},{"line_number":149,"context_line":"        if self.send_auth_token and token:"},{"line_number":150,"context_line":"            headers[\u0027X-Auth-Token\u0027] \u003d token"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_e9017f07","line":148,"updated":"2015-07-07 17:52:16.000000000","message":"is it possible with container acl\u0027s that this token (if any) may not authorize the put to the queue?","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a0fa5be8005794510b7149db8025016f2e73f77b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # users by directing messages to a separate Zaqar instance that is in"},{"line_number":146,"context_line":"        # the list of allowed_hosts."},{"line_number":147,"context_line":"        token \u003d request.environ.get("},{"line_number":148,"context_line":"            \u0027HTTP_X_AUTH_TOKEN\u0027, request.environ.get(\u0027HTTP_X_STORAGE_TOKEN\u0027))"},{"line_number":149,"context_line":"        if self.send_auth_token and token:"},{"line_number":150,"context_line":"            headers[\u0027X-Auth-Token\u0027] \u003d token"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_3d2de08e","line":148,"in_reply_to":"ba3cc151_e9017f07","updated":"2015-09-08 07:31:32.000000000","message":"Sure, that\u0027s possible - the user has to make sure that the token is also valid to authenticate against Zaqar. It\u0027s tricky though; the user won\u0027t know the token is not valid for Zaqar, because there is no response from this middleware itself.\n\nSo a async processing of notifications might make more sense...","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"ef20765bba64e761521a745364f3abb35a22aedf","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        container_info \u003d get_container_info(request.environ, self.app)"},{"line_number":191,"context_line":"        meta \u003d container_info.get(\u0027meta\u0027, {})"},{"line_number":192,"context_line":"        notifications_url \u003d meta.get(\u0027notifications-url\u0027)"},{"line_number":193,"context_line":"        if not notifications_url:"},{"line_number":194,"context_line":"            return self.app"},{"line_number":195,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_1f3783e4","line":192,"updated":"2015-07-06 10:30:04.000000000","message":"Is there a use case for a container to be set with multiple comma separated notifications-url ?\n\nAlso a badly formed (intentionally or not) notification-url will cause this middleware to send unwanted HTTP requests. Would it be nice to include a basic regex validation of notification url ?","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a0fa5be8005794510b7149db8025016f2e73f77b","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        container_info \u003d get_container_info(request.environ, self.app)"},{"line_number":191,"context_line":"        meta \u003d container_info.get(\u0027meta\u0027, {})"},{"line_number":192,"context_line":"        notifications_url \u003d meta.get(\u0027notifications-url\u0027)"},{"line_number":193,"context_line":"        if not notifications_url:"},{"line_number":194,"context_line":"            return self.app"},{"line_number":195,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_7a091e30","line":192,"in_reply_to":"ba3cc151_1f3783e4","updated":"2015-09-08 07:31:32.000000000","message":"Good point - there might be use cases for multiple backends.\n\nHowever, I think this should be strictly limited; it takes some time to process the notification, and one might run into trouble if every PUT results in 10 other HTTP POSTS.","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"ef20765bba64e761521a745364f3abb35a22aedf","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        # risk to allow any host"},{"line_number":198,"context_line":"        parsed_url \u003d urlparse(notifications_url)"},{"line_number":199,"context_line":"        if parsed_url.hostname not in self.allowed_hosts:"},{"line_number":200,"context_line":"            self._log_error(request, \"host not allowed\")"},{"line_number":201,"context_line":"            return self.app"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        # Do not block if the pool is filled. This should rarely happen; the"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_1cff9135","line":200,"updated":"2015-07-06 10:30:04.000000000","message":"nit: It would be nice to see a little more verbose log entry here.\n\n    \"%s not in the list of allowed_hosts\" % (parsed_url.hostname)","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a0fa5be8005794510b7149db8025016f2e73f77b","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        # risk to allow any host"},{"line_number":198,"context_line":"        parsed_url \u003d urlparse(notifications_url)"},{"line_number":199,"context_line":"        if parsed_url.hostname not in self.allowed_hosts:"},{"line_number":200,"context_line":"            self._log_error(request, \"host not allowed\")"},{"line_number":201,"context_line":"            return self.app"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        # Do not block if the pool is filled. This should rarely happen; the"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_ba9fb600","line":200,"in_reply_to":"ba3cc151_1cff9135","updated":"2015-09-08 07:31:32.000000000","message":"Done","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"73b6c3afdc3037274f352baa622f1819e203843b","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        # Do not block if the pool is filled. This should rarely happen; the"},{"line_number":204,"context_line":"        # default pool size is 10. If it does happen something is probably"},{"line_number":205,"context_line":"        # broken; but Swift should continue to work thus skip the notification"},{"line_number":206,"context_line":"        # and log the error instead"},{"line_number":207,"context_line":"        if self.pool.free():"},{"line_number":208,"context_line":"            self.pool.spawn_n("},{"line_number":209,"context_line":"                self._send_notification,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_298527ac","line":206,"updated":"2015-07-07 17:52:16.000000000","message":"this seems like a curious hard requirement.  We\u0027ll try to make notifications but not very hard...  I suppose that\u0027s the challenge of doing the notifications in the proxy rather than off the containers.","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a0fa5be8005794510b7149db8025016f2e73f77b","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        # Do not block if the pool is filled. This should rarely happen; the"},{"line_number":204,"context_line":"        # default pool size is 10. If it does happen something is probably"},{"line_number":205,"context_line":"        # broken; but Swift should continue to work thus skip the notification"},{"line_number":206,"context_line":"        # and log the error instead"},{"line_number":207,"context_line":"        if self.pool.free():"},{"line_number":208,"context_line":"            self.pool.spawn_n("},{"line_number":209,"context_line":"                self._send_notification,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_1a2d82a7","line":206,"in_reply_to":"ba3cc151_298527ac","updated":"2015-09-08 07:31:32.000000000","message":"Yes, I was also wondering how to solve this. I think the only possibility to make sure a notification is _stored_ somewhere is to use Swift itself.\n\nJust put a notification object into a container, and if a 201 is returned you can be sure that the notification is stored.\n\nA possibility to make this more fail-safe is to add a small queue - I think that\u0027s the same idea you had in mind? And process the pending notifications later; though the token might be expired then. However, if we don\u0027t store the notification inside Swift itself it will be lost on a proxy restart...","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"73b6c3afdc3037274f352baa622f1819e203843b","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                self._send_notification,"},{"line_number":210,"context_line":"                parsed_url, request, account, container, obj)"},{"line_number":211,"context_line":"        else:"},{"line_number":212,"context_line":"            self._log_error(request, \"no unused thread available\")"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        return self.app"},{"line_number":215,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_a91b777f","line":212,"updated":"2015-07-07 17:52:16.000000000","message":"maybe something more like an async pending? I\u0027m not sure if we would want to store the tokens - or if they would still be valid...","commit_id":"a1822a23ec42d5d1c2ef1d36a0cafda06e1146c9"},{"author":{"_account_id":14867,"name":"Jaivish Kothari(janonymous)","email":"janonymous.codevulture@gmail.com","username":"Janonymous"},"change_message_id":"c63bdd7f948f5ae3556b0cc7d93602dded77b7fd","unresolved":false,"context_lines":[{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"``notifications`` is a middleware which sends a notification to OpenStack Zaqar"},{"line_number":18,"context_line":"or other messaging services when an object is modified (PUT, POST, COPY,"},{"line_number":19,"context_line":"DELETE). To enable this a special meatadata settings must be set on the"},{"line_number":20,"context_line":"container."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"In an OpenStack environment it is most likely that the OpenStack messaging"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_a6ed2c8d","line":19,"updated":"2015-09-14 19:08:31.000000000","message":"Just a nit if you wish to correct it :) , meatadata -\u003e metadata","commit_id":"83e17b64363e264b2dfa2501f21d254dba0840d6"},{"author":{"_account_id":14867,"name":"Jaivish Kothari(janonymous)","email":"janonymous.codevulture@gmail.com","username":"Janonymous"},"change_message_id":"c63bdd7f948f5ae3556b0cc7d93602dded77b7fd","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    See above for a full description."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    \"\"\""},{"line_number":117,"context_line":"    def __init__(self, app, conf, *args, **kwargs):"},{"line_number":118,"context_line":"        self.app \u003d app"},{"line_number":119,"context_line":"        self.conn_timeout \u003d float(conf.get(\u0027conn_timeout\u0027, 0.5))"},{"line_number":120,"context_line":"        self.response_timeout \u003d float(conf.get(\u0027response_timeout\u0027, 0.5))"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_e963f7af","line":117,"updated":"2015-09-14 19:08:31.000000000","message":"Just a small Question, do we need args, kwargs here  ?","commit_id":"83e17b64363e264b2dfa2501f21d254dba0840d6"}],"test/unit/common/middleware/test_notifications.py":[{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"4c4f923aeca0cde55142b11e593b0bbdedb3b893","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        self.assertEqual(expected_headers, kwargs.get(\u0027headers\u0027))"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        name, args, kwargs \u003d mock_calls[1]"},{"line_number":74,"context_line":"        self.assertEqual((expected_body, ), args)"},{"line_number":75,"context_line":"        self.assertEqual({}, kwargs)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        name, args, kwargs \u003d mock_calls[2]"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_ac1ce577","line":74,"updated":"2015-07-01 05:12:04.000000000","message":"better to change this comparison b/w dicts. might need to convert from tuple(str) to dict.","commit_id":"3ccce4029bc51d619675f49e091b22564e247bbd"}]}
