)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"bb7d0bac832ebce7c4f7784c47a77b4e57f4bf2a","unresolved":false,"context_lines":[{"line_number":14,"context_line":"    swift post con -H \u0027X-Storage-Policy:p1\u0027"},{"line_number":15,"context_line":"This creates one container \u0027con\u0027 with storage policy \u0027p1\u0027."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    swift upload con obj -H \u0027X-Stroage-Policy:p2\u0027"},{"line_number":18,"context_line":"This creates container \u0027con\u0027 with storage policy \u0027p2\u0027 and uploads"},{"line_number":19,"context_line":"object \u0027obj\u0027 into it."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAVn%2F%2FN2k%3D","line":17,"updated":"2014-03-07 15:18:53.000000000","message":"Stroage -\u003e Storage","commit_id":"b4a596a84d65af56e719e3a4d10bcbfb038ba915"}],"bin/swift":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"dc6de811bdf2f39cf662a44ba6b65c0f48387381","unresolved":false,"context_lines":[{"line_number":1088,"context_line":"    # it\u0027ll surface on the first object PUT."},{"line_number":1089,"context_line":"    policy_header \u003d {}"},{"line_number":1090,"context_line":"    try:"},{"line_number":1091,"context_line":"        _header \u003d split_headers(options.header)"},{"line_number":1092,"context_line":"        if \u0027X-Storage-Policy\u0027 in _header:"},{"line_number":1093,"context_line":"            policy_header[\u0027X-Storage-Policy\u0027] \u003d \\"},{"line_number":1094,"context_line":"                _header[\u0027X-Storage-Policy\u0027]"}],"source_content_type":"text/x-swift","patch_set":1,"id":"AAAAUX%2F%2B8xE%3D","line":1091,"updated":"2014-02-18 02:05:36.000000000","message":"Not sure why block has to straddle try:","commit_id":"b4a596a84d65af56e719e3a4d10bcbfb038ba915"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"bb7d0bac832ebce7c4f7784c47a77b4e57f4bf2a","unresolved":false,"context_lines":[{"line_number":1088,"context_line":"    # it\u0027ll surface on the first object PUT."},{"line_number":1089,"context_line":"    policy_header \u003d {}"},{"line_number":1090,"context_line":"    try:"},{"line_number":1091,"context_line":"        _header \u003d split_headers(options.header)"},{"line_number":1092,"context_line":"        if \u0027X-Storage-Policy\u0027 in _header:"},{"line_number":1093,"context_line":"            policy_header[\u0027X-Storage-Policy\u0027] \u003d \\"},{"line_number":1094,"context_line":"                _header[\u0027X-Storage-Policy\u0027]"}],"source_content_type":"text/x-swift","patch_set":1,"id":"AAAAVn%2F%2FN2s%3D","line":1091,"in_reply_to":"AAAAU3%2F%2FazU%3D","updated":"2014-03-07 15:18:53.000000000","message":"Same for me - Yuan, can you move the new block before the try?","commit_id":"b4a596a84d65af56e719e3a4d10bcbfb038ba915"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"b7cbf2cfde51716b722c1850484733ee46229e96","unresolved":false,"context_lines":[{"line_number":1088,"context_line":"    # it\u0027ll surface on the first object PUT."},{"line_number":1089,"context_line":"    policy_header \u003d {}"},{"line_number":1090,"context_line":"    try:"},{"line_number":1091,"context_line":"        _header \u003d split_headers(options.header)"},{"line_number":1092,"context_line":"        if \u0027X-Storage-Policy\u0027 in _header:"},{"line_number":1093,"context_line":"            policy_header[\u0027X-Storage-Policy\u0027] \u003d \\"},{"line_number":1094,"context_line":"                _header[\u0027X-Storage-Policy\u0027]"}],"source_content_type":"text/x-swift","patch_set":1,"id":"AAAAU3%2F%2FazU%3D","line":1091,"in_reply_to":"AAAAUX%2F%2B8xE%3D","updated":"2014-02-26 18:56:06.000000000","message":"Yeah, I guess I don\u0027t see that either but","commit_id":"b4a596a84d65af56e719e3a4d10bcbfb038ba915"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"bb7d0bac832ebce7c4f7784c47a77b4e57f4bf2a","unresolved":false,"context_lines":[{"line_number":1097,"context_line":"            seg_container \u003d args[0] + \u0027_segments\u0027"},{"line_number":1098,"context_line":"            if options.segment_container:"},{"line_number":1099,"context_line":"                seg_container \u003d options.segment_container"},{"line_number":1100,"context_line":"            conn.put_container(seg_container)"},{"line_number":1101,"context_line":"    except ClientException as err:"},{"line_number":1102,"context_line":"        msg \u003d \u0027 \u0027.join(str(x) for x in (err.http_status, err.http_reason))"},{"line_number":1103,"context_line":"        if err.http_response_content:"}],"source_content_type":"text/x-swift","patch_set":1,"id":"AAAAVn%2F%2FN3w%3D","line":1100,"updated":"2014-03-07 15:18:53.000000000","message":"I think the policy_header needs to be applied also to the seg_container? Otherwise the segment container would not use the given Storage-Policy.","commit_id":"b4a596a84d65af56e719e3a4d10bcbfb038ba915"}],"swiftclient/shell.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"bb7d0bac832ebce7c4f7784c47a77b4e57f4bf2a","unresolved":false,"context_lines":[{"line_number":1170,"context_line":"            if options.segment_container:"},{"line_number":1171,"context_line":"                seg_container \u003d options.segment_container"},{"line_number":1172,"context_line":"            seg_headers \u003d {}"},{"line_number":1173,"context_line":"            _meta \u003d conn.head_container(args[0])"},{"line_number":1174,"context_line":"            if \u0027x-storage-policy\u0027 in _meta:"},{"line_number":1175,"context_line":"                seg_headers[\u0027X-Storage-Policy\u0027] \u003d _meta.get(\u0027x-storage-policy\u0027)"},{"line_number":1176,"context_line":"            conn.put_container(seg_container, seg_headers)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_eb8126c4","line":1173,"updated":"2014-06-25 19:56:08.000000000","message":"I\u0027m not totally convinced here: let\u0027s say the base container already exists with a storage policy zero and you use \u0027X-Storage-Policy: one\u0027 to upload segments to another container with a different storage policy. By doing a HEAD this ignores the policy from the commandline? I think it is more clear to a user that all created containers will use the storage policy from the commandline argument.","commit_id":"a69f448f6544980452af393e5ba7de63424e14e8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ede5ea813ba70156d8adfa0a65c525064b38251c","unresolved":false,"context_lines":[{"line_number":1170,"context_line":"            if options.segment_container:"},{"line_number":1171,"context_line":"                seg_container \u003d options.segment_container"},{"line_number":1172,"context_line":"            seg_headers \u003d {}"},{"line_number":1173,"context_line":"            _meta \u003d conn.head_container(args[0])"},{"line_number":1174,"context_line":"            if \u0027x-storage-policy\u0027 in _meta:"},{"line_number":1175,"context_line":"                seg_headers[\u0027X-Storage-Policy\u0027] \u003d _meta.get(\u0027x-storage-policy\u0027)"},{"line_number":1176,"context_line":"            conn.put_container(seg_container, seg_headers)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_a2ae2f2d","line":1173,"in_reply_to":"1ae5cdf2_741b29cb","updated":"2014-06-26 23:18:30.000000000","message":"meh, i think the bigger problem is that you can\u0027t actually even get that far.\n\nI created a container \u0027test\u0027 with silver, then uploaded test bigfile -S 10000000 -H \u0027x-storage-policy: gold\u0027 and the first put_container raises 409, so the _segments container doesn\u0027t even get attempted to be created and the entire upload fails which a bunch of terrible 404 errors.\n\nI think the answer in both cases is to *try* to put with the storage-policy-index from the command line, but make sure to attempt both put_containers every time and print an error on 409.","commit_id":"a69f448f6544980452af393e5ba7de63424e14e8"},{"author":{"_account_id":5189,"name":"Yuan Zhou","email":"dunk007@gmail.com","username":"yuan-zhou"},"change_message_id":"64f1de11eca13a4bbd232540f32df27fdd567a21","unresolved":false,"context_lines":[{"line_number":1170,"context_line":"            if options.segment_container:"},{"line_number":1171,"context_line":"                seg_container \u003d options.segment_container"},{"line_number":1172,"context_line":"            seg_headers \u003d {}"},{"line_number":1173,"context_line":"            _meta \u003d conn.head_container(args[0])"},{"line_number":1174,"context_line":"            if \u0027x-storage-policy\u0027 in _meta:"},{"line_number":1175,"context_line":"                seg_headers[\u0027X-Storage-Policy\u0027] \u003d _meta.get(\u0027x-storage-policy\u0027)"},{"line_number":1176,"context_line":"            conn.put_container(seg_container, seg_headers)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_741b29cb","line":1173,"in_reply_to":"1ae5cdf2_eb8126c4","updated":"2014-06-26 02:54:59.000000000","message":"In that case, if we use the policy specified by client, the segments will be stored with some different policy to the base container. e.g. the 0-byte manifest w/ policy-zero and the real contents w/ policy-one. would this be a small issue if they have different availability? \nI think we should avoid such ambiguity and complexity.","commit_id":"a69f448f6544980452af393e5ba7de63424e14e8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2691a7c642ab7bd49a577e1f3609174553720f67","unresolved":false,"context_lines":[{"line_number":1172,"context_line":"                raise"},{"line_number":1173,"context_line":"            thread_manager.error(\u0027Error trying to create %s with \u0027"},{"line_number":1174,"context_line":"                                 \u0027Storage Policy %s\u0027, args[0],"},{"line_number":1175,"context_line":"                                 _header[\u0027X-Storage-Policy\u0027].strip())"},{"line_number":1176,"context_line":"        if options.segment_size is not None:"},{"line_number":1177,"context_line":"            container_name \u003d seg_container \u003d args[0] + \u0027_segments\u0027"},{"line_number":1178,"context_line":"            if options.segment_container:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_7a8e157b","line":1175,"updated":"2014-07-16 11:32:55.000000000","message":"Isn\u0027t there a risk of a KeyError here if there is no X-Storage_Policy header? A 409 may not be due to a policy conflict https://github.com/openstack/swift/blob/master/swift/container/server.py#L315\n\nmaybe just don\u0027t print the error?","commit_id":"6c2ae059c1be5982d1cb979051e10bda791636c1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2691a7c642ab7bd49a577e1f3609174553720f67","unresolved":false,"context_lines":[{"line_number":1176,"context_line":"        if options.segment_size is not None:"},{"line_number":1177,"context_line":"            container_name \u003d seg_container \u003d args[0] + \u0027_segments\u0027"},{"line_number":1178,"context_line":"            if options.segment_container:"},{"line_number":1179,"context_line":"                seg_container \u003d options.segment_container"},{"line_number":1180,"context_line":"            seg_headers \u003d {}"},{"line_number":1181,"context_line":"            if \u0027X-Storage-Policy\u0027 in _header:"},{"line_number":1182,"context_line":"                seg_headers[\u0027X-Storage-Policy\u0027] \u003d \\"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_fa8145c4","line":1179,"updated":"2014-07-16 11:32:55.000000000","message":"need container_name \u003d seg_container here in case it gets changed in line above","commit_id":"6c2ae059c1be5982d1cb979051e10bda791636c1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2691a7c642ab7bd49a577e1f3609174553720f67","unresolved":false,"context_lines":[{"line_number":1202,"context_line":"            msg)"},{"line_number":1203,"context_line":"    except Exception as err:"},{"line_number":1204,"context_line":"        thread_manager.error("},{"line_number":1205,"context_line":"            \u0027Error trying to create container %r: %s\u0027, args[0],"},{"line_number":1206,"context_line":"            err)"},{"line_number":1207,"context_line":""},{"line_number":1208,"context_line":"    if options.object_name is not None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_9b29328c","line":1205,"updated":"2014-07-16 11:32:55.000000000","message":"does args[0] need to change to container_name here, same as line 1201?","commit_id":"6c2ae059c1be5982d1cb979051e10bda791636c1"}]}
