)]}'
{"octavia/amphorae/backends/agent/api_server/amphora_info.py":[{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"2a3f0bdc43677ef0ab0eef78252accc0c2e63340","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        for interface in netns.get_links():"},{"line_number":132,"context_line":"            interface_name \u003d None"},{"line_number":133,"context_line":"            for item in interface[\u0027attrs\u0027]:"},{"line_number":134,"context_line":"                if item[0] \u003d\u003d \u0027IFLA_IFNAME\u0027 and not item[1].startswith(\u0027eth\u0027):"},{"line_number":135,"context_line":"                    break"},{"line_number":136,"context_line":"                elif item[0] \u003d\u003d \u0027IFLA_IFNAME\u0027:"},{"line_number":137,"context_line":"                    interface_name \u003d item[1]"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_7ff2de07","line":134,"updated":"2016-04-08 22:47:58.000000000","message":"I remember this huge dict, is there a chance that interface attrs will be a list smaller than size 2?","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"e1d6a87ff69cff5a1482feb73203c7ab60efc08c","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        for interface in netns.get_links():"},{"line_number":132,"context_line":"            interface_name \u003d None"},{"line_number":133,"context_line":"            for item in interface[\u0027attrs\u0027]:"},{"line_number":134,"context_line":"                if item[0] \u003d\u003d \u0027IFLA_IFNAME\u0027 and not item[1].startswith(\u0027eth\u0027):"},{"line_number":135,"context_line":"                    break"},{"line_number":136,"context_line":"                elif item[0] \u003d\u003d \u0027IFLA_IFNAME\u0027:"},{"line_number":137,"context_line":"                    interface_name \u003d item[1]"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_0be43f0b","line":134,"in_reply_to":"9a061dce_7ff2de07","updated":"2016-04-09 00:29:37.000000000","message":"In summary, no, it\u0027s a huge list of lists.\nIf you mean will there be a case with \u0027IFLA_IFNAME\u0027 but no item[1], again, no.  It will have a value if this element is present.","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"2a3f0bdc43677ef0ab0eef78252accc0c2e63340","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                return flask.make_response("},{"line_number":187,"context_line":"                                    flask.jsonify("},{"line_number":188,"context_line":"                                        dict(message\u003d\u0027OK\u0027,"},{"line_number":189,"context_line":"                                             interface\u003dint_attr[1])), 200)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    return flask.make_response("},{"line_number":192,"context_line":"        flask.jsonify(dict(message\u003d\"Error interface not found \""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_3fa066a5","line":189,"updated":"2016-04-08 22:47:58.000000000","message":"for readability do you think you could assign the attr[0] and attr[1] and int_attr[0] to variables with descriptive names?  I realize the huge dict makes the readability of the code parsing it very hard to read.  As it stands though, I have no idea what this code is looking for and finding, just by looking at it.","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"e1d6a87ff69cff5a1482feb73203c7ab60efc08c","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                return flask.make_response("},{"line_number":187,"context_line":"                                    flask.jsonify("},{"line_number":188,"context_line":"                                        dict(message\u003d\u0027OK\u0027,"},{"line_number":189,"context_line":"                                             interface\u003dint_attr[1])), 200)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    return flask.make_response("},{"line_number":192,"context_line":"        flask.jsonify(dict(message\u003d\"Error interface not found \""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_6badfb87","line":189,"in_reply_to":"9a061dce_3fa066a5","updated":"2016-04-09 00:29:37.000000000","message":"Maybe comments would be better give the assignment kind of gives these away.\nattrs is a list of lists that are made up of essentially name value pairs, thus [0] and [1]","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"}],"octavia/amphorae/backends/agent/api_server/plug.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"b45260ef4889bc84e9786508a642517657016359","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    plug_inf_file \u003d consts.PLUGGED_INTERFACES"},{"line_number":68,"context_line":"    flags \u003d os.O_RDWR | os.O_CREAT"},{"line_number":69,"context_line":"    mode \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH"},{"line_number":70,"context_line":"    with os.fdopen(os.open(plug_inf_file, flags, mode), \u0027r+\u0027) as text_file:"},{"line_number":71,"context_line":"        inf_list \u003d [inf.rstrip() for inf in text_file]"},{"line_number":72,"context_line":"        if \"{interface}\".format(interface\u003dinterface) not in inf_list:"},{"line_number":73,"context_line":"            text_file.write(\"{interface}\\n\".format(interface\u003dinterface))"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_537aa8bd","line":70,"updated":"2016-04-01 15:49:52.000000000","message":"\"r+\" means:\nOpen  for  reading and writing.  The stream is positioned at the beginning of the file.\nWouldn\u0027t this mean we are overwriting existing entries?\nDo you want \"a+\" instead?","commit_id":"1c3d95a81027e8df07fd0d9b207084202414f850"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"c649927f6db757f8751165b07e9a642b8171761d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    plug_inf_file \u003d consts.PLUGGED_INTERFACES"},{"line_number":68,"context_line":"    flags \u003d os.O_RDWR | os.O_CREAT"},{"line_number":69,"context_line":"    mode \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH"},{"line_number":70,"context_line":"    with os.fdopen(os.open(plug_inf_file, flags, mode), \u0027r+\u0027) as text_file:"},{"line_number":71,"context_line":"        inf_list \u003d [inf.rstrip() for inf in text_file]"},{"line_number":72,"context_line":"        if \"{interface}\".format(interface\u003dinterface) not in inf_list:"},{"line_number":73,"context_line":"            text_file.write(\"{interface}\\n\".format(interface\u003dinterface))"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_99cc5e36","line":70,"in_reply_to":"ba0121b8_537aa8bd","updated":"2016-04-01 17:24:01.000000000","message":"\"r+\" because we first read the file and add entries while preventing any duplicates. Once the file is read and before writing, the file object would be at the end of file.","commit_id":"1c3d95a81027e8df07fd0d9b207084202414f850"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"cb01b89960f9c7c795d50783f577e7890e1b601f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        text \u003d template_port.render(interface\u003dinterface)"},{"line_number":95,"context_line":"        text_file.write(text)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    # write interfaces to plugged_interfaces file and prevent duplicates"},{"line_number":98,"context_line":"    plug_inf_file \u003d consts.PLUGGED_INTERFACES"},{"line_number":99,"context_line":"    flags \u003d os.O_RDWR | os.O_CREAT"},{"line_number":100,"context_line":"    mode \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_38f27a06","line":97,"updated":"2016-04-01 13:34:38.000000000","message":"consider refactoring because we are duplicating code","commit_id":"1c3d95a81027e8df07fd0d9b207084202414f850"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"cb01b89960f9c7c795d50783f577e7890e1b601f","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"def _bring_if_up(params, what):"},{"line_number":127,"context_line":"    # bring interface up"},{"line_number":128,"context_line":"    cmd \u003d \"ip netns exec amphora-haproxy ifup {params}\".format(params\u003dparams)"},{"line_number":129,"context_line":"    try:"},{"line_number":130,"context_line":"        subprocess.check_output(cmd.split(), stderr\u003dsubprocess.STDOUT)"},{"line_number":131,"context_line":"    except subprocess.CalledProcessError as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_b8020ab2","line":128,"updated":"2016-04-01 13:34:38.000000000","message":"Plugging pyroute2 here -- they have a way to execute stuff in namespaces :-)","commit_id":"1c3d95a81027e8df07fd0d9b207084202414f850"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"b45260ef4889bc84e9786508a642517657016359","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"def _bring_if_up(params, what):"},{"line_number":127,"context_line":"    # bring interface up"},{"line_number":128,"context_line":"    cmd \u003d \"ip netns exec amphora-haproxy ifup {params}\".format(params\u003dparams)"},{"line_number":129,"context_line":"    try:"},{"line_number":130,"context_line":"        subprocess.check_output(cmd.split(), stderr\u003dsubprocess.STDOUT)"},{"line_number":131,"context_line":"    except subprocess.CalledProcessError as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_93572025","line":128,"in_reply_to":"ba0121b8_b8020ab2","updated":"2016-04-01 15:49:52.000000000","message":"Yeah, good point this would simplify this code greatly.","commit_id":"1c3d95a81027e8df07fd0d9b207084202414f850"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"2a3f0bdc43677ef0ab0eef78252accc0c2e63340","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    interface_file_path \u003d util.get_network_interface_file(interface)"},{"line_number":66,"context_line":"    os.makedirs(\u0027/etc/netns/\u0027 + consts.AMPHORA_NAMESPACE)"},{"line_number":67,"context_line":"    shutil.copytree(\u0027/etc/network\u0027,"},{"line_number":68,"context_line":"                    \u0027/etc/netns/\u0027 + consts.AMPHORA_NAMESPACE + \u0027/network\u0027,"},{"line_number":69,"context_line":"                    symlinks\u003dTrue,"},{"line_number":70,"context_line":"                    ignore\u003dshutil.ignore_patterns(\u0027eth0*\u0027, \u0027openssh*\u0027))"},{"line_number":71,"context_line":"    name \u003d \u0027/etc/netns/\u0027 + consts.AMPHORA_NAMESPACE + \u0027/network/interfaces\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_9f69b228","line":68,"updated":"2016-04-08 22:47:58.000000000","message":"nit: string concat with + :(","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"1ea82f0d52795cbed7d9bd727c29cf0e4c230094","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    # mode 00644"},{"line_number":74,"context_line":"    mode \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH"},{"line_number":75,"context_line":"    with os.fdopen(os.open(name, flags, mode), \u0027w\u0027) as file:"},{"line_number":76,"context_line":"        file.write(\u0027auto lo\\n\u0027)"},{"line_number":77,"context_line":"        file.write(\u0027iface lo inet loopback\\n\u0027)"},{"line_number":78,"context_line":"        file.write(\u0027source /etc/netns/\u0027 + consts.AMPHORA_NAMESPACE +"},{"line_number":79,"context_line":"                   \u0027/network/interfaces.d/*.cfg\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_f24d85c5","line":76,"updated":"2016-04-08 19:44:34.000000000","message":"consider doing something like file.write(\"\"\"\n...\n\"\"\", \n\nand format","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"2a3f0bdc43677ef0ab0eef78252accc0c2e63340","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        # 1 means just loopback, but we should already have a VIP"},{"line_number":126,"context_line":"        # This works for the add/delete/add case as we don\u0027t delete interfaces"},{"line_number":127,"context_line":"        netns_interface \u003d \u0027eth{0}\u0027.format(len(netns.get_links()))"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    LOG.info(_LI(\u0027Plugged interface {0} will become {1} in the \u0027"},{"line_number":130,"context_line":"                 \u0027namespace {2}\u0027).format(default_netns_interface,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_5280b146","line":127,"updated":"2016-04-08 22:47:58.000000000","message":"so this will skip 0 (or whatever len(...) - 1 is), not a big deal.","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"e1d6a87ff69cff5a1482feb73203c7ab60efc08c","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        # 1 means just loopback, but we should already have a VIP"},{"line_number":126,"context_line":"        # This works for the add/delete/add case as we don\u0027t delete interfaces"},{"line_number":127,"context_line":"        netns_interface \u003d \u0027eth{0}\u0027.format(len(netns.get_links()))"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    LOG.info(_LI(\u0027Plugged interface {0} will become {1} in the \u0027"},{"line_number":130,"context_line":"                 \u0027namespace {2}\u0027).format(default_netns_interface,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_2bd143fc","line":127,"in_reply_to":"9a061dce_5280b146","updated":"2016-04-09 00:29:37.000000000","message":"Yes, eth0 is the VIP plugged above.","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"2a3f0bdc43677ef0ab0eef78252accc0c2e63340","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"def _bring_if_up(interface, what):"},{"line_number":171,"context_line":"    # Note, we are not using pyroute2 for this as it is not /etc/netns"},{"line_number":172,"context_line":"    # aware."},{"line_number":173,"context_line":"    cmd \u003d (\"ip netns exec \" + consts.AMPHORA_NAMESPACE + \" ifup \" +"},{"line_number":174,"context_line":"           \"{params}\".format(params\u003dinterface))"},{"line_number":175,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_1230f99d","line":172,"updated":"2016-04-08 22:47:58.000000000","message":"that sucks!","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"2a3f0bdc43677ef0ab0eef78252accc0c2e63340","unresolved":false,"context_lines":[{"line_number":202,"context_line":"    mode \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH"},{"line_number":203,"context_line":"    with os.fdopen(os.open(plug_inf_file, flags, mode), \u0027r+\u0027) as text_file:"},{"line_number":204,"context_line":"        inf_list \u003d [inf.split()[0].rstrip() for inf in text_file]"},{"line_number":205,"context_line":"        if \"{mac_address}\".format(mac_address\u003dmac_address) not in inf_list:"},{"line_number":206,"context_line":"            text_file.write(\"{mac_address} {interface}\\n\".format("},{"line_number":207,"context_line":"                mac_address\u003dmac_address, interface\u003dinterface))"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_9f21b2b7","line":205,"range":{"start_line":205,"start_character":11,"end_line":205,"end_character":58},"updated":"2016-04-08 22:47:58.000000000","message":"this seems odd, why not if mac_address not in inf_list?","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"c6a94bf5644a2adf78d6e030c7694ece440ebf40","unresolved":false,"context_lines":[{"line_number":202,"context_line":"    mode \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH"},{"line_number":203,"context_line":"    with os.fdopen(os.open(plug_inf_file, flags, mode), \u0027r+\u0027) as text_file:"},{"line_number":204,"context_line":"        inf_list \u003d [inf.split()[0].rstrip() for inf in text_file]"},{"line_number":205,"context_line":"        if \"{mac_address}\".format(mac_address\u003dmac_address) not in inf_list:"},{"line_number":206,"context_line":"            text_file.write(\"{mac_address} {interface}\\n\".format("},{"line_number":207,"context_line":"                mac_address\u003dmac_address, interface\u003dinterface))"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_eedc7948","line":205,"range":{"start_line":205,"start_character":11,"end_line":205,"end_character":58},"in_reply_to":"9a061dce_9f21b2b7","updated":"2016-04-09 01:31:34.000000000","message":"That\u0027s my mistake.. In patch 2, when this snippet was part of plug_vip method, I used the \"format()\" to differentiate base interface and it\u0027s alias. \n\nNow we have modularized it into a separate method, we don\u0027t need to use such anymore.\n\n@Michael, in case you are pushing another revision, you can update this.","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"762b4386c1d78573ead0ec32f1ddbe9103b8e599","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    sections.append(\u0027255\u0027)"},{"line_number":60,"context_line":"    broadcast \u003d \u0027.\u0027.join(sections)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    # We need to setup the netns netowrk directory so that the ifup"},{"line_number":63,"context_line":"    # commands used here and in the startup scripts \"sees\" the right"},{"line_number":64,"context_line":"    # interfaces and scripts."},{"line_number":65,"context_line":"    interface_file_path \u003d util.get_network_interface_file(interface)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a18252c_f7efae1b","line":62,"updated":"2016-04-14 17:01:49.000000000","message":"*network (only matters if you do another patchset...)","commit_id":"df0043920d002c8ded0632312d7da75368221e19"}],"octavia/amphorae/backends/agent/api_server/templates/keepalived.conf.j2":[{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"89a0da01755dd5bfd95a941388b595694ca69708","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"start() {"},{"line_number":24,"context_line":"    echo -n $\"Starting $prog\""},{"line_number":25,"context_line":"    ip netns exec amphora-haproxy {{ keepalived_cmd }} -D -d -f {{ keepalived_cfg }}"},{"line_number":26,"context_line":"    RETVAL\u003d$?"},{"line_number":27,"context_line":"    echo"},{"line_number":28,"context_line":"    [ $RETVAL -eq 0 ] \u0026\u0026 touch {{ keepalived_pid }}"}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"ba0121b8_f4ac638e","line":25,"range":{"start_line":25,"start_character":26,"end_line":25,"end_character":33},"updated":"2016-04-03 04:19:09.000000000","message":"consider tempting that with the constant defined","commit_id":"55f94e9a758205da092a7ef083c25532ec0929ea"}],"octavia/amphorae/backends/agent/api_server/templates/sysvinit.conf.j2":[{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"cb01b89960f9c7c795d50783f577e7890e1b601f","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"haproxy_stop()"},{"line_number":63,"context_line":"{"},{"line_number":64,"context_line":"    ip netns delete amphora-haproxy || true"},{"line_number":65,"context_line":"    if [ ! -f $PIDFILE ] ; then"},{"line_number":66,"context_line":"        # This is a success according to LSB"},{"line_number":67,"context_line":"        return 0"}],"source_content_type":"text/x-jinja2","patch_set":2,"id":"ba0121b8_b89e8a60","line":64,"updated":"2016-04-01 13:34:38.000000000","message":"mmh since all haproxy run in the same NS wouldn\u0027t that kill other listeners?","commit_id":"1c3d95a81027e8df07fd0d9b207084202414f850"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"b45260ef4889bc84e9786508a642517657016359","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"haproxy_stop()"},{"line_number":63,"context_line":"{"},{"line_number":64,"context_line":"    ip netns delete amphora-haproxy || true"},{"line_number":65,"context_line":"    if [ ! -f $PIDFILE ] ; then"},{"line_number":66,"context_line":"        # This is a success according to LSB"},{"line_number":67,"context_line":"        return 0"}],"source_content_type":"text/x-jinja2","patch_set":2,"id":"ba0121b8_c5842f5f","line":64,"in_reply_to":"ba0121b8_b89e8a60","updated":"2016-04-01 15:49:52.000000000","message":"Yes, good point.  I keep thinking we have reverted that crazy multi-process decision.","commit_id":"1c3d95a81027e8df07fd0d9b207084202414f850"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"fc8e1ba9d4fe0fd583dadc14ef4b1bac08bf80a7","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"haproxy_stop()"},{"line_number":63,"context_line":"{"},{"line_number":64,"context_line":"    ip netns delete amphora-haproxy || true"},{"line_number":65,"context_line":"    if [ ! -f $PIDFILE ] ; then"},{"line_number":66,"context_line":"        # This is a success according to LSB"},{"line_number":67,"context_line":"        return 0"}],"source_content_type":"text/x-jinja2","patch_set":2,"id":"ba0121b8_651a83c7","line":64,"in_reply_to":"ba0121b8_c5842f5f","updated":"2016-04-01 15:58:08.000000000","message":"sbalukoff reverted his stance on that but changing it away from the one haproxy per listener should be done in a different patch.","commit_id":"1c3d95a81027e8df07fd0d9b207084202414f850"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"89a0da01755dd5bfd95a941388b595694ca69708","unresolved":false,"context_lines":[{"line_number":46,"context_line":"[ -f /etc/default/rcS ] \u0026\u0026 . /etc/default/rcS"},{"line_number":47,"context_line":". /lib/lsb/init-functions"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"HAPROXY\u003d\"ip netns exec amphora-haproxy $HAPROXY\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"haproxy_start()"},{"line_number":52,"context_line":"{"}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"ba0121b8_d4a95f7d","line":49,"range":{"start_line":49,"start_character":23,"end_line":49,"end_character":30},"updated":"2016-04-03 04:19:09.000000000","message":"template that with the constant (in case of renames)","commit_id":"55f94e9a758205da092a7ef083c25532ec0929ea"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"89a0da01755dd5bfd95a941388b595694ca69708","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"haproxy_start()"},{"line_number":52,"context_line":"{"},{"line_number":53,"context_line":"    ip netns add amphora-haproxy || true"},{"line_number":54,"context_line":"    xargs -I{} -d\"\\n\" -a /var/lib/octavia/plugged_interfaces ip netns set {} netns amphora-haproxy || true"},{"line_number":55,"context_line":"    ip netns exec amphora-haproxy ifup -a || true"},{"line_number":56,"context_line":"    start-stop-daemon --start --pidfile \"$PIDFILE\" \\"}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"ba0121b8_34b53bd0","line":53,"range":{"start_line":53,"start_character":17,"end_line":53,"end_character":24},"updated":"2016-04-03 04:19:09.000000000","message":"template","commit_id":"55f94e9a758205da092a7ef083c25532ec0929ea"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"89a0da01755dd5bfd95a941388b595694ca69708","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"haproxy_stop()"},{"line_number":63,"context_line":"{"},{"line_number":64,"context_line":"    ip netns delete amphora-haproxy || true"},{"line_number":65,"context_line":"    if [ ! -f $PIDFILE ] ; then"},{"line_number":66,"context_line":"        # This is a success according to LSB"},{"line_number":67,"context_line":"        return 0"}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"ba0121b8_14bab7c0","line":64,"range":{"start_line":64,"start_character":13,"end_line":64,"end_character":19},"updated":"2016-04-03 04:19:09.000000000","message":"other listeners?","commit_id":"55f94e9a758205da092a7ef083c25532ec0929ea"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"6685453dd4ce19e63c9f7a35c339b1120361054f","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"haproxy_stop()"},{"line_number":63,"context_line":"{"},{"line_number":64,"context_line":"    ip netns delete amphora-haproxy || true"},{"line_number":65,"context_line":"    if [ ! -f $PIDFILE ] ; then"},{"line_number":66,"context_line":"        # This is a success according to LSB"},{"line_number":67,"context_line":"        return 0"}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"ba0121b8_e7e67743","line":64,"range":{"start_line":64,"start_character":13,"end_line":64,"end_character":19},"in_reply_to":"ba0121b8_14bab7c0","updated":"2016-04-03 07:10:04.000000000","message":"Good point. Should be removed in the next patch.\n\nI think we should not delete the namespace whatsoever the case because of multiple listeners possibility. I don\u0027t see any harm in having the stale namespace there even after all listeners are deleted because the next new one would need the NS again anyway.","commit_id":"55f94e9a758205da092a7ef083c25532ec0929ea"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"de046b2da0eebb7bdcf6341261bcac1ab00bca3f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"haproxy_start()"},{"line_number":52,"context_line":"{"},{"line_number":53,"context_line":"    ip netns add {{ amphora_nsname }} || true"},{"line_number":54,"context_line":"    xargs -I{} -d\"\\n\" -a /var/lib/octavia/plugged_interfaces ip netns set {} netns amphora-haproxy || true"},{"line_number":55,"context_line":"    ip netns exec amphora-haproxy ifup -a || true"},{"line_number":56,"context_line":"    start-stop-daemon --start --pidfile \"$PIDFILE\" \\"},{"line_number":57,"context_line":"        --exec $HAPROXY -- -f \"$CONFIG\" -D -p \"$PIDFILE\" \\"}],"source_content_type":"text/x-jinja2","patch_set":5,"id":"ba0121b8_c7ba530a","line":54,"range":{"start_line":54,"start_character":83,"end_line":54,"end_character":98},"updated":"2016-04-03 07:16:26.000000000","message":"Ahh.. I changed these on a different local branch. Next patch should be updated.","commit_id":"cbcc4b763e621db8d7b88fd19cb09c0475908e96"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"de046b2da0eebb7bdcf6341261bcac1ab00bca3f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"{"},{"line_number":53,"context_line":"    ip netns add {{ amphora_nsname }} || true"},{"line_number":54,"context_line":"    xargs -I{} -d\"\\n\" -a /var/lib/octavia/plugged_interfaces ip netns set {} netns amphora-haproxy || true"},{"line_number":55,"context_line":"    ip netns exec amphora-haproxy ifup -a || true"},{"line_number":56,"context_line":"    start-stop-daemon --start --pidfile \"$PIDFILE\" \\"},{"line_number":57,"context_line":"        --exec $HAPROXY -- -f \"$CONFIG\" -D -p \"$PIDFILE\" \\"},{"line_number":58,"context_line":"        $EXTRAOPTS || return 2"}],"source_content_type":"text/x-jinja2","patch_set":5,"id":"ba0121b8_2736afb4","line":55,"range":{"start_line":55,"start_character":18,"end_line":55,"end_character":33},"updated":"2016-04-03 07:16:26.000000000","message":"Likewise.","commit_id":"cbcc4b763e621db8d7b88fd19cb09c0475908e96"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"2a3f0bdc43677ef0ab0eef78252accc0c2e63340","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    # interfaces"},{"line_number":57,"context_line":"    sort -k 1 /var/lib/octavia/plugged_interfaces \u003e /var/lib/octavia/plugged_interfaces.sorted"},{"line_number":58,"context_line":"    # Assign the interfaces into the namespace with the appropriate name"},{"line_number":59,"context_line":"    ip link | awk \u0027{getline n; print $0,n}\u0027 | awk \u0027{sub(\":\",\"\",$2)} {print $17 \" \" $2}\u0027 | sort -k 1 | join -j 1 - /var/lib/octavia/plugged_interfaces.sorted | awk \u0027{system(\"ip link set \"$2\" netns {{ amphora_nsname }} name \"$3\"\")}\u0027"},{"line_number":60,"context_line":"    # Bring up all of the namespace interfaces"},{"line_number":61,"context_line":"    ip netns exec {{ amphora_nsname }} ifup -a || true"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":12,"id":"9a061dce_85084093","line":59,"updated":"2016-04-08 22:47:58.000000000","message":"what a line!","commit_id":"43afcc70bfad51e60898611a08f2ac4a48176424"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"762b4386c1d78573ead0ec32f1ddbe9103b8e599","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    # Re-add the namespace"},{"line_number":54,"context_line":"    ip netns add {{ amphora_nsname }} || true"},{"line_number":55,"context_line":"    # We need the plugged_interfaces file sorted to join with the host"},{"line_number":56,"context_line":"    # interfaces"},{"line_number":57,"context_line":"    sort -k 1 /var/lib/octavia/plugged_interfaces \u003e /var/lib/octavia/plugged_interfaces.sorted"},{"line_number":58,"context_line":"    # Assign the interfaces into the namespace with the appropriate name"},{"line_number":59,"context_line":"    ip link | awk \u0027{getline n; print $0,n}\u0027 | awk \u0027{sub(\":\",\"\",$2)} {print $17 \" \" $2}\u0027 | sort -k 1 | join -j 1 - /var/lib/octavia/plugged_interfaces.sorted | awk \u0027{system(\"ip link set \"$2\" netns {{ amphora_nsname }} name \"$3\"\")}\u0027"}],"source_content_type":"text/x-jinja2","patch_set":13,"id":"5a18252c_37b766f6","line":56,"updated":"2016-04-14 17:01:49.000000000","message":"This probably doesn\u0027t need to be a two-line comment :P (again, only matters if you do another patchset)","commit_id":"df0043920d002c8ded0632312d7da75368221e19"}],"octavia/amphorae/backends/agent/api_server/templates/upstart.conf.j2":[{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"cb01b89960f9c7c795d50783f577e7890e1b601f","unresolved":false,"context_lines":[{"line_number":37,"context_line":"end script"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"post-stop script"},{"line_number":40,"context_line":"    ip netns delete amphora-haproxy || true"},{"line_number":41,"context_line":"end script"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"script"}],"source_content_type":"text/x-jinja2","patch_set":2,"id":"ba0121b8_b8acca8c","line":40,"range":{"start_line":40,"start_character":13,"end_line":40,"end_character":19},"updated":"2016-04-01 13:34:38.000000000","message":"what about other listeners?","commit_id":"1c3d95a81027e8df07fd0d9b207084202414f850"}],"octavia/amphorae/backends/agent/api_server/util.py":[{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"de046b2da0eebb7bdcf6341261bcac1ab00bca3f","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"def netns_interfaces_dir():"},{"line_number":114,"context_line":"    return CONF.amphora_agent.agent_server_network_dir"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def get_network_interface_file(interface):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_6740a708","line":114,"range":{"start_line":114,"start_character":4,"end_line":114,"end_character":54},"updated":"2016-04-03 07:16:26.000000000","message":"This method should be updated to check if agent_server_network_file is defined.","commit_id":"cbcc4b763e621db8d7b88fd19cb09c0475908e96"}],"octavia/tests/functional/amphorae/backend/agent/api_server/test_server.py":[{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"762b4386c1d78573ead0ec32f1ddbe9103b8e599","unresolved":false,"context_lines":[{"line_number":485,"context_line":"        netns_handle \u003d mock_netns.return_value.__enter__.return_value"},{"line_number":486,"context_line":"        netns_handle.get_links.return_value \u003d [0] * test_int_num"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"        test_int_num \u003d str(test_int_num)"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"        # No interface at all"},{"line_number":491,"context_line":"        mock_interfaces.side_effect \u003d [[]]"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a18252c_172d0afe","line":488,"updated":"2016-04-14 17:01:49.000000000","message":"Only a little bit misleading. :P","commit_id":"df0043920d002c8ded0632312d7da75368221e19"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"762b4386c1d78573ead0ec32f1ddbe9103b8e599","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                                      {netifaces.AF_LINK: [{\u0027addr\u0027: \u0027123\u0027}]}]"},{"line_number":514,"context_line":"        m \u003d mock.mock_open()"},{"line_number":515,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m), mock.patch("},{"line_number":516,"context_line":"                \u0027os.open\u0027) as m_open, mock.patch(\u0027os.fdopen\u0027) as m_fdopen:"},{"line_number":517,"context_line":"            m_open.return_value \u003d 123"},{"line_number":518,"context_line":"            rv \u003d self.app.post(\u0027/\u0027 + api_server.VERSION + \"/plug/network\","},{"line_number":519,"context_line":"                               content_type\u003d\u0027application/json\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a18252c_776c3e35","line":516,"updated":"2016-04-14 17:01:49.000000000","message":"We don\u0027t do this anymore -- see Min\u0027s changes to fix mock-open patches.","commit_id":"df0043920d002c8ded0632312d7da75368221e19"}],"octavia/tests/functional/amphorae/backend/agent/api_server/test_server_sysvinit.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"b45260ef4889bc84e9786508a642517657016359","unresolved":false,"context_lines":[{"line_number":520,"context_line":"                \u0027/etc/netns/amphora-haproxy/network/interfaces.d/blah.cfg\u0027,"},{"line_number":521,"context_line":"                \u0027w\u0027)"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"            plug_inf_file \u003d \u0027/var/lib/octavia/plugged_interfaces\u0027"},{"line_number":524,"context_line":"            flags \u003d os.O_RDWR | os.O_CREAT"},{"line_number":525,"context_line":"            mode \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH"},{"line_number":526,"context_line":"            m_open.assert_called_with(plug_inf_file, flags, mode)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_45449f48","line":523,"updated":"2016-04-01 15:49:52.000000000","message":"We should use the constant here too","commit_id":"1c3d95a81027e8df07fd0d9b207084202414f850"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"b45260ef4889bc84e9786508a642517657016359","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                \u0027/etc/netns/amphora-haproxy/network/interfaces.d/blah.cfg\u0027,"},{"line_number":612,"context_line":"                \u0027w\u0027)"},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"            plug_inf_file \u003d \u0027/var/lib/octavia/plugged_interfaces\u0027"},{"line_number":615,"context_line":"            flags \u003d os.O_RDWR | os.O_CREAT"},{"line_number":616,"context_line":"            mode \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH"},{"line_number":617,"context_line":"            m_open.assert_called_with(plug_inf_file, flags, mode)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_253febb4","line":614,"updated":"2016-04-01 15:49:52.000000000","message":"Same, constant for path","commit_id":"1c3d95a81027e8df07fd0d9b207084202414f850"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"762b4386c1d78573ead0ec32f1ddbe9103b8e599","unresolved":false,"context_lines":[{"line_number":655,"context_line":"                7, \u0027test\u0027, RANDOM_ERROR), subprocess.CalledProcessError("},{"line_number":656,"context_line":"                7, \u0027test\u0027, RANDOM_ERROR)]"},{"line_number":657,"context_line":"        m \u003d mock.mock_open()"},{"line_number":658,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m), mock.patch("},{"line_number":659,"context_line":"                \u0027os.open\u0027), mock.patch(\u0027os.fdopen\u0027):"},{"line_number":660,"context_line":"            rv \u003d self.app.post(\u0027/\u0027 + api_server.VERSION +"},{"line_number":661,"context_line":"                               \"/plug/vip/203.0.113.2\","}],"source_content_type":"text/x-python","patch_set":13,"id":"5a18252c_dae57738","line":658,"updated":"2016-04-14 17:01:49.000000000","message":"Another of the mock-open issue.","commit_id":"df0043920d002c8ded0632312d7da75368221e19"}]}
