)]}'
{"octavia/certificates/generator/barbican.py":[{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"743f9877be08fff455d529763c082a921fdd4144","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"TIMEOUT \u003d 30"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class BarbicanCertGenerator(cert_gen.CertGenerator):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_a685815a","line":28,"updated":"2014-12-18 19:55:26.000000000","message":"Nit: Change to MAX_ATTEMPTS until timeout is actually a timeout. ;)","commit_id":"9ff6b92ee1272c93d8bf64c169bad9fd56b1b36a"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"743f9877be08fff455d529763c082a921fdd4144","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @classmethod"},{"line_number":97,"context_line":"    def generate_cert_key_pair(cls, validity, bit_length\u003d2048,"},{"line_number":98,"context_line":"                               passphrase\u003dNone):"},{"line_number":99,"context_line":"        # This code will essentially work once Barbican enables CertOrders"},{"line_number":100,"context_line":"        # pk \u003d cls._generate_private_key("},{"line_number":101,"context_line":"        #     bit_length\u003dbit_length,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_e6294938","line":98,"updated":"2014-12-18 19:55:26.000000000","message":"We need to be able to pass in the value we\u0027ll be using for the cert CN (probably the amphora ID)","commit_id":"9ff6b92ee1272c93d8bf64c169bad9fd56b1b36a"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"067c1d3efa058bda97a02ad4f5f80c0620971089","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        attempts \u003d 0"},{"line_number":67,"context_line":"        while (order.container_ref is None and order.status !\u003d \u0027ERROR\u0027"},{"line_number":68,"context_line":"               and attempts \u003c MAX_ATTEMPTS):"},{"line_number":69,"context_line":"            time.sleep(1)"},{"line_number":70,"context_line":"            order \u003d connection.orders.get(order.order_ref)"},{"line_number":71,"context_line":"            attempts +\u003d 1"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_58179554","line":69,"updated":"2014-12-30 18:47:46.000000000","message":"You should use a random-ish exponential backoff here, so avoid synchronizing exactly with other clients.","commit_id":"a906c1056ca347b40a97e16abc003c823ab20b9f"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"6a9c246113b6a2ccc3708c166e9d5bc066679551","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        attempts \u003d 0"},{"line_number":67,"context_line":"        while (order.container_ref is None and order.status !\u003d \u0027ERROR\u0027"},{"line_number":68,"context_line":"               and attempts \u003c MAX_ATTEMPTS):"},{"line_number":69,"context_line":"            time.sleep(1)"},{"line_number":70,"context_line":"            order \u003d connection.orders.get(order.order_ref)"},{"line_number":71,"context_line":"            attempts +\u003d 1"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_45adc9e9","line":69,"in_reply_to":"3a961159_58179554","updated":"2015-01-13 22:53:30.000000000","message":"Done","commit_id":"a906c1056ca347b40a97e16abc003c823ab20b9f"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"25a7eea04afa23ac80b0c3b76b60d2939d273695","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        while (order.container_ref is None and order.status !\u003d \u0027ERROR\u0027"},{"line_number":69,"context_line":"               and attempts \u003c MAX_ATTEMPTS):"},{"line_number":70,"context_line":"            backoff \u003d float(1 \u003c\u003c attempts) + random.random() * attempts"},{"line_number":71,"context_line":"            time.sleep(backoff)"},{"line_number":72,"context_line":"            order \u003d connection.orders.get(order.order_ref)"},{"line_number":73,"context_line":"            attempts +\u003d 1"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_5e3836d4","line":71,"updated":"2015-01-14 00:26:39.000000000","message":"\u003e\u003e\u003e for attempts in xrange(0,30):\n...     print float(1 \u003c\u003c attempts) + random.random() * attempts\n... \n1.0\n2.25490765394\n5.88610193012\n10.9756608109\n18.828516494\n36.7738677291\n64.6381370751\n131.065740283\n262.218929847\n519.842621974\n1029.73002716\n2054.10097772\n4100.89386082\n8202.94041362\n16390.5565961\n32774.8821217\n65539.2872981\n131075.690021\n262154.678789\n524305.600438\n1048579.62423\n2097155.88626\n4194311.66124\n8388626.657\n16777216.9722\n33554435.2353\n67108884.7379\n134217752.74\n268435461.612\n536870931.862\n\n149,000 hours. That is a LONG time. You do not fuck around.\n\nLongest wait should be shorter. :-)","commit_id":"91ae5c3ffa95dbb6cf2c3b79e854998b6d4b43a9"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"4007cf000863eaddb2e40ae044414800ef08850b","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        while (order.container_ref is None and order.status !\u003d \u0027ERROR\u0027"},{"line_number":69,"context_line":"               and attempts \u003c MAX_ATTEMPTS):"},{"line_number":70,"context_line":"            backoff \u003d float(1 \u003c\u003c attempts) + random.random() * attempts"},{"line_number":71,"context_line":"            time.sleep(backoff)"},{"line_number":72,"context_line":"            order \u003d connection.orders.get(order.order_ref)"},{"line_number":73,"context_line":"            attempts +\u003d 1"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_bcb586d1","line":71,"in_reply_to":"3a961159_5c0f422e","updated":"2015-01-14 18:16:48.000000000","message":"Two things:\n\n1. We\u0027re talking about an error state that is likely to only rarely happen unless the underlying cloud is experiencing chronic problems. Therefore, making this exponential backoff configurable is overkill. If you really need a different value for your cloud, modify the code.\n\n2. I don\u0027t really care whether Adam\u0027s \"true exponential\" code is used with a smaller retry count (look like it would be 9 if we\u0027re keeping things under 5 minutes), or whether my code (which is geometric) is used, adding in dividing the delay interval by some constant. Again, this is code that will likely only ever see more than one or two iterations through the loop if something else is seriously wrong with the cloud.\n\nJust pick one and go with it, and let\u0027s get this merged already!","commit_id":"91ae5c3ffa95dbb6cf2c3b79e854998b6d4b43a9"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"d8fc94ec96646e2a319dcf72c6397ba914b241ab","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        while (order.container_ref is None and order.status !\u003d \u0027ERROR\u0027"},{"line_number":69,"context_line":"               and attempts \u003c MAX_ATTEMPTS):"},{"line_number":70,"context_line":"            backoff \u003d float(1 \u003c\u003c attempts) + random.random() * attempts"},{"line_number":71,"context_line":"            time.sleep(backoff)"},{"line_number":72,"context_line":"            order \u003d connection.orders.get(order.order_ref)"},{"line_number":73,"context_line":"            attempts +\u003d 1"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_b4bdb9b3","line":71,"in_reply_to":"3a961159_5e3836d4","updated":"2015-01-14 02:16:57.000000000","message":"That\u0027s how exponential rolls, yo. Don\u0027t ask for a sledgehammer and expect to get a ball-peen. :P\n\nThose results are what I would expect to see, but if you would like it to hit a MAX, we can do that... Alternatively, we can limit to more like 10 maximum attempts or something.","commit_id":"91ae5c3ffa95dbb6cf2c3b79e854998b6d4b43a9"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"2664df4118e008eb142a42e219dc0b2adab23bda","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        while (order.container_ref is None and order.status !\u003d \u0027ERROR\u0027"},{"line_number":69,"context_line":"               and attempts \u003c MAX_ATTEMPTS):"},{"line_number":70,"context_line":"            backoff \u003d float(1 \u003c\u003c attempts) + random.random() * attempts"},{"line_number":71,"context_line":"            time.sleep(backoff)"},{"line_number":72,"context_line":"            order \u003d connection.orders.get(order.order_ref)"},{"line_number":73,"context_line":"            attempts +\u003d 1"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_5c0f422e","line":71,"in_reply_to":"3a961159_99129cfb","updated":"2015-01-14 17:58:45.000000000","message":"+1 german\u0027s comment.  I think five minutes is a good limit for waiting on Barbican.\n\nThat said, I would like to see that limit configurable via a config file.","commit_id":"91ae5c3ffa95dbb6cf2c3b79e854998b6d4b43a9"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"3a4db8aa098412c8a2cabcb3bc325d25c0108fef","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        while (order.container_ref is None and order.status !\u003d \u0027ERROR\u0027"},{"line_number":69,"context_line":"               and attempts \u003c MAX_ATTEMPTS):"},{"line_number":70,"context_line":"            backoff \u003d float(1 \u003c\u003c attempts) + random.random() * attempts"},{"line_number":71,"context_line":"            time.sleep(backoff)"},{"line_number":72,"context_line":"            order \u003d connection.orders.get(order.order_ref)"},{"line_number":73,"context_line":"            attempts +\u003d 1"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_f47ada75","line":71,"in_reply_to":"3a961159_b4bdb9b3","updated":"2015-01-14 08:20:18.000000000","message":"I\u0027m thinking we want to get an exception sometime before we all retire. So maybe this instead:\n\nfloat((attempts + random.random()) * attempts)\n\nThat seems to yield a maximum delay of around 15 minutes. If we want a shorter maximum delay, we can always divide that by some constant.","commit_id":"91ae5c3ffa95dbb6cf2c3b79e854998b6d4b43a9"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"6604de770802c24119e4e192c7caa2cf5588017c","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        while (order.container_ref is None and order.status !\u003d \u0027ERROR\u0027"},{"line_number":69,"context_line":"               and attempts \u003c MAX_ATTEMPTS):"},{"line_number":70,"context_line":"            backoff \u003d float(1 \u003c\u003c attempts) + random.random() * attempts"},{"line_number":71,"context_line":"            time.sleep(backoff)"},{"line_number":72,"context_line":"            order \u003d connection.orders.get(order.order_ref)"},{"line_number":73,"context_line":"            attempts +\u003d 1"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_1705930f","line":71,"in_reply_to":"3a961159_bcb586d1","updated":"2015-01-14 18:35:15.000000000","message":"I like 10, because 10 attempts with backoffs in-between totals just over 17 minutes, which I think is a legitimate time to wait for a network outage. In this case the longest single wait is just over 8 minutes. As Stephen said, this should be fine for now, but could be configurable later if we think it\u0027s really absolutely necessary.\n\n\u003e\u003e\u003e [float(1 \u003c\u003c attempts) + random.random() * attempts for attempts in range(10)]\n\n[1.0,\n 2.2610611425395195,\n 4.727063170971382,\n 10.290166878703404,\n 19.521477474583012,\n 33.162423746195245,\n 64.64110982841089,\n 132.29121271074933,\n 260.44896560884916,\n 518.3746575706089]","commit_id":"91ae5c3ffa95dbb6cf2c3b79e854998b6d4b43a9"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"894d58e3ad62abaee7dfdf01906327d3d186ddb9","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        while (order.container_ref is None and order.status !\u003d \u0027ERROR\u0027"},{"line_number":69,"context_line":"               and attempts \u003c MAX_ATTEMPTS):"},{"line_number":70,"context_line":"            backoff \u003d float(1 \u003c\u003c attempts) + random.random() * attempts"},{"line_number":71,"context_line":"            time.sleep(backoff)"},{"line_number":72,"context_line":"            order \u003d connection.orders.get(order.order_ref)"},{"line_number":73,"context_line":"            attempts +\u003d 1"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a961159_99129cfb","line":71,"in_reply_to":"3a961159_f47ada75","updated":"2015-01-14 17:41:06.000000000","message":"I usually give up after ten minutes with nova so for Barbican I would expect something in the five minute range max.  I am also a big fan of exponential backoff (see what AWS says about it: http://docs.aws.amazon.com/general/latest/gr/api-retries.html) -- so we should likely use rm_works solution with a far smaller number of retries.\n\n Also is Barbican sending back a Retry header? If so we should use it.","commit_id":"91ae5c3ffa95dbb6cf2c3b79e854998b6d4b43a9"}],"octavia/certificates/generator/local.py":[{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"743f9877be08fff455d529763c082a921fdd4144","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    @classmethod"},{"line_number":133,"context_line":"    def generate_cert_key_pair(cls, validity, bit_length\u003d2048,"},{"line_number":134,"context_line":"                               passphrase\u003dNone):"},{"line_number":135,"context_line":"        pk \u003d cls._generate_private_key(bit_length, passphrase)"},{"line_number":136,"context_line":"        csr \u003d cls._generate_csr(pk, passphrase)"},{"line_number":137,"context_line":"        cert \u003d cls.sign_cert(csr, validity)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_06a3b59e","line":134,"updated":"2014-12-18 19:55:26.000000000","message":"Per the other file in this PS: Need to pass in CN as well.\n\nAnd per our discussion, we need to make sure that the cert has the extended attributes to allow it to be used both as a client and server certificate.","commit_id":"9ff6b92ee1272c93d8bf64c169bad9fd56b1b36a"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"25569ece57d872015518dcc810758901f04755d9","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            )"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    @classmethod"},{"line_number":129,"context_line":"    def _generate_csr(cls, cn, private_key, passphrase\u003dNone):"},{"line_number":130,"context_line":"        pk \u003d crypto.load_privatekey("},{"line_number":131,"context_line":"            crypto.FILETYPE_PEM,"},{"line_number":132,"context_line":"            private_key,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_b6c84823","line":129,"updated":"2014-12-18 23:50:49.000000000","message":"We still need to add the x509 extended attributes to mark the cert as both a server and client cert...  but I\u0027d be willing to merge this and add it in a later patch if that\u0027s a pain in the patootie to figure out how to do at this stage of the game.","commit_id":"b24c709e4e643db0a58c8e12a3b67e5c8b5e0d35"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"eb7433dcf1250f59329d44d4dea42be04ebf7395","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            )"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    @classmethod"},{"line_number":129,"context_line":"    def _generate_csr(cls, cn, private_key, passphrase\u003dNone):"},{"line_number":130,"context_line":"        pk \u003d crypto.load_privatekey("},{"line_number":131,"context_line":"            crypto.FILETYPE_PEM,"},{"line_number":132,"context_line":"            private_key,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_f69c9010","line":129,"updated":"2014-12-18 23:51:40.000000000","message":"Comment from last PS: We still need to add the x509 extended attributes to mark the cert as both a server and client cert... but I\u0027d be willing to merge this and add it in a later patch if that\u0027s a pain in the patootie to figure out how to do at this stage of the game.","commit_id":"f18e01c65c0f39a9150bbcd3955ff26854911a0e"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"13f6cbfc92cc102b7a2df9857168e122ab3327a6","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            )"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    @classmethod"},{"line_number":129,"context_line":"    def _generate_csr(cls, cn, private_key, passphrase\u003dNone):"},{"line_number":130,"context_line":"        pk \u003d crypto.load_privatekey("},{"line_number":131,"context_line":"            crypto.FILETYPE_PEM,"},{"line_number":132,"context_line":"            private_key,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_80b2d446","line":129,"in_reply_to":"3a961159_f69c9010","updated":"2014-12-23 09:45:43.000000000","message":"Yeah I think we merge this as is, and Carlos said he was interested in figuring out the x509 extensions part.","commit_id":"f18e01c65c0f39a9150bbcd3955ff26854911a0e"}]}
