)]}'
{"playbooks/roles/os_swift/files/swift_rings_check.py":[{"author":{"_account_id":14288,"name":"Matthew Thode","display_name":"prometheanfire","email":"mthode@mthode.org","username":"prometheanfire"},"change_message_id":"95474864182ecb86ca30ea87f7c343bb593a9269","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env python"},{"line_number":2,"context_line":"# Copyright 2014, Rackspace US, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_20c7a813","line":1,"updated":"2015-07-17 16:41:46.000000000","message":"should we specify a python version here?  would be slight more robust.","commit_id":"a5a19e5646da004f169d6f1b6b359f269c026814"},{"author":{"_account_id":2799,"name":"Andy McCrae","email":"andy.mccrae@googlemail.com","username":"andrew-mccrae"},"change_message_id":"83e0fe3e137b5c977de9fef69d12f885dce76205","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env python"},{"line_number":2,"context_line":"# Copyright 2014, Rackspace US, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_436235da","line":1,"in_reply_to":"9a41bdd9_20c7a813","updated":"2015-07-19 11:18:15.000000000","message":"I don\u0027t mind either way, but this isn\u0027t the case in the swift_rings.py at present, so if we\u0027re changing that it should change in both places.","commit_id":"a5a19e5646da004f169d6f1b6b359f269c026814"},{"author":{"_account_id":14288,"name":"Matthew Thode","display_name":"prometheanfire","email":"mthode@mthode.org","username":"prometheanfire"},"change_message_id":"95474864182ecb86ca30ea87f7c343bb593a9269","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from os.path import exists"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import json"},{"line_number":21,"context_line":"import pickle"},{"line_number":22,"context_line":"import sys"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"USAGE \u003d \"usage: %prog -f \u003cswift_ring.contentsa\u003e -r \u003cmanaged_region\u003e\""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_2031e80b","line":21,"updated":"2015-07-17 16:41:46.000000000","message":"I\u0027d like to avoid pickles if we can and it only seems to be used once.","commit_id":"a5a19e5646da004f169d6f1b6b359f269c026814"},{"author":{"_account_id":2799,"name":"Andy McCrae","email":"andy.mccrae@googlemail.com","username":"andrew-mccrae"},"change_message_id":"83e0fe3e137b5c977de9fef69d12f885dce76205","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from os.path import exists"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import json"},{"line_number":21,"context_line":"import pickle"},{"line_number":22,"context_line":"import sys"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"USAGE \u003d \"usage: %prog -f \u003cswift_ring.contentsa\u003e -r \u003cmanaged_region\u003e\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_e324a1b0","line":21,"in_reply_to":"9a41bdd9_2031e80b","updated":"2015-07-19 11:18:15.000000000","message":"The builder file uses pickle so we cant avoid that afaik - its a swift specific thing.","commit_id":"a5a19e5646da004f169d6f1b6b359f269c026814"},{"author":{"_account_id":14288,"name":"Matthew Thode","display_name":"prometheanfire","email":"mthode@mthode.org","username":"prometheanfire"},"change_message_id":"95474864182ecb86ca30ea87f7c343bb593a9269","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    except Exception as ex:"},{"line_number":86,"context_line":"        raise RingComparisonError(ex)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    if content_weight !\u003d ring_weight:"},{"line_number":89,"context_line":"        raise RingComparisonError(\u0027Device weight for device %s differs to the \u0027"},{"line_number":90,"context_line":"                                  \u0027ring.\u0027 % devstr)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_c6d85482","line":88,"updated":"2015-07-17 16:41:46.000000000","message":"these variables will fail to load if the try fails somehow. also generic exceptions are generally bad.","commit_id":"a5a19e5646da004f169d6f1b6b359f269c026814"},{"author":{"_account_id":2799,"name":"Andy McCrae","email":"andy.mccrae@googlemail.com","username":"andrew-mccrae"},"change_message_id":"83e0fe3e137b5c977de9fef69d12f885dce76205","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    except Exception as ex:"},{"line_number":86,"context_line":"        raise RingComparisonError(ex)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    if content_weight !\u003d ring_weight:"},{"line_number":89,"context_line":"        raise RingComparisonError(\u0027Device weight for device %s differs to the \u0027"},{"line_number":90,"context_line":"                                  \u0027ring.\u0027 % devstr)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_633171ec","line":88,"in_reply_to":"9a41bdd9_c6d85482","updated":"2015-07-19 11:18:15.000000000","message":"I\u0027ll move it anyway - but surely if they haven\u0027t been loaded an exception would\u0027ve been raised so this code block wouldn\u0027t run - meaning its not possible. I think the try block is not required since this script just does a check and doesn\u0027t perform a run on the ring-builder like the ring-build script does - I just ported over the swift_rings.py and ripped out the unrequired bits for the most part, so this only does a check where the swift_rings actually builds the ring.","commit_id":"a5a19e5646da004f169d6f1b6b359f269c026814"}],"playbooks/roles/os_swift/tasks/swift_rings_post_distribution_check.yml":[{"author":{"_account_id":14288,"name":"Matthew Thode","display_name":"prometheanfire","email":"mthode@mthode.org","username":"prometheanfire"},"change_message_id":"95474864182ecb86ca30ea87f7c343bb593a9269","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    - swift-rings-check"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"- name: \"Ensure contents file matches ring after ring sync for storage policies\""},{"line_number":41,"context_line":"  command: \"/usr/bin/python /etc/swift/scripts/swift_rings_check.py -f /etc/swift/scripts/object-{{ item.policy.index }}.contents\""},{"line_number":42,"context_line":"  with_items:"},{"line_number":43,"context_line":"    - \"{{ swift.storage_policies }}\""},{"line_number":44,"context_line":"  sudo: yes"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9a41bdd9_402e6cfb","line":41,"updated":"2015-07-17 16:41:46.000000000","message":"should this be a specific python version? even better the script should have have this and be directly executed (the script has just python as the program, not python2.7 or something).","commit_id":"a5a19e5646da004f169d6f1b6b359f269c026814"}]}
