)]}'
{"etc/nova/rootwrap.d/baremetal_compute.filters":[{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"5476a30c71f7bf99d37ad37df53faed81f03edb8","unresolved":false,"context_lines":[{"line_number":6,"context_line":"tgtadm: CommandFilter, /usr/sbin/tgtadm, root"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"# nova/nova/utils.py: \u0027cat\u0027, file_path, run_as_root\u003dTrue"},{"line_number":9,"context_line":"cat: CommandFilter, /bin/cat, root"}],"source_content_type":"application/octet-stream","patch_set":40,"id":"AAAAMX%2F%2F2sc%3D","line":9,"updated":"2012-12-12 14:42:55.000000000","message":"You should use the ReadFileFilter here instead (it filters much more effectively and you don\u0027t need full cat access):\nread_initiator: ReadFileFilter, /etc/iscsi/initiatorname.iscsi","commit_id":"e2468181e758aba5fde53be2f05682ad8dfcb36e"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"e55f7e549a5276f7e2418a2567cc4ca78feaca87","unresolved":false,"context_lines":[{"line_number":6,"context_line":"tgtadm: CommandFilter, /usr/sbin/tgtadm, root"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"# nova/nova/utils.py: \u0027cat\u0027, file_path, run_as_root\u003dTrue"},{"line_number":9,"context_line":"cat: CommandFilter, /bin/cat, root"}],"source_content_type":"application/octet-stream","patch_set":40,"id":"AAAAMX%2F%2F2e0%3D","line":9,"in_reply_to":"AAAAMX%2F%2F2h8%3D","updated":"2012-12-12 17:21:35.000000000","message":"Depends on how you want to deploy it. Currently we deploy compute.filters on all compute nodes, without distinguishing between Xen and KVM and... So yes, merging this with compute.filters might just be one good way to do it. Otherwise you\u0027ll have to specifically tell deployers they need baremetal_compute.filters in addition to compute.filters for baremetal compute nodes... which might be confusing since that\u0027s the only virt driver requiring that.","commit_id":"e2468181e758aba5fde53be2f05682ad8dfcb36e"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"693524d5425ff03cdf0edcfd95d6e534a567cd98","unresolved":false,"context_lines":[{"line_number":6,"context_line":"tgtadm: CommandFilter, /usr/sbin/tgtadm, root"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"# nova/nova/utils.py: \u0027cat\u0027, file_path, run_as_root\u003dTrue"},{"line_number":9,"context_line":"cat: CommandFilter, /bin/cat, root"}],"source_content_type":"application/octet-stream","patch_set":40,"id":"AAAAMX%2F%2F2h8%3D","line":9,"in_reply_to":"AAAAMX%2F%2F2sc%3D","updated":"2012-12-12 17:02:49.000000000","message":"\"read_initiator\" filter is needed by virt/libvirt/utils.py. And compute.filters already has \"read_initiator\" filter. So, I wonder if we should simply delete \"cat\" filter from this file. Or, Should we move \"tgtadm\" filter to compute.filters and delete this file?","commit_id":"e2468181e758aba5fde53be2f05682ad8dfcb36e"}],"nova/tests/baremetal/test_driver.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"e1b15ed11d6c777c8a7f3c5d6620f10a6397656c","unresolved":false,"context_lines":[{"line_number":93,"context_line":"class BaremetalDriverSpawnTestCase(test.TestCase):"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def setUp(self):"},{"line_number":96,"context_line":"        self.flags(**COMMON_FLAGS)"},{"line_number":97,"context_line":"        base._reset_bmdb()"},{"line_number":98,"context_line":"        super(BaremetalDriverSpawnTestCase, self).setUp()"},{"line_number":99,"context_line":"        fake_image.stub_out_image_service(self.stubs)"}],"source_content_type":"text/x-python","patch_set":40,"id":"AAAAMX%2F%2F2x8%3D","line":96,"updated":"2012-12-12 13:31:14.000000000","message":"this should be self.conf now, no?","commit_id":"e2468181e758aba5fde53be2f05682ad8dfcb36e"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"693524d5425ff03cdf0edcfd95d6e534a567cd98","unresolved":false,"context_lines":[{"line_number":93,"context_line":"class BaremetalDriverSpawnTestCase(test.TestCase):"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def setUp(self):"},{"line_number":96,"context_line":"        self.flags(**COMMON_FLAGS)"},{"line_number":97,"context_line":"        base._reset_bmdb()"},{"line_number":98,"context_line":"        super(BaremetalDriverSpawnTestCase, self).setUp()"},{"line_number":99,"context_line":"        fake_image.stub_out_image_service(self.stubs)"}],"source_content_type":"text/x-python","patch_set":40,"id":"AAAAMX%2F%2F2is%3D","line":96,"in_reply_to":"AAAAMX%2F%2F2x8%3D","updated":"2012-12-12 17:02:49.000000000","message":"I rebased and tried it, but got an error (\"object has no attribute \u0027conf\u0027\"). It seems this \"flags\" is still not replaced to \"conf\".","commit_id":"e2468181e758aba5fde53be2f05682ad8dfcb36e"}],"nova/virt/baremetal/__init__.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d6461d9b348eae6537d19f9685da82dae5cc8f81","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from nova.virt.baremetal.driver import BareMetalDriver"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1u4%3D","line":18,"updated":"2012-11-20 17:19:25.000000000","message":"Hmm, I don\u0027t think this is in line with the convention of other drivers. Your test_driver code doesn\u0027t seem to need it. Why is this here?","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"}],"nova/virt/baremetal/driver.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"0ff86ed4d9eaf8e8821ab5d45a077376cde8fc05","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    return node"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"def _find_suitable_baremetal_node(context, instance):"},{"line_number":96,"context_line":"    result \u003d None"},{"line_number":97,"context_line":"    for node in _get_baremetal_nodes(context):"},{"line_number":98,"context_line":"        if node[\u0027instance_uuid\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2Fr9s%3D","line":95,"updated":"2012-08-20 19:24:30.000000000","message":"I think this function should be replaced with a database query, something like:\n\nresult \u003d model_query(context, models.BareMetalNode,\n    read_deleted\u003d\"no\", session\u003dsession).\\\n    filter_by(instance_uuid \u003d None).\\\n    filter_by(registration_status \u003d \u0027done\u0027).\\\n    filter_by(cpus \u003e\u003d instance[\u0027vcpus\u0027]).\\\n    filter_by(memory_mb \u003e\u003d instance[\u0027memory_mb\u0027])\\.\n    order_by(cpus).\\\n    order_by(memory_mb).\\\n    first()\n\nA matching index should also be created on the bare_metal_node table, which looks like it would be:\n\n(deleted, registration_status, instance_uuid, cpus, memory_mb)","commit_id":"09dcb82c3c8533841112958b01c619236fb8e53f"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"0ff86ed4d9eaf8e8821ab5d45a077376cde8fc05","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        l \u003d []"},{"line_number":178,"context_line":"        ctx \u003d nova_context.get_admin_context()"},{"line_number":179,"context_line":"        for node in _get_baremetal_nodes(ctx):"},{"line_number":180,"context_line":"            if node[\u0027instance_uuid\u0027]:"},{"line_number":181,"context_line":"                inst \u003d db.instance_get_by_uuid(ctx, node[\u0027instance_uuid\u0027])"},{"line_number":182,"context_line":"                if inst:"},{"line_number":183,"context_line":"                    l.append(inst[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2Fr7c%3D","line":180,"updated":"2012-08-20 19:24:30.000000000","message":"Instead of reading the whole table and checking for node[\u0027instance_uuid\u0027] here, this criteria should be sent to the database. This requires adding a function to baremetal/db/sqlalchemy/api.py:\n\ndef bm_node_get_instantiated(context, session\u003dNone):\n  result \u003d model_query(context, models.BareMetalNode,\n    read_deleted\u003d\"no\", session\u003dsession).\\\n    filter_by(instance_uuid !\u003d None).\\\n    all()\n\n\nthen change the for loop here to:\n\nfor node in bmdb.bm_node_get_instantiated(ctx):\n   inst \u003d db.instance_get_by_uuid(ctx, node[\u0027instance_uuid\u0027])\n...","commit_id":"09dcb82c3c8533841112958b01c619236fb8e53f"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"0ff86ed4d9eaf8e8821ab5d45a077376cde8fc05","unresolved":false,"context_lines":[{"line_number":316,"context_line":"    def refresh_provider_fw_rules(self):"},{"line_number":317,"context_line":"        self._firewall_driver.refresh_provider_fw_rules()"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def _sum_baremetal_resources(self, ctxt):"},{"line_number":320,"context_line":"        vcpus \u003d 0"},{"line_number":321,"context_line":"        vcpus_used \u003d 0"},{"line_number":322,"context_line":"        memory_mb \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2Fr7A%3D","line":319,"updated":"2012-08-20 19:24:30.000000000","message":"Why is the whole table getting read back to the client here? It seems like it would be better/faster/simpler to have the database do this summation with a query like:\n\nSELECT \n  SUM(cpus) as vcpus,\n  SUM(IF(instance_uuid,cpus,0)) as vcpus_used,\n  SUM(memory_mb) as memory_mb,\n  SUM(IF(instance_uuid,memory_mb,0)) as memory_mb_used,\n  SUM(local_gb) as local_gb,\n  SUM(IF(instance_uuid,local_gb,0)) as local_gb_used\nFROM bare_metal_nodes WHERE registration_status \u003d \u0027done\u0027;\n\nThe SUM()s can be expressed in sqlalchemy like so:\n\nquery \u003d model_query(context,\n  func.sum(models.BareMetalNode.vcpus).label(\u0027vcpus\u0027),\n\n... however I\u0027m not sure how to express the SUM(IF(col, val, 0)) expressions.","commit_id":"09dcb82c3c8533841112958b01c619236fb8e53f"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"0ff86ed4d9eaf8e8821ab5d45a077376cde8fc05","unresolved":false,"context_lines":[{"line_number":343,"context_line":"               }"},{"line_number":344,"context_line":"        return dic"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def _max_baremetal_resources(self, ctxt):"},{"line_number":347,"context_line":"        max_node \u003d {\u0027cpus\u0027: 0,"},{"line_number":348,"context_line":"                    \u0027memory_mb\u0027: 0,"},{"line_number":349,"context_line":"                    \u0027local_gb\u0027: 0,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2Fr64%3D","line":346,"updated":"2012-08-20 19:24:30.000000000","message":"Again, why is this not happening with a simple query to the database? See my comment on _sum_baremetal_resources.","commit_id":"09dcb82c3c8533841112958b01c619236fb8e53f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5d13a5ea44187ddc0da7172e41ad5077d8733558","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        nodename \u003d instance.get(\u0027node\u0027)"},{"line_number":191,"context_line":"        if nodename is None:"},{"line_number":192,"context_line":"            raise NodeNotSpecified()"},{"line_number":193,"context_line":"        node_id \u003d int(nodename)"},{"line_number":194,"context_line":"        node \u003d bmdb.bm_node_get(context, node_id)"},{"line_number":195,"context_line":"        if not node:"},{"line_number":196,"context_line":"            raise NodeNotFound(nodename\u003dint(nodename))"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAMH%2F%2F5YI%3D","line":193,"updated":"2012-11-16 17:31:55.000000000","message":"This is nit-ish, but this seems confusing to me, to call something \"nodename\" and then cast it to int so cavalierly.\n\nMaybe just:\ntry:\n    node_id \u003d int(instance.get(\u0027node\u0027))\nexcept ValueError:\n    raise NodeNotSpecified()\n\n?","commit_id":"db8225f1d74e175a161ac9db9755bdba4450f4b4"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"6672bffc5bff410ef7fcff9580d2a0f974143ce1","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        nodename \u003d instance.get(\u0027node\u0027)"},{"line_number":191,"context_line":"        if nodename is None:"},{"line_number":192,"context_line":"            raise NodeNotSpecified()"},{"line_number":193,"context_line":"        node_id \u003d int(nodename)"},{"line_number":194,"context_line":"        node \u003d bmdb.bm_node_get(context, node_id)"},{"line_number":195,"context_line":"        if not node:"},{"line_number":196,"context_line":"            raise NodeNotFound(nodename\u003dint(nodename))"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAMH%2F%2F5SU%3D","line":193,"in_reply_to":"AAAAMH%2F%2F5YI%3D","updated":"2012-11-16 19:05:54.000000000","message":"++","commit_id":"db8225f1d74e175a161ac9db9755bdba4450f4b4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5d13a5ea44187ddc0da7172e41ad5077d8733558","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        node_id \u003d int(nodename)"},{"line_number":194,"context_line":"        node \u003d bmdb.bm_node_get(context, node_id)"},{"line_number":195,"context_line":"        if not node:"},{"line_number":196,"context_line":"            raise NodeNotFound(nodename\u003dint(nodename))"},{"line_number":197,"context_line":"        if node[\u0027instance_uuid\u0027]:"},{"line_number":198,"context_line":"            raise NodeInUse(nodename\u003dnodename, instance_uuid\u003dinstance[\u0027uuid\u0027])"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAMH%2F%2F5YE%3D","line":196,"updated":"2012-11-16 17:31:55.000000000","message":"Would it not make sense to have bm_node_get() raise NodeNotFound() itself? I think that would mirror the other database apis more closely.","commit_id":"db8225f1d74e175a161ac9db9755bdba4450f4b4"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"6672bffc5bff410ef7fcff9580d2a0f974143ce1","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        node_id \u003d int(nodename)"},{"line_number":194,"context_line":"        node \u003d bmdb.bm_node_get(context, node_id)"},{"line_number":195,"context_line":"        if not node:"},{"line_number":196,"context_line":"            raise NodeNotFound(nodename\u003dint(nodename))"},{"line_number":197,"context_line":"        if node[\u0027instance_uuid\u0027]:"},{"line_number":198,"context_line":"            raise NodeInUse(nodename\u003dnodename, instance_uuid\u003dinstance[\u0027uuid\u0027])"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAMH%2F%2F5SY%3D","line":196,"in_reply_to":"AAAAMH%2F%2F5YE%3D","updated":"2012-11-16 19:05:54.000000000","message":"++","commit_id":"db8225f1d74e175a161ac9db9755bdba4450f4b4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5d13a5ea44187ddc0da7172e41ad5077d8733558","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                                   mountpoint)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"            pm.start_console()"},{"line_number":236,"context_line":"        except Exception:"},{"line_number":237,"context_line":"            _update_baremetal_state(context, node, instance,"},{"line_number":238,"context_line":"                                    baremetal_states.ERROR)"},{"line_number":239,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAMH%2F%2F5X0%3D","line":236,"updated":"2012-11-16 17:31:55.000000000","message":"Hrm. This is a pretty big block to catch Exception for :(","commit_id":"db8225f1d74e175a161ac9db9755bdba4450f4b4"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"6672bffc5bff410ef7fcff9580d2a0f974143ce1","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                                   mountpoint)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"            pm.start_console()"},{"line_number":236,"context_line":"        except Exception:"},{"line_number":237,"context_line":"            _update_baremetal_state(context, node, instance,"},{"line_number":238,"context_line":"                                    baremetal_states.ERROR)"},{"line_number":239,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAMH%2F%2F5Sg%3D","line":236,"in_reply_to":"AAAAMH%2F%2F5X0%3D","updated":"2012-11-16 19:05:54.000000000","message":"Yes, this is going to be one of the first places we refactor after this patch lands. Cleanup after a failed spawn() is not happening right now and clearly needs to.","commit_id":"db8225f1d74e175a161ac9db9755bdba4450f4b4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5d13a5ea44187ddc0da7172e41ad5077d8733558","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        node \u003d _get_baremetal_node_by_instance_uuid(instance[\u0027uuid\u0027])"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        if not node:"},{"line_number":246,"context_line":"            raise exception.InstanceNotFound(instance_id\u003dinstance[\u0027uuid\u0027])"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        ctx \u003d nova_context.get_admin_context()"},{"line_number":249,"context_line":"        pm \u003d get_power_manager(node)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAMH%2F%2F5Xo%3D","line":246,"updated":"2012-11-16 17:31:55.000000000","message":"Same argument here (and similar below) as above. Seems like get_baremetal_node_by_instance_uuid() should raise InstanceNotFound() itself, no?","commit_id":"db8225f1d74e175a161ac9db9755bdba4450f4b4"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"6672bffc5bff410ef7fcff9580d2a0f974143ce1","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        node \u003d _get_baremetal_node_by_instance_uuid(instance[\u0027uuid\u0027])"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        if not node:"},{"line_number":246,"context_line":"            raise exception.InstanceNotFound(instance_id\u003dinstance[\u0027uuid\u0027])"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        ctx \u003d nova_context.get_admin_context()"},{"line_number":249,"context_line":"        pm \u003d get_power_manager(node)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAMH%2F%2F5QM%3D","line":246,"in_reply_to":"AAAAMH%2F%2F5Xo%3D","updated":"2012-11-16 19:05:54.000000000","message":"++","commit_id":"db8225f1d74e175a161ac9db9755bdba4450f4b4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d6461d9b348eae6537d19f9685da82dae5cc8f81","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    cfg.StrOpt(\u0027baremetal_tftp_root\u0027,"},{"line_number":63,"context_line":"               default\u003d\u0027/tftpboot\u0027,"},{"line_number":64,"context_line":"               help\u003d\u0027BareMetal compute node\\\u0027s tftp root path\u0027),"},{"line_number":65,"context_line":"    ]"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1ug%3D","line":65,"updated":"2012-11-20 17:19:25.000000000","message":"I think it might be good to add a new [baremetal] config group to keep all of these separate? I think there is a general desire to avoid polluting the default namespace.","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":221,"name":"Mikyung Kang","email":"mkkang@isi.edu","username":"mkkang"},"change_message_id":"288fa96e9e13f9c47ce62bf26f618470ba9de9ef","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    cfg.StrOpt(\u0027baremetal_tftp_root\u0027,"},{"line_number":63,"context_line":"               default\u003d\u0027/tftpboot\u0027,"},{"line_number":64,"context_line":"               help\u003d\u0027BareMetal compute node\\\u0027s tftp root path\u0027),"},{"line_number":65,"context_line":"    ]"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1ns%3D","line":65,"in_reply_to":"AAAAMH%2F%2F1ug%3D","updated":"2012-11-20 19:49:20.000000000","message":"Yes, Mark also commented this bare-metal config group before.","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d6461d9b348eae6537d19f9685da82dae5cc8f81","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        return 1"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def list_instances(self):"},{"line_number":180,"context_line":"        l \u003d []"},{"line_number":181,"context_line":"        ctx \u003d nova_context.get_admin_context()"},{"line_number":182,"context_line":"        for node in _get_baremetal_nodes(ctx):"},{"line_number":183,"context_line":"            if node[\u0027instance_uuid\u0027]:"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1ts%3D","line":180,"updated":"2012-11-20 17:19:25.000000000","message":"This is a nit, but I think that instead of the one-character variable name here, calling this list \"instance_names\" would probably be clearer.","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d6461d9b348eae6537d19f9685da82dae5cc8f81","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        # TODO(deva): clean up nodename / node_id handling here"},{"line_number":193,"context_line":"        nodename \u003d instance.get(\u0027node\u0027)"},{"line_number":194,"context_line":"        if nodename is None:"},{"line_number":195,"context_line":"            # TODO(deva): move exception generation into db layer"},{"line_number":196,"context_line":"            raise NodeNotSpecified()"},{"line_number":197,"context_line":"        node_id \u003d int(nodename)"},{"line_number":198,"context_line":"        node \u003d bmdb.bm_node_get(context, node_id)"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1sA%3D","line":195,"updated":"2012-11-20 17:19:25.000000000","message":"I think these TODO items should be resolved prior to merge. The db stuff is in already, so these can be a small patch against that stuff that this patch requires.","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"30ac0f13382a0ebaba1291d57b3d67b40d20be59","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            node \u003d _get_baremetal_node_by_instance_uuid(instance[\u0027uuid\u0027])"},{"line_number":238,"context_line":"        except exception.InstanceNotFound:"},{"line_number":239,"context_line":"            # TODO(deva): refactor so that dangling files can be cleaned"},{"line_number":240,"context_line":"            #             up even after a failed boot or delete"},{"line_number":241,"context_line":"            return"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        var \u003d self.baremetal_nodes.define_vars(instance, network_info,"}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAM3%2F%2F8Y4%3D","line":240,"updated":"2012-12-19 17:29:29.000000000","message":"Should probably at least log here until the TODO is done, so we don\u0027t miss the problem.","commit_id":"b845b7c5d1682858f872a00171b7fecf673d5754"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"72e3bdac312dce9f776a4cd4d2315117af856f23","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            node \u003d _get_baremetal_node_by_instance_uuid(instance[\u0027uuid\u0027])"},{"line_number":238,"context_line":"        except exception.InstanceNotFound:"},{"line_number":239,"context_line":"            # TODO(deva): refactor so that dangling files can be cleaned"},{"line_number":240,"context_line":"            #             up even after a failed boot or delete"},{"line_number":241,"context_line":"            return"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        var \u003d self.baremetal_nodes.define_vars(instance, network_info,"}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAM3%2F%2F8Vw%3D","line":240,"in_reply_to":"AAAAM3%2F%2F8Y4%3D","updated":"2012-12-19 22:25:32.000000000","message":"Done","commit_id":"b845b7c5d1682858f872a00171b7fecf673d5754"}],"nova/virt/baremetal/pxe.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"0ff86ed4d9eaf8e8821ab5d45a077376cde8fc05","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    cfg.StrOpt(\u0027baremetal_kill_dnsmasq_path\u0027,"},{"line_number":57,"context_line":"               default\u003d\u0027bm_kill_dnsmasq\u0027,"},{"line_number":58,"context_line":"               help\u003d\u0027path to bm_kill_dnsmasq\u0027),"},{"line_number":59,"context_line":"    cfg.StrOpt(\u0027baremetal_deploy_kernel\u0027,"},{"line_number":60,"context_line":"               help\u003d\u0027kernel image ID used in deployment phase\u0027),"},{"line_number":61,"context_line":"    cfg.StrOpt(\u0027baremetal_deploy_ramdisk\u0027,"},{"line_number":62,"context_line":"               help\u003d\u0027ramdisk image ID used in deployment phase\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FrwM%3D","line":59,"updated":"2012-08-20 19:24:30.000000000","message":"This isn\u0027t necessary right now but I think we will eventually need to be able to specify the kernel and ramdisk IDs as command-line options to nova, or read them from glance image metadata.","commit_id":"09dcb82c3c8533841112958b01c619236fb8e53f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"5bcec65735bdf0e7a16fabeac663307b788df258","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    cfg.StrOpt(\u0027baremetal_kill_dnsmasq_path\u0027,"},{"line_number":57,"context_line":"               default\u003d\u0027bm_kill_dnsmasq\u0027,"},{"line_number":58,"context_line":"               help\u003d\u0027path to bm_kill_dnsmasq\u0027),"},{"line_number":59,"context_line":"    cfg.StrOpt(\u0027baremetal_deploy_kernel\u0027,"},{"line_number":60,"context_line":"               help\u003d\u0027kernel image ID used in deployment phase\u0027),"},{"line_number":61,"context_line":"    cfg.StrOpt(\u0027baremetal_deploy_ramdisk\u0027,"},{"line_number":62,"context_line":"               help\u003d\u0027ramdisk image ID used in deployment phase\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FrSY%3D","line":59,"in_reply_to":"AAAALH%2F%2FrwM%3D","updated":"2012-08-21 13:11:28.000000000","message":"A bare-metal instance use two kernels (and ramdisks), \u0027deployment kernel\u0027 and \u0027real kernel\u0027. FLAGS.baremetal_deploy_kernel is used to specify \u0027deployment kernel\u0027. It is used only to write image to bare-metal nodes\u0027 local disk in the first stage of bare-metal instance creation. At this stage, users still cannot use the instance yet. The first stage is done, bootloader switches to \u0027real kernel\u0027. At this stage, users can use the bare-metal instance. That is, baremetal_deploy_kernel/ramdisk are not visible from users. And deployment kernel/ramdisk contains almost all device drivers to work with any hardware. So, I think it is rare that baremetal_deploy_kernel/ramdisk needs to be specified by user. Of course, users can specify real kernels/ramdisks or get them from glance metadata, in the same manner as they do it with non-bare-metal instances (it is users\u0027 matter to put real kernels/ramdisks containing device drivers to Glance).","commit_id":"09dcb82c3c8533841112958b01c619236fb8e53f"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"0ff86ed4d9eaf8e8821ab5d45a077376cde8fc05","unresolved":false,"context_lines":[{"line_number":465,"context_line":"        if FLAGS.baremetal_pxe_append_iscsi_portal:"},{"line_number":466,"context_line":"            if pxe_ip:"},{"line_number":467,"context_line":"                iscsi_portal \u003d pxe_ip[\u0027server_address\u0027]"},{"line_number":468,"context_line":"        pxeconf \u003d _build_pxe_config(deployment_id, deployment_key, iscsi_iqn,"},{"line_number":469,"context_line":"            tftp_paths[0], tftp_paths[1], tftp_paths[2], tftp_paths[3],"},{"line_number":470,"context_line":"            iscsi_portal)"},{"line_number":471,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FrxE%3D","line":468,"updated":"2012-08-20 19:24:30.000000000","message":"Please make this function call easier to read by using keyword arguments.","commit_id":"09dcb82c3c8533841112958b01c619236fb8e53f"}],"nova/virt/baremetal/tilera.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d6461d9b348eae6537d19f9685da82dae5cc8f81","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    cfg.StrOpt(\u0027tile_monitor\u0027,"},{"line_number":43,"context_line":"               default\u003d\u0027/usr/local/TileraMDE/bin/tile-monitor\u0027,"},{"line_number":44,"context_line":"               help\u003d\u0027Tilera command line program for Bare-metal driver\u0027),"},{"line_number":45,"context_line":"            ]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"CONF.register_opts(tilera_opts)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1tE%3D","line":45,"updated":"2012-11-20 17:19:25.000000000","message":"Could/should this go in the baremetal config group as well?","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":221,"name":"Mikyung Kang","email":"mkkang@isi.edu","username":"mkkang"},"change_message_id":"288fa96e9e13f9c47ce62bf26f618470ba9de9ef","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    cfg.StrOpt(\u0027tile_monitor\u0027,"},{"line_number":43,"context_line":"               default\u003d\u0027/usr/local/TileraMDE/bin/tile-monitor\u0027,"},{"line_number":44,"context_line":"               help\u003d\u0027Tilera command line program for Bare-metal driver\u0027),"},{"line_number":45,"context_line":"            ]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"CONF.register_opts(tilera_opts)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1n8%3D","line":45,"in_reply_to":"AAAAMH%2F%2F1tE%3D","updated":"2012-11-20 19:49:20.000000000","message":"This will be moved when new [baremetal] config group is set.","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d6461d9b348eae6537d19f9685da82dae5cc8f81","unresolved":false,"context_lines":[{"line_number":224,"context_line":"               \"/usr/sbin/sshd - --wait --quit\")"},{"line_number":225,"context_line":"        LOG.debug(\"cmd\u003d%s\", cmd)"},{"line_number":226,"context_line":"        subprocess.Popen(cmd, shell\u003dTrue)"},{"line_number":227,"context_line":"        time.sleep(5)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _iptables_set(self, var, node_ip, user_data):"},{"line_number":230,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1s8%3D","line":227,"updated":"2012-11-20 17:19:25.000000000","message":"This is a delay for what, time to let the sshd be spawned and start running? AIUI, this blocks nova-compute for five seconds, keeping it from doing anything else, right? I don\u0027t think that is okay...\n\nSince you\u0027re not stashing the result of the Popen, will we leak pipes or unreaped children? I\u0027m not sure if this is handled properly in python (maybe it is), but I\u0027d like to see at least a comment about why this is okay.","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cd8a837361c9e6b01d19495b746db72f0c3d5bc8","unresolved":false,"context_lines":[{"line_number":224,"context_line":"               \"/usr/sbin/sshd - --wait --quit\")"},{"line_number":225,"context_line":"        LOG.debug(\"cmd\u003d%s\", cmd)"},{"line_number":226,"context_line":"        subprocess.Popen(cmd, shell\u003dTrue)"},{"line_number":227,"context_line":"        time.sleep(5)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _iptables_set(self, var, node_ip, user_data):"},{"line_number":230,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1cg%3D","line":227,"in_reply_to":"AAAAMH%2F%2F1n4%3D","updated":"2012-11-20 20:12:08.000000000","message":"that will wait until the process exits. Is that what you want? Seems like you\u0027re starting sshd so that you can (in later execution) ask it to do something, right? If you do this, you\u0027ll block until sshd receives a connection and that closes. Is that the goal?","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":221,"name":"Mikyung Kang","email":"mkkang@isi.edu","username":"mkkang"},"change_message_id":"288fa96e9e13f9c47ce62bf26f618470ba9de9ef","unresolved":false,"context_lines":[{"line_number":224,"context_line":"               \"/usr/sbin/sshd - --wait --quit\")"},{"line_number":225,"context_line":"        LOG.debug(\"cmd\u003d%s\", cmd)"},{"line_number":226,"context_line":"        subprocess.Popen(cmd, shell\u003dTrue)"},{"line_number":227,"context_line":"        time.sleep(5)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _iptables_set(self, var, node_ip, user_data):"},{"line_number":230,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1n4%3D","line":227,"in_reply_to":"AAAAMH%2F%2F1s8%3D","updated":"2012-11-20 19:49:20.000000000","message":"How about this?\n\nproc \u003d subprocess.Popen(cmd, shell\u003dTrue)\n\nreturn_code \u003d proc.wait()","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d6461d9b348eae6537d19f9685da82dae5cc8f81","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                    \" --resume --net \" + node_ip +"},{"line_number":274,"context_line":"                    \" -- dmesg \u003e \" + log_path)"},{"line_number":275,"context_line":"        subprocess.Popen(kmsg_cmd, shell\u003dTrue)"},{"line_number":276,"context_line":"        time.sleep(5)"},{"line_number":277,"context_line":"        utils.execute(\u0027cp\u0027, log_path, console_log)"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1s4%3D","line":276,"updated":"2012-11-20 17:19:25.000000000","message":"Same thing here.","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"}],"nova/virt/baremetal/tilera_pdu.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cd8a837361c9e6b01d19495b746db72f0c3d5bc8","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        grep_cmd \u003d (\"ping -c1 \" + self._address + \" | grep Unreachable \u003e \" +"},{"line_number":60,"context_line":"                    tile_output)"},{"line_number":61,"context_line":"        subprocess.Popen(grep_cmd, shell\u003dTrue)"},{"line_number":62,"context_line":"        time.sleep(5)"},{"line_number":63,"context_line":"        file \u003d open(tile_output, \"r\")"},{"line_number":64,"context_line":"        out \u003d file.readline().find(\"Unreachable\")"},{"line_number":65,"context_line":"        utils.execute(\u0027rm\u0027, tile_output, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1cE%3D","line":62,"updated":"2012-11-20 20:12:08.000000000","message":"I think this (and all the other fork(), sleep() cases) needs to be refactored into something that completes much quicker and can be called from the driver in a more stateless fashion.","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d6461d9b348eae6537d19f9685da82dae5cc8f81","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        else:"},{"line_number":93,"context_line":"            pdu_num \u003d 2"},{"line_number":94,"context_line":"            pdu_outlet_num \u003d self._node_id"},{"line_number":95,"context_line":"        path1 \u003d \"10.0.100.\" + str(pdu_num)"},{"line_number":96,"context_line":"        utils.execute(\u0027/tftpboot/pdu_mgr\u0027, path1, str(pdu_outlet_num),"},{"line_number":97,"context_line":"                      str(mode), \u0027\u003e\u003e\u0027, \u0027pdu_output\u0027)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1sw%3D","line":95,"updated":"2012-11-20 17:19:25.000000000","message":"The 10.0.100 probably needs to be a constant (or config option).","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":221,"name":"Mikyung Kang","email":"mkkang@isi.edu","username":"mkkang"},"change_message_id":"288fa96e9e13f9c47ce62bf26f618470ba9de9ef","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        else:"},{"line_number":93,"context_line":"            pdu_num \u003d 2"},{"line_number":94,"context_line":"            pdu_outlet_num \u003d self._node_id"},{"line_number":95,"context_line":"        path1 \u003d \"10.0.100.\" + str(pdu_num)"},{"line_number":96,"context_line":"        utils.execute(\u0027/tftpboot/pdu_mgr\u0027, path1, str(pdu_outlet_num),"},{"line_number":97,"context_line":"                      str(mode), \u0027\u003e\u003e\u0027, \u0027pdu_output\u0027)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1no%3D","line":95,"in_reply_to":"AAAAMH%2F%2F1sw%3D","updated":"2012-11-20 19:49:20.000000000","message":"Right. This should be set as config option.","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d6461d9b348eae6537d19f9685da82dae5cc8f81","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        count \u003d 1"},{"line_number":101,"context_line":"        self._power_mgr(2)"},{"line_number":102,"context_line":"        self._power_mgr(3)"},{"line_number":103,"context_line":"        time.sleep(100)"},{"line_number":104,"context_line":"        while not self.is_power_on():"},{"line_number":105,"context_line":"            count +\u003d 1"},{"line_number":106,"context_line":"            if count \u003e 3:"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1so%3D","line":103,"updated":"2012-11-20 17:19:25.000000000","message":"Hrm. I\u0027ve lost track of where this is running, but I think it\u0027s called from the driver. The sleep(100) definitely seems bogus.","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cd8a837361c9e6b01d19495b746db72f0c3d5bc8","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        count \u003d 1"},{"line_number":101,"context_line":"        self._power_mgr(2)"},{"line_number":102,"context_line":"        self._power_mgr(3)"},{"line_number":103,"context_line":"        time.sleep(100)"},{"line_number":104,"context_line":"        while not self.is_power_on():"},{"line_number":105,"context_line":"            count +\u003d 1"},{"line_number":106,"context_line":"            if count \u003e 3:"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1cQ%3D","line":103,"in_reply_to":"AAAAMH%2F%2F1fY%3D","updated":"2012-11-20 20:12:08.000000000","message":"I don\u0027t think that blocking nova-compute for even three seconds is reasonable. Plus, I think this is really eight seconds, since the core of is_power_on() is a ping and a five-second wait.","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":221,"name":"Mikyung Kang","email":"mkkang@isi.edu","username":"mkkang"},"change_message_id":"288fa96e9e13f9c47ce62bf26f618470ba9de9ef","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        count \u003d 1"},{"line_number":101,"context_line":"        self._power_mgr(2)"},{"line_number":102,"context_line":"        self._power_mgr(3)"},{"line_number":103,"context_line":"        time.sleep(100)"},{"line_number":104,"context_line":"        while not self.is_power_on():"},{"line_number":105,"context_line":"            count +\u003d 1"},{"line_number":106,"context_line":"            if count \u003e 3:"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1fY%3D","line":103,"in_reply_to":"AAAAMH%2F%2F1so%3D","updated":"2012-11-20 19:49:20.000000000","message":"How about this?\n\nfor x in range(0, 30):\n    if self.is_power_on():\n        break\n    time.sleep(3)\n\nif not self.is_power_on():\n   LOG.exception(\"...\")","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d6461d9b348eae6537d19f9685da82dae5cc8f81","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                return baremetal_states.ERROR"},{"line_number":109,"context_line":"            self._power_mgr(2)"},{"line_number":110,"context_line":"            self._power_mgr(3)"},{"line_number":111,"context_line":"            time.sleep(120)"},{"line_number":112,"context_line":"        return baremetal_states.ACTIVE"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _power_off(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAMH%2F%2F1sc%3D","line":111,"updated":"2012-11-20 17:19:25.000000000","message":"This too","commit_id":"652ff67223a9dde54e620b694fb8bce51fdc22f4"}],"nova/virt/baremetal/utils.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    try:"},{"line_number":35,"context_line":"        libvirt_utils.file_delete(path)"},{"line_number":36,"context_line":"    except OSError:"},{"line_number":37,"context_line":"        LOG.exception(\"failed to unlink %s\" % path)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3V4%3D","line":37,"updated":"2012-12-11 22:36:19.000000000","message":"Other exception strings have been traslated in this driver, why not this one?","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"}],"nova/virt/baremetal/vif_driver.py":[{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"f8c7298c051a68c838e49598a95539575a6c3137","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            LOG.debug(\"pif:%s is unplugged (vif_uuid\u003d%s)\","},{"line_number":69,"context_line":"                      pif[\u0027id\u0027], mapping.get(\u0027vif_uuid\u0027))"},{"line_number":70,"context_line":"            self._after_unplug(instance, network, mapping, pif)"},{"line_number":71,"context_line":"        except exception.BMInterfaceNotFound:"},{"line_number":72,"context_line":"            LOG.warn(\"no pif for vif_uuid\u003d%s\" % mapping[\u0027vif_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAMH%2F%2FyfQ%3D","line":71,"updated":"2012-11-23 12:30:01.000000000","message":"pylint says BMInterfaceNotFound is not found in nova.exception. This should be NovaException, which is raised by bm_interface_get_by_vif_uuid().","commit_id":"db5395b86593146e2421c668c93f82da7465e8bf"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"71e0ddefef6f3168516d7daaba819f1d95293d57","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            LOG.debug(\"pif:%s is unplugged (vif_uuid\u003d%s)\","},{"line_number":69,"context_line":"                      pif[\u0027id\u0027], mapping.get(\u0027vif_uuid\u0027))"},{"line_number":70,"context_line":"            self._after_unplug(instance, network, mapping, pif)"},{"line_number":71,"context_line":"        except exception.BMInterfaceNotFound:"},{"line_number":72,"context_line":"            LOG.warn(\"no pif for vif_uuid\u003d%s\" % mapping[\u0027vif_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAMH%2F%2FwRo%3D","line":71,"in_reply_to":"AAAAMH%2F%2FyfQ%3D","updated":"2012-11-27 02:52:20.000000000","message":"Done","commit_id":"db5395b86593146e2421c668c93f82da7465e8bf"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        pass"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def plug(self, instance, vif):"},{"line_number":37,"context_line":"        LOG.debug(\"plug: instance_uuid\u003d%s vif\u003d%s\", instance[\u0027uuid\u0027], vif)"},{"line_number":38,"context_line":"        network, mapping \u003d vif"},{"line_number":39,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":40,"context_line":"        node \u003d bmdb.bm_node_get_by_instance_uuid(ctx, instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3Vs%3D","line":37,"updated":"2012-12-11 22:36:19.000000000","message":"not translated","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            if not pif[\u0027vif_uuid\u0027]:"},{"line_number":47,"context_line":"                bmdb.bm_interface_set_vif_uuid(ctx, pif[\u0027id\u0027],"},{"line_number":48,"context_line":"                                               mapping.get(\u0027vif_uuid\u0027))"},{"line_number":49,"context_line":"                LOG.debug(\"pif:%s is plugged (vif_uuid\u003d%s)\","},{"line_number":50,"context_line":"                          pif[\u0027id\u0027], mapping.get(\u0027vif_uuid\u0027))"},{"line_number":51,"context_line":"                self._after_plug(instance, network, mapping, pif)"},{"line_number":52,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3Vc%3D","line":49,"updated":"2012-12-11 22:36:19.000000000","message":"not translated","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                % (node[\u0027id\u0027], mapping[\u0027vif_uuid\u0027]))"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def unplug(self, instance, vif):"},{"line_number":62,"context_line":"        LOG.debug(\"unplug: instance_uuid\u003d%s vif\u003d%s\", instance[\u0027uuid\u0027], vif)"},{"line_number":63,"context_line":"        network, mapping \u003d vif"},{"line_number":64,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":65,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3Vo%3D","line":62,"updated":"2012-12-11 22:36:19.000000000","message":"not translated","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        try:"},{"line_number":66,"context_line":"            pif \u003d bmdb.bm_interface_get_by_vif_uuid(ctx, mapping[\u0027vif_uuid\u0027])"},{"line_number":67,"context_line":"            bmdb.bm_interface_set_vif_uuid(ctx, pif[\u0027id\u0027], None)"},{"line_number":68,"context_line":"            LOG.debug(\"pif:%s is unplugged (vif_uuid\u003d%s)\","},{"line_number":69,"context_line":"                      pif[\u0027id\u0027], mapping.get(\u0027vif_uuid\u0027))"},{"line_number":70,"context_line":"            self._after_unplug(instance, network, mapping, pif)"},{"line_number":71,"context_line":"        except exception.NovaException:"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3Vk%3D","line":68,"updated":"2012-12-11 22:36:19.000000000","message":"not translated","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                      pif[\u0027id\u0027], mapping.get(\u0027vif_uuid\u0027))"},{"line_number":70,"context_line":"            self._after_unplug(instance, network, mapping, pif)"},{"line_number":71,"context_line":"        except exception.NovaException:"},{"line_number":72,"context_line":"            LOG.warn(\"no pif for vif_uuid\u003d%s\" % mapping[\u0027vif_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3Vg%3D","line":72,"updated":"2012-12-11 22:36:19.000000000","message":"not translated","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"30ac0f13382a0ebaba1291d57b3d67b40d20be59","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        node \u003d bmdb.bm_node_get_by_instance_uuid(ctx, instance[\u0027uuid\u0027])"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # TODO(deva): optimize this database query"},{"line_number":45,"context_line":"        #             this is just searching for a free physical interface"},{"line_number":46,"context_line":"        pifs \u003d bmdb.bm_interface_get_all_by_bm_node_id(ctx, node[\u0027id\u0027])"},{"line_number":47,"context_line":"        for pif in pifs:"},{"line_number":48,"context_line":"            if not pif[\u0027vif_uuid\u0027]:"}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAM3%2F%2F8ZI%3D","line":45,"updated":"2012-12-19 17:29:29.000000000","message":"What query should we use here?","commit_id":"b845b7c5d1682858f872a00171b7fecf673d5754"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"30ac0f13382a0ebaba1291d57b3d67b40d20be59","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                return"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        # NOTE(deva): should this really be raising an exception"},{"line_number":56,"context_line":"        #             when there are no physical interfaces left?"},{"line_number":57,"context_line":"        raise exception.NovaException(_("},{"line_number":58,"context_line":"                \"Baremetal node: %(id)s has no available physical interface\""},{"line_number":59,"context_line":"                \" for virtual interface %(vif_uuid)s\")"}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAM3%2F%2F8ZA%3D","line":56,"updated":"2012-12-19 17:29:29.000000000","message":"Good question. We should resolve this.","commit_id":"b845b7c5d1682858f872a00171b7fecf673d5754"}],"nova/virt/baremetal/volume_driver.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                           run_as_root\u003dTrue)"},{"line_number":149,"context_line":"    last_tid \u003d 0"},{"line_number":150,"context_line":"    for line in out.split(\u0027\\n\u0027):"},{"line_number":151,"context_line":"        m \u003d re.search(r\u0027^Target ([0-9])+:\u0027, line)"},{"line_number":152,"context_line":"        if m:"},{"line_number":153,"context_line":"            tid \u003d int(m.group(1))"},{"line_number":154,"context_line":"            if last_tid \u003c tid:"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3VU%3D","line":151,"updated":"2012-12-11 22:36:19.000000000","message":"reason for not using the \\d class?","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                           \u0027--mode\u0027, \u0027target\u0027,"},{"line_number":162,"context_line":"                           \u0027--op\u0027, \u0027show\u0027,"},{"line_number":163,"context_line":"                           run_as_root\u003dTrue)"},{"line_number":164,"context_line":"    pattern \u003d r\u0027^Target ([0-9])+: *\u0027 + re.escape(iqn)"},{"line_number":165,"context_line":"    for line in out.split(\u0027\\n\u0027):"},{"line_number":166,"context_line":"        m \u003d re.search(pattern, line)"},{"line_number":167,"context_line":"        if m:"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3VQ%3D","line":164,"updated":"2012-12-11 22:36:19.000000000","message":"same question on \\d","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        pxe_ip \u003d bmdb.bm_pxe_ip_get_by_bm_node_id(ctx, node[\u0027id\u0027])"},{"line_number":231,"context_line":"        if not pxe_ip:"},{"line_number":232,"context_line":"            if not CONF.baremetal_use_unsafe_iscsi:"},{"line_number":233,"context_line":"                raise exception.NovaException("},{"line_number":234,"context_line":"                        \"No fixed PXE IP is associated to %s\" % instance_name)"},{"line_number":235,"context_line":"        mount_device \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":236,"context_line":"        conf \u003d self._volume_driver_method(\u0027connect_volume\u0027,"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3VM%3D","line":233,"updated":"2012-12-11 22:36:19.000000000","message":"not translated","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        conf \u003d self._volume_driver_method(\u0027connect_volume\u0027,"},{"line_number":237,"context_line":"                                          connection_info,"},{"line_number":238,"context_line":"                                          mount_device)"},{"line_number":239,"context_line":"        LOG.debug(\"conf\u003d%s\", conf)"},{"line_number":240,"context_line":"        device_path \u003d connection_info[\u0027data\u0027][\u0027device_path\u0027]"},{"line_number":241,"context_line":"        iqn \u003d _get_iqn(instance_name, mountpoint)"},{"line_number":242,"context_line":"        tid \u003d _get_next_tid()"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3VI%3D","line":239,"updated":"2012-12-11 22:36:19.000000000","message":"this debug should be more meaningful, as it seems like this will just crud up the logs. Also not translated.","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        if pxe_ip:"},{"line_number":245,"context_line":"            _allow_iscsi_tgtadm(tid, pxe_ip[\u0027address\u0027])"},{"line_number":246,"context_line":"        else:"},{"line_number":247,"context_line":"            # unsafe"},{"line_number":248,"context_line":"            _allow_iscsi_tgtadm(tid, \u0027ALL\u0027)"},{"line_number":249,"context_line":"        return True"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3VE%3D","line":247,"updated":"2012-12-11 22:36:19.000000000","message":"instead of just this scary thing, can we get a NOTE(user) about what the issue is?","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9813496914798befd597da6aa145abf3375753ad","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            if tid is not None:"},{"line_number":258,"context_line":"                _delete_iscsi_export_tgtadm(tid)"},{"line_number":259,"context_line":"            else:"},{"line_number":260,"context_line":"                LOG.warn(\"tid for %s not found\", iqn)"},{"line_number":261,"context_line":"        finally:"},{"line_number":262,"context_line":"            self._volume_driver_method(\u0027disconnect_volume\u0027,"},{"line_number":263,"context_line":"                                       connection_info,"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAMX%2F%2F3U8%3D","line":260,"updated":"2012-12-11 22:36:19.000000000","message":"not translated","commit_id":"aa1c8c99fade84effd5b1364a152dae23e7310ed"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"b2b9ad1143a9114849a46992d34adde05f835a7a","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"opts \u003d ["},{"line_number":32,"context_line":"    cfg.BoolOpt(\u0027baremetal_use_unsafe_iscsi\u0027,"},{"line_number":33,"context_line":"                 default\u003dTrue,"},{"line_number":34,"context_line":"                 help\u003d\u0027Do not set this out of dev/test environments. \u0027"},{"line_number":35,"context_line":"                      \u0027If a node does not have an fixed PXE IP address, \u0027"},{"line_number":36,"context_line":"                      \u0027volumes are exported with globally opened ACL\u0027),"}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAM3%2F%2F8c0%3D","line":33,"updated":"2012-12-19 16:56:09.000000000","message":"if this is that dangerous, shouldn\u0027t it default to False?","commit_id":"b845b7c5d1682858f872a00171b7fecf673d5754"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"30ac0f13382a0ebaba1291d57b3d67b40d20be59","unresolved":false,"context_lines":[{"line_number":50,"context_line":"def _get_baremetal_node_by_instance_name(virtapi, instance_name):"},{"line_number":51,"context_line":"    context \u003d nova_context.get_admin_context()"},{"line_number":52,"context_line":"    # TODO(deva): optimize this DB query."},{"line_number":53,"context_line":"    #             I don\u0027t think it should be _get_all"},{"line_number":54,"context_line":"    for node in bmdb.bm_node_get_all(context, service_host\u003dCONF.host):"},{"line_number":55,"context_line":"        if not node[\u0027instance_uuid\u0027]:"},{"line_number":56,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAM3%2F%2F8aI%3D","line":53,"updated":"2012-12-19 17:29:29.000000000","message":"What query should be here instead?","commit_id":"b845b7c5d1682858f872a00171b7fecf673d5754"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"30ac0f13382a0ebaba1291d57b3d67b40d20be59","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    for line in out.split(\u0027\\n\u0027):"},{"line_number":153,"context_line":"        m \u003d re.search(r\u0027^Target \\d+:\u0027, line)"},{"line_number":154,"context_line":"        if m:"},{"line_number":155,"context_line":"            tid \u003d int(m.group(1))"},{"line_number":156,"context_line":"            if last_tid \u003c tid:"},{"line_number":157,"context_line":"                last_tid \u003d tid"},{"line_number":158,"context_line":"    return last_tid + 1"}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAM3%2F%2F8Z4%3D","line":155,"updated":"2012-12-19 17:29:29.000000000","message":"m.group(1) finds the first parenthesized group, so I think you need some parentheses in the regexp for this to work.","commit_id":"b845b7c5d1682858f872a00171b7fecf673d5754"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"30ac0f13382a0ebaba1291d57b3d67b40d20be59","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    for line in out.split(\u0027\\n\u0027):"},{"line_number":168,"context_line":"        m \u003d re.search(pattern, line)"},{"line_number":169,"context_line":"        if m:"},{"line_number":170,"context_line":"            return int(m.group(1))"},{"line_number":171,"context_line":"    return None"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAM3%2F%2F8Zc%3D","line":170,"updated":"2012-12-19 17:29:29.000000000","message":"I think this also needs some parentheses in the regexp.","commit_id":"b845b7c5d1682858f872a00171b7fecf673d5754"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"30ac0f13382a0ebaba1291d57b3d67b40d20be59","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            self._initiator \u003d libvirt_utils.get_iscsi_initiator()"},{"line_number":192,"context_line":"            if not self._initiator:"},{"line_number":193,"context_line":"                LOG.warn(_(\u0027Could not determine iscsi initiator name \u0027"},{"line_number":194,"context_line":"                           \u0027for instance %s\u0027) % instance)"},{"line_number":195,"context_line":"        return {"},{"line_number":196,"context_line":"            \u0027ip\u0027: CONF.my_ip,"},{"line_number":197,"context_line":"            \u0027initiator\u0027: self._initiator,"}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAM3%2F%2F8ZY%3D","line":194,"updated":"2012-12-19 17:29:29.000000000","message":"Where is instance defined?","commit_id":"b845b7c5d1682858f872a00171b7fecf673d5754"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"30ac0f13382a0ebaba1291d57b3d67b40d20be59","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            # out of dev/test environments."},{"line_number":256,"context_line":"            # TODO(NTTdocomo): support CHAP"},{"line_number":257,"context_line":"            _allow_iscsi_tgtadm(tid, \u0027ALL\u0027)"},{"line_number":258,"context_line":"        return True"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    @exception.wrap_exception()"},{"line_number":261,"context_line":"    def detach_volume(self, connection_info, instance_name, mountpoint):"}],"source_content_type":"text/x-python","patch_set":43,"id":"AAAAM3%2F%2F8ZQ%3D","line":258,"updated":"2012-12-19 17:29:29.000000000","message":"What does the return value mean?  Is it needed?  I only see True.","commit_id":"b845b7c5d1682858f872a00171b7fecf673d5754"}]}
