)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"5231d00506f5cc26dc28d99e9f94e87153691e05","unresolved":false,"context_lines":[{"line_number":15,"context_line":"of these situation, reallocation should not perform."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"},{"line_number":18,"context_line":"Closes-Bug: #1383465"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9aa7fdbe_ef728110","line":18,"updated":"2014-10-28 22:35:20.000000000","message":"The change in this patch is needed so that it doesn\u0027t claim devices in the wrong vm_state. But the change won\u0027t fix the issue completely. A different symptom would show up: after restart, if a new VM is requested, that VM would fail because the pci device allocated for the VM might already be used by the existing VMs. This is highly possible given how devices are being allocated.\n\nThe fundamental issue of reconciling with DB during restart should be addressed. \n\nMaybe Partial-Bug is more appropriate here?","commit_id":"f05a374ef58eed7d595591b1a41bfb0ec0bca566"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"9ac4a84373c555b14525ac86d90840f63cb1aa1c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"of these situation, reallocation should not perform."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"},{"line_number":18,"context_line":"Closes-Bug: #1383465"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9aa7fdbe_f815e5e5","line":18,"in_reply_to":"9aa7fdbe_ef728110","updated":"2014-10-29 01:25:34.000000000","message":"--A different symptom would show up: after restart, if a new VM is requested, that VM --would fail because the pci device allocated for the VM might already be used by the ---existing VMs.\n\nnot exactly this scenario.  that thing is another problem. before we can do that\u0027 this is need to fix the critical bug.\n\nthen we need a list to work on:\n  a) clean up update from instance thing\n       adding a sync process from instance to pci tracker\n  b)  modify db sync :\n       when the db is available, a process sync from tracker to db is need. \n  c) maybe , make the node id is available before the update resource.\n\nthese thing need more work i can not finished it here. and  i put it to work list\nas kilo plan.","commit_id":"f05a374ef58eed7d595591b1a41bfb0ec0bca566"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"7194b534bcd97ccea861e762838961de68f26c93","unresolved":false,"context_lines":[{"line_number":15,"context_line":"of these situation, reallocation should not perform."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"},{"line_number":18,"context_line":"Closes-Bug: #1383465"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9aa7fdbe_788735d8","line":18,"in_reply_to":"9aa7fdbe_ef728110","updated":"2014-10-29 01:56:48.000000000","message":"btw, yunhong\u0027s patch fix the init problem: https://review.openstack.org/#/c/102298/","commit_id":"f05a374ef58eed7d595591b1a41bfb0ec0bca566"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"ad1140dab2521c66621d24b0d8713754ec578000","unresolved":false,"context_lines":[{"line_number":9,"context_line":"while compute service down, and some VMs might still hold PCI"},{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compoute service come back later,PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"actually some device might be removed from host, in any"},{"line_number":15,"context_line":"of these situation, reallocation should not perform."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a890539_ea4ed5c1","line":12,"updated":"2014-11-27 08:24:16.000000000","message":"does this patch fix this issue ?\nI think update_pci_for_instance() handle correctly currently. and your patch doesn\u0027t have any related to the comment message.","commit_id":"51a2de0bdafa2a07739cd0f03e6ae0bf9e858ca2"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"f117e1bc6b8126f253bfaeedf621884ec195d613","unresolved":false,"context_lines":[{"line_number":9,"context_line":"while compute service down, and some VMs might still hold PCI"},{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compoute service come back later,PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"actually some device might be removed from host, in any"},{"line_number":15,"context_line":"of these situation, reallocation should not perform."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a890539_664802cd","line":12,"in_reply_to":"5a890539_ea4ed5c1","updated":"2014-12-02 07:32:41.000000000","message":"by checking the status to avoiding \u0027multi time call allocation pci, cause \u0027BUILDING\u0027 status is the only right status to allocate devices.","commit_id":"51a2de0bdafa2a07739cd0f03e6ae0bf9e858ca2"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"ad1140dab2521c66621d24b0d8713754ec578000","unresolved":false,"context_lines":[{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"actually some device might be removed from host, in any"},{"line_number":15,"context_line":"of these situation, reallocation should not perform."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"},{"line_number":18,"context_line":"Closes-Bug: #1383465"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a890539_ca091934","line":15,"updated":"2014-11-27 08:24:16.000000000","message":"what I can see from your patch is \n1, check self.pci_devs(this is query from db) and return if it is empty.\n2, Add additional condition(vm in BUILDING states) when _allocate_instance.\n\nBTW, some typos.","commit_id":"51a2de0bdafa2a07739cd0f03e6ae0bf9e858ca2"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"f117e1bc6b8126f253bfaeedf621884ec195d613","unresolved":false,"context_lines":[{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"actually some device might be removed from host, in any"},{"line_number":15,"context_line":"of these situation, reallocation should not perform."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"},{"line_number":18,"context_line":"Closes-Bug: #1383465"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a890539_0601fe69","line":15,"in_reply_to":"5a890539_ca091934","updated":"2014-12-02 07:32:41.000000000","message":"some time pci device been removed, and reboot. but VM still reference to old devices.\nin such a situation, we should not broken  reboot, instead, we continue booting by ignore the  VM which not in the BUILDING status.","commit_id":"51a2de0bdafa2a07739cd0f03e6ae0bf9e858ca2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4aa7914d46a88510d9fa4bf7f2775c8628bac57e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"do not reserve pci devices while VM not in BUILDING"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"while compute service down, and some VMs might still hold PCI"},{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compoute service come back later,PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM which"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_2e304ce8","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":5},"updated":"2014-12-03 16:53:49.000000000","message":"s/while/While/\n\ns/service down/service is down/","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"a71acaf86eecb990b1a89ba6585bafa871f1cba3","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"do not reserve pci devices while VM not in BUILDING"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"while compute service down, and some VMs might still hold PCI"},{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compoute service come back later,PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM which"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_d6cbbf1b","line":9,"in_reply_to":"5a890539_2e304ce8","updated":"2014-12-04 09:14:53.000000000","message":"Done","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4aa7914d46a88510d9fa4bf7f2775c8628bac57e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"while compute service down, and some VMs might still hold PCI"},{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compoute service come back later,PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM which"},{"line_number":13,"context_line":"not in the \u0027BUILDING\u0027 status."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_ee6724e8","line":11,"updated":"2014-12-03 16:53:49.000000000","message":"s/if/If/\n\ns/compoute/compute/\n\ns/later,/later, /","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"a71acaf86eecb990b1a89ba6585bafa871f1cba3","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"while compute service down, and some VMs might still hold PCI"},{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compoute service come back later,PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM which"},{"line_number":13,"context_line":"not in the \u0027BUILDING\u0027 status."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_36dc03e4","line":11,"in_reply_to":"5a890539_ee6724e8","updated":"2014-12-04 09:14:53.000000000","message":"Done","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4aa7914d46a88510d9fa4bf7f2775c8628bac57e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"while compute service down, and some VMs might still hold PCI"},{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compoute service come back later,PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM which"},{"line_number":13,"context_line":"not in the \u0027BUILDING\u0027 status."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"if some device be removed from host, PCI manager should skip"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_6e9b34c9","line":12,"updated":"2014-12-03 16:53:49.000000000","message":"s/pci/of pci/\n\ns/device/devices/","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"a71acaf86eecb990b1a89ba6585bafa871f1cba3","unresolved":false,"context_lines":[{"line_number":9,"context_line":"while compute service down, and some VMs might still hold PCI"},{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compoute service come back later,PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM which"},{"line_number":13,"context_line":"not in the \u0027BUILDING\u0027 status."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"if some device be removed from host, PCI manager should skip"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_96ddb7df","line":12,"in_reply_to":"5a890539_6e9b34c9","updated":"2014-12-04 09:14:53.000000000","message":"Done","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4aa7914d46a88510d9fa4bf7f2775c8628bac57e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compoute service come back later,PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM which"},{"line_number":13,"context_line":"not in the \u0027BUILDING\u0027 status."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"if some device be removed from host, PCI manager should skip"},{"line_number":16,"context_line":"re-allocate device by checking the VM state while restarting"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_0eac70ec","line":13,"updated":"2014-12-03 16:53:49.000000000","message":"s/not/are not/","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"a71acaf86eecb990b1a89ba6585bafa871f1cba3","unresolved":false,"context_lines":[{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compoute service come back later,PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM which"},{"line_number":13,"context_line":"not in the \u0027BUILDING\u0027 status."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"if some device be removed from host, PCI manager should skip"},{"line_number":16,"context_line":"re-allocate device by checking the VM state while restarting"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_b6ef1386","line":13,"in_reply_to":"5a890539_0eac70ec","updated":"2014-12-04 09:14:53.000000000","message":"Done","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4aa7914d46a88510d9fa4bf7f2775c8628bac57e","unresolved":false,"context_lines":[{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM which"},{"line_number":13,"context_line":"not in the \u0027BUILDING\u0027 status."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"if some device be removed from host, PCI manager should skip"},{"line_number":16,"context_line":"re-allocate device by checking the VM state while restarting"},{"line_number":17,"context_line":"to avoid reboot failure."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_ee956488","line":15,"updated":"2014-12-03 16:53:49.000000000","message":"s/if/If/\n\ns/device/devices/\n\ns/be/are/","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"a71acaf86eecb990b1a89ba6585bafa871f1cba3","unresolved":false,"context_lines":[{"line_number":12,"context_line":"manager should avoid re-allocation pci device for these VM which"},{"line_number":13,"context_line":"not in the \u0027BUILDING\u0027 status."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"if some device be removed from host, PCI manager should skip"},{"line_number":16,"context_line":"re-allocate device by checking the VM state while restarting"},{"line_number":17,"context_line":"to avoid reboot failure."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_f6e51ba4","line":15,"in_reply_to":"5a890539_ee956488","updated":"2014-12-04 09:14:53.000000000","message":"Done","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4aa7914d46a88510d9fa4bf7f2775c8628bac57e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"not in the \u0027BUILDING\u0027 status."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"if some device be removed from host, PCI manager should skip"},{"line_number":16,"context_line":"re-allocate device by checking the VM state while restarting"},{"line_number":17,"context_line":"to avoid reboot failure."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_8eeea020","line":16,"updated":"2014-12-03 16:53:49.000000000","message":"s/re-allocate device/reallocating the device/","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"a71acaf86eecb990b1a89ba6585bafa871f1cba3","unresolved":false,"context_lines":[{"line_number":13,"context_line":"not in the \u0027BUILDING\u0027 status."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"if some device be removed from host, PCI manager should skip"},{"line_number":16,"context_line":"re-allocate device by checking the VM state while restarting"},{"line_number":17,"context_line":"to avoid reboot failure."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a890539_96f4d755","line":16,"in_reply_to":"5a890539_8eeea020","updated":"2014-12-04 09:14:53.000000000","message":"Done","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c17dc04a7969c891c719a697c9af8bf3c13be014","unresolved":false,"context_lines":[{"line_number":9,"context_line":"While compute service is down, and some VMs might still hold PCI"},{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compute service come back later, PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation of pci devices for these VM."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"pci device resouce should be managed via a method very like"},{"line_number":15,"context_line":"vcpu/mem. allocted device in the Claim, release them when fail"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"7ad32947_a32c244b","line":12,"updated":"2015-04-28 11:02:56.000000000","message":"So this issues is AFAICT completely solved by Ic04af76c3835a5bf63a42163d0335d6c7e26d68a (and the bug should really be marked as a duplicate of bug #1415768)\n\nWith that in mind - actually the whole paragraph should be removed as this commit does not address that any more really - by making sure that the PCI Tracker always gets initialized with devices from the DB with their states set, correctly.","commit_id":"2b3b22ebf9ab63087e787f1100d396aca9fdf09e"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"44d3c9bc6862235452427dd0f8c22a6b2a06032e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"While compute service is down, and some VMs might still hold PCI"},{"line_number":10,"context_line":"devices, in such a situation, PCI device allocation information"},{"line_number":11,"context_line":"already in the DB. if compute service come back later, PCI"},{"line_number":12,"context_line":"manager should avoid re-allocation of pci devices for these VM."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"pci device resouce should be managed via a method very like"},{"line_number":15,"context_line":"vcpu/mem. allocted device in the Claim, release them when fail"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"5ad0253b_6005e9c0","line":12,"in_reply_to":"7ad32947_a32c244b","updated":"2015-04-29 07:59:40.000000000","message":"Done","commit_id":"2b3b22ebf9ab63087e787f1100d396aca9fdf09e"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c17dc04a7969c891c719a697c9af8bf3c13be014","unresolved":false,"context_lines":[{"line_number":16,"context_line":"or instance deleted."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"},{"line_number":19,"context_line":"Closes-Bug: #1383465"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"7ad32947_405f8672","line":19,"updated":"2015-04-28 11:02:56.000000000","message":"I think this should be marked as a duplicate now as I said above.\n\nNow this patch will surely clear up some edge cases wrt resize/migration - so let\u0027s reference that instead of this bug.","commit_id":"2b3b22ebf9ab63087e787f1100d396aca9fdf09e"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"44d3c9bc6862235452427dd0f8c22a6b2a06032e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"or instance deleted."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"},{"line_number":19,"context_line":"Closes-Bug: #1383465"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"5ad0253b_60a169a9","line":19,"in_reply_to":"7ad32947_405f8672","updated":"2015-04-29 07:59:40.000000000","message":"i kind of disagree, with th patch  ved by Ic04af76c3835a5bf63a42163d0335d6c7e26d68a (and the bug should really be marked as a duplicate of bug #1415768), that does solve part of problem. \n\nwithout this patch, the update_from_instance will still try to allocated the device, then, the problem still there.  \n\nso i keep reference this bug. for resize , need more clean up, close edge case. i had a patch set for that( now need re-write/rebase).","commit_id":"2b3b22ebf9ab63087e787f1100d396aca9fdf09e"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"d5a58fef9d7045e622c2967f26df25ccd7300b29","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"resource tracker style pci resource management"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"pci device resouce should be managed via a method very like"},{"line_number":10,"context_line":"vcpu/mem. allocted device in the Claim, release them when fail"},{"line_number":11,"context_line":"or instance deleted."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"3afb71cf_27389bee","line":9,"updated":"2015-06-10 08:37:42.000000000","message":"s/resource/resource","commit_id":"d005b5dd780851e135c971b41235f7575d2e573a"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"5fec6c2c7a14aacea641c701c7c1fe671cf9a22b","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"resource tracker style pci resource management"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"pci device resouce should be managed via a method very like"},{"line_number":10,"context_line":"vcpu/mem. allocted device in the Claim, release them when fail"},{"line_number":11,"context_line":"or instance deleted."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"3a50d1a3_dc4dfb3e","line":9,"in_reply_to":"3afb71cf_27389bee","updated":"2015-07-29 06:47:00.000000000","message":"Done","commit_id":"d005b5dd780851e135c971b41235f7575d2e573a"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"d5a58fef9d7045e622c2967f26df25ccd7300b29","unresolved":false,"context_lines":[{"line_number":7,"context_line":"resource tracker style pci resource management"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"pci device resouce should be managed via a method very like"},{"line_number":10,"context_line":"vcpu/mem. allocted device in the Claim, release them when fail"},{"line_number":11,"context_line":"or instance deleted."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"3afb71cf_c72787c8","line":10,"updated":"2015-06-10 08:37:42.000000000","message":"s/allocted/allocate","commit_id":"d005b5dd780851e135c971b41235f7575d2e573a"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"5fec6c2c7a14aacea641c701c7c1fe671cf9a22b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"resource tracker style pci resource management"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"pci device resouce should be managed via a method very like"},{"line_number":10,"context_line":"vcpu/mem. allocted device in the Claim, release them when fail"},{"line_number":11,"context_line":"or instance deleted."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"3a50d1a3_fc48f72e","line":10,"in_reply_to":"3afb71cf_c72787c8","updated":"2015-07-29 06:47:00.000000000","message":"Done","commit_id":"d005b5dd780851e135c971b41235f7575d2e573a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"d8390c51acdf078633bfaa03f839205c85c57390","unresolved":false,"context_lines":[{"line_number":11,"context_line":"or instance deleted."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ia17a9f6bbaec358d244d4492798869b0e0a6a8cc"},{"line_number":14,"context_line":"Closes-Bug: #1383465"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"1a4dcd0f_10b92479","line":14,"updated":"2015-08-06 11:53:47.000000000","message":"This bug should be removed from here really - but we don\u0027t need to hold up the patch for that - if someone references back to it here - hopefully the will find this note.","commit_id":"58fbfdb9bf48fa18f2f7909b32d35340acd7e9dd"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"82562fee4e6a9ce28713ae53ebbd577868811aa1","unresolved":false,"context_lines":[{"line_number":754,"context_line":""},{"line_number":755,"context_line":"        # if it\u0027s a new or deleted instance:"},{"line_number":756,"context_line":"        if is_new_instance or is_deleted_instance:"},{"line_number":757,"context_line":"            # new instance, update compute node resource usage:"},{"line_number":758,"context_line":"            if self.pci_tracker:"},{"line_number":759,"context_line":"                self.pci_tracker.update_pci_for_instance(context,"},{"line_number":760,"context_line":"                                                         instance,"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_a55f3ce4","line":757,"updated":"2015-04-08 16:39:49.000000000","message":"it\u0027s not necessary to call it for new_instance any more. Also comments should be updated.\n\nif is_deleted_instance and self.pci_tracker:\n   self.pi_tracker.free_instance(context, instance)","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"ac81024b1db15b03a49d05e4b04f29fa57de01e8","unresolved":false,"context_lines":[{"line_number":754,"context_line":""},{"line_number":755,"context_line":"        # if it\u0027s a new or deleted instance:"},{"line_number":756,"context_line":"        if is_new_instance or is_deleted_instance:"},{"line_number":757,"context_line":"            # new instance, update compute node resource usage:"},{"line_number":758,"context_line":"            if self.pci_tracker:"},{"line_number":759,"context_line":"                self.pci_tracker.update_pci_for_instance(context,"},{"line_number":760,"context_line":"                                                         instance,"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_c3a8bd8e","line":757,"in_reply_to":"9aa53dc9_a55f3ce4","updated":"2015-04-10 02:04:12.000000000","message":"Done. keep the name for now.","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"483a3cf0674d79a516021f75c747cc1fc5fcfb74","unresolved":false,"context_lines":[{"line_number":752,"context_line":""},{"line_number":753,"context_line":"        self.stats.update_stats_for_instance(instance)"},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"        if is_deleted_instance and self.pci_tracker:"},{"line_number":756,"context_line":"            self.pci_tracker.update_pci_for_instance(context,"},{"line_number":757,"context_line":"                                                     instance,"},{"line_number":758,"context_line":"                                                     sign\u003dsign)"}],"source_content_type":"text/x-python","patch_set":24,"id":"9aa53dc9_d5b621f8","line":755,"updated":"2015-04-10 12:21:06.000000000","message":"nit: I would have inverted the logic (because we don\u0027t need to check if the instance is deleted if the pci tracker is not there), but that\u0027s fine, I don\u0027t want to bikeshed","commit_id":"79fd9928e1b4f66b4339458e05b1246bb1f68ecf"}],"nova/pci/manager.py":[{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"50a33f09205e2f01b77c153e6ec6ff135245c5bf","unresolved":false,"context_lines":[{"line_number":200,"context_line":"           --no resource change, then NO any action need to be taken."},{"line_number":201,"context_line":"            in these states, allocation information already in DB."},{"line_number":202,"context_line":"        \"\"\""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":205,"context_line":"        vm_state \u003d instance[\u0027vm_state\u0027]"},{"line_number":206,"context_line":"        task_state \u003d instance[\u0027task_state\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_03f7878d","line":203,"updated":"2014-10-29 18:41:41.000000000","message":"if len(self.pci_devs) \u003d\u003d 0:\n     log???\n     return\n\nWould adding the above line reduce the DB call further?","commit_id":"f05a374ef58eed7d595591b1a41bfb0ec0bca566"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"79a2b767982706f4eeef539c63a9b806e3d43792","unresolved":false,"context_lines":[{"line_number":200,"context_line":"           --no resource change, then NO any action need to be taken."},{"line_number":201,"context_line":"            in these states, allocation information already in DB."},{"line_number":202,"context_line":"        \"\"\""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":205,"context_line":"        vm_state \u003d instance[\u0027vm_state\u0027]"},{"line_number":206,"context_line":"        task_state \u003d instance[\u0027task_state\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_2322cb01","line":203,"in_reply_to":"9aa7fdbe_03f7878d","updated":"2014-10-29 18:43:46.000000000","message":"It would eliminate the call during the refresh, based on my reading of the code. If it wouldn\u0027t interfere with the proper operation of this during other times, then I\u0027d say it\u0027s a good additional step.","commit_id":"f05a374ef58eed7d595591b1a41bfb0ec0bca566"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"f409e53144f5ed175034ff67f017af715b24c4c7","unresolved":false,"context_lines":[{"line_number":200,"context_line":"           --no resource change, then NO any action need to be taken."},{"line_number":201,"context_line":"            in these states, allocation information already in DB."},{"line_number":202,"context_line":"        \"\"\""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        uuid \u003d instance[\u0027uuid\u0027]"},{"line_number":205,"context_line":"        vm_state \u003d instance[\u0027vm_state\u0027]"},{"line_number":206,"context_line":"        task_state \u003d instance[\u0027task_state\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8c0949_17d0be52","line":203,"in_reply_to":"9aa7fdbe_2322cb01","updated":"2014-10-30 01:04:18.000000000","message":"sound a good idea, i will test it.","commit_id":"f05a374ef58eed7d595591b1a41bfb0ec0bca566"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"5231d00506f5cc26dc28d99e9f94e87153691e05","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                self._allocate_instance(instance, devs)"},{"line_number":221,"context_line":"                self.allocations[uuid] \u003d devs"},{"line_number":222,"context_line":"        elif vm_state \u003d\u003d vm_states.BUILDING and (uuid not in self.allocations"},{"line_number":223,"context_line":"                                                 and uuid not in self.claims):"},{"line_number":224,"context_line":"            devs \u003d self._claim_instance(context, instance)"},{"line_number":225,"context_line":"            if devs:"},{"line_number":226,"context_line":"                self._allocate_instance(instance, devs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_8fd9f5f6","line":223,"updated":"2014-10-28 22:35:20.000000000","message":"if vm_state is BUILDING, then should the uuid be in allocations or claims? And if it shouldn\u0027t, it should be an error, right?","commit_id":"f05a374ef58eed7d595591b1a41bfb0ec0bca566"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"f409e53144f5ed175034ff67f017af715b24c4c7","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                self._allocate_instance(instance, devs)"},{"line_number":221,"context_line":"                self.allocations[uuid] \u003d devs"},{"line_number":222,"context_line":"        elif vm_state \u003d\u003d vm_states.BUILDING and (uuid not in self.allocations"},{"line_number":223,"context_line":"                                                 and uuid not in self.claims):"},{"line_number":224,"context_line":"            devs \u003d self._claim_instance(context, instance)"},{"line_number":225,"context_line":"            if devs:"},{"line_number":226,"context_line":"                self._allocate_instance(instance, devs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8c0949_77e2e204","line":223,"in_reply_to":"9aa7fdbe_8fd9f5f6","updated":"2014-10-30 01:04:18.000000000","message":"a better explain is : if building a long time, update from instance will execute multi time so this is need to check the claim status before do the \u0027allocation\u0027.","commit_id":"f05a374ef58eed7d595591b1a41bfb0ec0bca566"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"9ac4a84373c555b14525ac86d90840f63cb1aa1c","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                self._allocate_instance(instance, devs)"},{"line_number":221,"context_line":"                self.allocations[uuid] \u003d devs"},{"line_number":222,"context_line":"        elif vm_state \u003d\u003d vm_states.BUILDING and (uuid not in self.allocations"},{"line_number":223,"context_line":"                                                 and uuid not in self.claims):"},{"line_number":224,"context_line":"            devs \u003d self._claim_instance(context, instance)"},{"line_number":225,"context_line":"            if devs:"},{"line_number":226,"context_line":"                self._allocate_instance(instance, devs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_98705975","line":223,"in_reply_to":"9aa7fdbe_8fd9f5f6","updated":"2014-10-29 01:25:34.000000000","message":"no, because update from instance is periodic.","commit_id":"f05a374ef58eed7d595591b1a41bfb0ec0bca566"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1b163dac08c38835960101d9c63c6b736f2c1cc5","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            in these states, allocation information already in DB."},{"line_number":202,"context_line":"        \"\"\""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        # Reduce unnecessary call"},{"line_number":205,"context_line":"        if not self.pci_devs:"},{"line_number":206,"context_line":"            return"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_c33bc3e9","line":204,"updated":"2014-10-30 17:34:59.000000000","message":"I don\u0027t think this comment adds anything, so I would just remove it. I would instead change the first line of the docstring above to:\n\n Update instance\u0027s PCI usage information if devices are allocated","commit_id":"03f36d598705698fea3fe3cb6afe4542a8bb6f72"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"eac579f5d9bdd676e5744a04eea42e132c98cd8f","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            in these states, allocation information already in DB."},{"line_number":202,"context_line":"        \"\"\""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        # Reduce unnecessary call"},{"line_number":205,"context_line":"        if not self.pci_devs:"},{"line_number":206,"context_line":"            return"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_75e71e41","line":204,"in_reply_to":"7a8c0949_c33bc3e9","updated":"2014-10-31 01:53:00.000000000","message":"Done","commit_id":"03f36d598705698fea3fe3cb6afe4542a8bb6f72"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2b418068148e51891307d76cf2b261857fb0f755","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            if devs:"},{"line_number":223,"context_line":"                self._allocate_instance(instance, devs)"},{"line_number":224,"context_line":"                self.allocations[uuid] \u003d devs"},{"line_number":225,"context_line":"        elif vm_state \u003d\u003d vm_states.BUILDING and (uuid not in self.allocations"},{"line_number":226,"context_line":"                                                 and uuid not in self.claims):"},{"line_number":227,"context_line":"            devs \u003d self._claim_instance(context, instance)"},{"line_number":228,"context_line":"            if devs:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_a58889e8","line":225,"range":{"start_line":225,"start_character":13,"end_line":225,"end_character":77},"updated":"2014-11-10 09:00:55.000000000","message":"can you please write this as follows:\nelif (vm_state \u003d\u003d vm_states.BUILDING and\n          uuid not in self.allocations and\n          uuid not in self.claims):","commit_id":"730dff8c1f2e6146bbaa5888bd87bf51888ce5ad"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"ad1140dab2521c66621d24b0d8713754ec578000","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        The caller should hold the COMPUTE_RESOURCE_SEMAPHORE lock."},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        VM state in DELETED:"},{"line_number":192,"context_line":"            -- need deallocation PCI devices based on task states."},{"line_number":193,"context_line":"        VM is resizing and task_states in RESIZE_MIGRATED:"},{"line_number":194,"context_line":"            -- need deallocation PCI devices for migration."},{"line_number":195,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_55722eb1","line":192,"updated":"2014-11-27 08:24:16.000000000","message":"s/deallocation/to deallocate","commit_id":"51a2de0bdafa2a07739cd0f03e6ae0bf9e858ca2"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"f117e1bc6b8126f253bfaeedf621884ec195d613","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        The caller should hold the COMPUTE_RESOURCE_SEMAPHORE lock."},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        VM state in DELETED:"},{"line_number":192,"context_line":"            -- need deallocation PCI devices based on task states."},{"line_number":193,"context_line":"        VM is resizing and task_states in RESIZE_MIGRATED:"},{"line_number":194,"context_line":"            -- need deallocation PCI devices for migration."},{"line_number":195,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_c0627e15","line":192,"in_reply_to":"5a890539_55722eb1","updated":"2014-12-02 07:32:41.000000000","message":"Done","commit_id":"51a2de0bdafa2a07739cd0f03e6ae0bf9e858ca2"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"ad1140dab2521c66621d24b0d8713754ec578000","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        VM is resizing and task_states in RESIZE_MIGRATED:"},{"line_number":194,"context_line":"            -- need deallocation PCI devices for migration."},{"line_number":195,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"},{"line_number":196,"context_line":"            -- need allocation PCI devices for migration."},{"line_number":197,"context_line":"        VM state in BUILDING:"},{"line_number":198,"context_line":"            -- need allocation PCI devices."},{"line_number":199,"context_line":"        VM state in other state like PAUSED SUSPENDED STOPPED RESCUED:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_35468250","line":196,"updated":"2014-11-27 08:24:16.000000000","message":"need to allocate","commit_id":"51a2de0bdafa2a07739cd0f03e6ae0bf9e858ca2"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"f117e1bc6b8126f253bfaeedf621884ec195d613","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        VM is resizing and task_states in RESIZE_MIGRATED:"},{"line_number":194,"context_line":"            -- need deallocation PCI devices for migration."},{"line_number":195,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"},{"line_number":196,"context_line":"            -- need allocation PCI devices for migration."},{"line_number":197,"context_line":"        VM state in BUILDING:"},{"line_number":198,"context_line":"            -- need allocation PCI devices."},{"line_number":199,"context_line":"        VM state in other state like PAUSED SUSPENDED STOPPED RESCUED:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_006d6604","line":196,"in_reply_to":"5a890539_35468250","updated":"2014-12-02 07:32:41.000000000","message":"Done","commit_id":"51a2de0bdafa2a07739cd0f03e6ae0bf9e858ca2"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"b8db88ff9c8e1744857c0bdca3fcdc9ae8098880","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        The caller should hold the COMPUTE_RESOURCE_SEMAPHORE lock."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        VM state in DELETED:"},{"line_number":193,"context_line":"            -- need deallocate PCI devices based on task states."},{"line_number":194,"context_line":"        VM is resizing and task_states in RESIZE_MIGRATED:"},{"line_number":195,"context_line":"            -- need deallocation PCI devices for migration."},{"line_number":196,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_ec25b15c","line":193,"updated":"2014-12-02 08:48:40.000000000","message":"nit: need to deallocate\n\nps: sorry , I didn\u0027t point out all typos in previous comments.","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"574c7f0824920cb1c8f7f35632a1277501a9701a","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        The caller should hold the COMPUTE_RESOURCE_SEMAPHORE lock."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        VM state in DELETED:"},{"line_number":193,"context_line":"            -- need deallocate PCI devices based on task states."},{"line_number":194,"context_line":"        VM is resizing and task_states in RESIZE_MIGRATED:"},{"line_number":195,"context_line":"            -- need deallocation PCI devices for migration."},{"line_number":196,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_fe88d223","line":193,"in_reply_to":"5a890539_ec25b15c","updated":"2014-12-03 05:14:31.000000000","message":"Done","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"b8db88ff9c8e1744857c0bdca3fcdc9ae8098880","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        VM state in DELETED:"},{"line_number":193,"context_line":"            -- need deallocate PCI devices based on task states."},{"line_number":194,"context_line":"        VM is resizing and task_states in RESIZE_MIGRATED:"},{"line_number":195,"context_line":"            -- need deallocation PCI devices for migration."},{"line_number":196,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"},{"line_number":197,"context_line":"            -- need to allocate PCI devices for migration."},{"line_number":198,"context_line":"        VM state in BUILDING:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_cca395af","line":195,"updated":"2014-12-02 08:48:40.000000000","message":"nit: need to deallocate","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"574c7f0824920cb1c8f7f35632a1277501a9701a","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        VM state in DELETED:"},{"line_number":193,"context_line":"            -- need deallocate PCI devices based on task states."},{"line_number":194,"context_line":"        VM is resizing and task_states in RESIZE_MIGRATED:"},{"line_number":195,"context_line":"            -- need deallocation PCI devices for migration."},{"line_number":196,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"},{"line_number":197,"context_line":"            -- need to allocate PCI devices for migration."},{"line_number":198,"context_line":"        VM state in BUILDING:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_de987677","line":195,"in_reply_to":"5a890539_cca395af","updated":"2014-12-03 05:14:31.000000000","message":"Done","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"b8db88ff9c8e1744857c0bdca3fcdc9ae8098880","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"},{"line_number":197,"context_line":"            -- need to allocate PCI devices for migration."},{"line_number":198,"context_line":"        VM state in BUILDING:"},{"line_number":199,"context_line":"            -- need allocation PCI devices."},{"line_number":200,"context_line":"        VM state in other state like PAUSED SUSPENDED STOPPED RESCUED:"},{"line_number":201,"context_line":"           --no resource change, then NO any action need to be taken."},{"line_number":202,"context_line":"            in these states, allocation information already in DB."}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_8cc26d51","line":199,"updated":"2014-12-02 08:48:40.000000000","message":"nit: need to allocate","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"574c7f0824920cb1c8f7f35632a1277501a9701a","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"},{"line_number":197,"context_line":"            -- need to allocate PCI devices for migration."},{"line_number":198,"context_line":"        VM state in BUILDING:"},{"line_number":199,"context_line":"            -- need allocation PCI devices."},{"line_number":200,"context_line":"        VM state in other state like PAUSED SUSPENDED STOPPED RESCUED:"},{"line_number":201,"context_line":"           --no resource change, then NO any action need to be taken."},{"line_number":202,"context_line":"            in these states, allocation information already in DB."}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_be9baa71","line":199,"in_reply_to":"5a890539_8cc26d51","updated":"2014-12-03 05:14:31.000000000","message":"Done","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"b8db88ff9c8e1744857c0bdca3fcdc9ae8098880","unresolved":false,"context_lines":[{"line_number":197,"context_line":"            -- need to allocate PCI devices for migration."},{"line_number":198,"context_line":"        VM state in BUILDING:"},{"line_number":199,"context_line":"            -- need allocation PCI devices."},{"line_number":200,"context_line":"        VM state in other state like PAUSED SUSPENDED STOPPED RESCUED:"},{"line_number":201,"context_line":"           --no resource change, then NO any action need to be taken."},{"line_number":202,"context_line":"            in these states, allocation information already in DB."},{"line_number":203,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_0cb75df6","line":200,"updated":"2014-12-02 08:48:40.000000000","message":"s/state/states","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"574c7f0824920cb1c8f7f35632a1277501a9701a","unresolved":false,"context_lines":[{"line_number":197,"context_line":"            -- need to allocate PCI devices for migration."},{"line_number":198,"context_line":"        VM state in BUILDING:"},{"line_number":199,"context_line":"            -- need allocation PCI devices."},{"line_number":200,"context_line":"        VM state in other state like PAUSED SUSPENDED STOPPED RESCUED:"},{"line_number":201,"context_line":"           --no resource change, then NO any action need to be taken."},{"line_number":202,"context_line":"            in these states, allocation information already in DB."},{"line_number":203,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_9e926e55","line":200,"in_reply_to":"5a890539_0cb75df6","updated":"2014-12-03 05:14:31.000000000","message":"Done","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"b8db88ff9c8e1744857c0bdca3fcdc9ae8098880","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        VM state in BUILDING:"},{"line_number":199,"context_line":"            -- need allocation PCI devices."},{"line_number":200,"context_line":"        VM state in other state like PAUSED SUSPENDED STOPPED RESCUED:"},{"line_number":201,"context_line":"           --no resource change, then NO any action need to be taken."},{"line_number":202,"context_line":"            in these states, allocation information already in DB."},{"line_number":203,"context_line":"        \"\"\""},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_ecb3f107","line":201,"updated":"2014-12-02 08:48:40.000000000","message":"missing space: should be -- no, to constant with others","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"574c7f0824920cb1c8f7f35632a1277501a9701a","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        VM state in BUILDING:"},{"line_number":199,"context_line":"            -- need allocation PCI devices."},{"line_number":200,"context_line":"        VM state in other state like PAUSED SUSPENDED STOPPED RESCUED:"},{"line_number":201,"context_line":"           --no resource change, then NO any action need to be taken."},{"line_number":202,"context_line":"            in these states, allocation information already in DB."},{"line_number":203,"context_line":"        \"\"\""},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_7e95c23e","line":201,"in_reply_to":"5a890539_ecb3f107","updated":"2014-12-03 05:14:31.000000000","message":"Done","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"b8db88ff9c8e1744857c0bdca3fcdc9ae8098880","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            -- need allocation PCI devices."},{"line_number":200,"context_line":"        VM state in other state like PAUSED SUSPENDED STOPPED RESCUED:"},{"line_number":201,"context_line":"           --no resource change, then NO any action need to be taken."},{"line_number":202,"context_line":"            in these states, allocation information already in DB."},{"line_number":203,"context_line":"        \"\"\""},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        if not self.pci_devs:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_6cc70165","line":202,"updated":"2014-12-02 08:48:40.000000000","message":"is already in DB.","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"574c7f0824920cb1c8f7f35632a1277501a9701a","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            -- need allocation PCI devices."},{"line_number":200,"context_line":"        VM state in other state like PAUSED SUSPENDED STOPPED RESCUED:"},{"line_number":201,"context_line":"           --no resource change, then NO any action need to be taken."},{"line_number":202,"context_line":"            in these states, allocation information already in DB."},{"line_number":203,"context_line":"        \"\"\""},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        if not self.pci_devs:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_5ead669a","line":202,"in_reply_to":"5a890539_6cc70165","updated":"2014-12-03 05:14:31.000000000","message":"Done","commit_id":"48b387442784cf55fe3c1b644b8014dbc62087d1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4aa7914d46a88510d9fa4bf7f2775c8628bac57e","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        VM state in DELETED:"},{"line_number":193,"context_line":"            -- need to deallocate PCI devices based on task states."},{"line_number":194,"context_line":"        VM is resizing and task_states in RESIZE_MIGRATED:"},{"line_number":195,"context_line":"            -- need to deallocation PCI devices for migration."},{"line_number":196,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"},{"line_number":197,"context_line":"            -- need to allocate PCI devices for migration."},{"line_number":198,"context_line":"        VM state in BUILDING:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_4ee03826","line":195,"range":{"start_line":195,"start_character":23,"end_line":195,"end_character":35},"updated":"2014-12-03 16:53:49.000000000","message":"s/deallocation/deallocate/","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"a71acaf86eecb990b1a89ba6585bafa871f1cba3","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        VM state in DELETED:"},{"line_number":193,"context_line":"            -- need to deallocate PCI devices based on task states."},{"line_number":194,"context_line":"        VM is resizing and task_states in RESIZE_MIGRATED:"},{"line_number":195,"context_line":"            -- need to deallocation PCI devices for migration."},{"line_number":196,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"},{"line_number":197,"context_line":"            -- need to allocate PCI devices for migration."},{"line_number":198,"context_line":"        VM state in BUILDING:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_569fcf4f","line":195,"in_reply_to":"5a890539_4ee03826","updated":"2014-12-04 09:14:53.000000000","message":"Done","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4aa7914d46a88510d9fa4bf7f2775c8628bac57e","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"},{"line_number":197,"context_line":"            -- need to allocate PCI devices for migration."},{"line_number":198,"context_line":"        VM state in BUILDING:"},{"line_number":199,"context_line":"            -- need to allocation PCI devices."},{"line_number":200,"context_line":"        VM state in other states like PAUSED SUSPENDED STOPPED RESCUED:"},{"line_number":201,"context_line":"           -- no resource change, then NO any action need to be taken."},{"line_number":202,"context_line":"            in these states, allocation information is already in DB."}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_aec6fc99","line":199,"range":{"start_line":199,"start_character":23,"end_line":199,"end_character":33},"updated":"2014-12-03 16:53:49.000000000","message":"s/allocation/allocate/","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"a71acaf86eecb990b1a89ba6585bafa871f1cba3","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        VM is resizing and task_states in RESIZE_FINISH:"},{"line_number":197,"context_line":"            -- need to allocate PCI devices for migration."},{"line_number":198,"context_line":"        VM state in BUILDING:"},{"line_number":199,"context_line":"            -- need to allocation PCI devices."},{"line_number":200,"context_line":"        VM state in other states like PAUSED SUSPENDED STOPPED RESCUED:"},{"line_number":201,"context_line":"           -- no resource change, then NO any action need to be taken."},{"line_number":202,"context_line":"            in these states, allocation information is already in DB."}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_76aa0b72","line":199,"in_reply_to":"5a890539_aec6fc99","updated":"2014-12-04 09:14:53.000000000","message":"Done","commit_id":"aafdad98ae5c54590410042e3ccef6b6759779c9"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9a2f54f84899b0f55ca1e012a5faf51e3f71097e","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                    if stats_dev is not None:"},{"line_number":240,"context_line":"                        self.allocations[uuid] \u003d stats_dev"},{"line_number":241,"context_line":"                        stats_dev.status \u003d \u0027allocated\u0027"},{"line_number":242,"context_line":"                        stats_dev.obj_reset_changes()"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def update_pci_for_migration(self, context, instance, sign\u003d1):"},{"line_number":245,"context_line":"        \"\"\"Update instance\u0027s pci usage information when it is migrated."}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_6ead3d88","line":242,"updated":"2014-12-18 15:18:02.000000000","message":"instance[\u0027pci_devices\u0027] basically queries the pci device table and grabs the devices that are allocated to the instance. There are corner cases in which a device may reside on a different host but is allocated to the same instance (e.g., during migration).\n\nI don\u0027t think that this is the right way to reconcile during restart. This is doing the reconciliation implicitly. This is the reason that I suggested looking at the other existing patches on the restart issue, and come up with a sound solution.","commit_id":"e91251517cc64f29297b5a65c2493ba5a01fe8a8"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"61abfcba0090b68e7bbe865387cfca732a1fa021","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                    if stats_dev is not None:"},{"line_number":240,"context_line":"                        self.allocations[uuid] \u003d stats_dev"},{"line_number":241,"context_line":"                        stats_dev.status \u003d \u0027allocated\u0027"},{"line_number":242,"context_line":"                        stats_dev.obj_reset_changes()"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def update_pci_for_migration(self, context, instance, sign\u003d1):"},{"line_number":245,"context_line":"        \"\"\"Update instance\u0027s pci usage information when it is migrated."}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_f1573a58","line":242,"in_reply_to":"3a961159_16159c48","updated":"2014-12-19 01:51:07.000000000","message":"sorry forgot the address is local?way to fix this is defer collection back to we get the node id. thanks baoli.","commit_id":"e91251517cc64f29297b5a65c2493ba5a01fe8a8"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"61abfcba0090b68e7bbe865387cfca732a1fa021","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                    if stats_dev is not None:"},{"line_number":240,"context_line":"                        self.allocations[uuid] \u003d stats_dev"},{"line_number":241,"context_line":"                        stats_dev.status \u003d \u0027allocated\u0027"},{"line_number":242,"context_line":"                        stats_dev.obj_reset_changes()"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def update_pci_for_migration(self, context, instance, sign\u003d1):"},{"line_number":245,"context_line":"        \"\"\"Update instance\u0027s pci usage information when it is migrated."}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_c638c3a2","line":242,"in_reply_to":"3a961159_6ead3d88","updated":"2014-12-19 01:51:07.000000000","message":"Done","commit_id":"e91251517cc64f29297b5a65c2493ba5a01fe8a8"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"60176562881e0ce958cba7aad0bc24108184bdf3","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                    if stats_dev is not None:"},{"line_number":240,"context_line":"                        self.allocations[uuid] \u003d stats_dev"},{"line_number":241,"context_line":"                        stats_dev.status \u003d \u0027allocated\u0027"},{"line_number":242,"context_line":"                        stats_dev.obj_reset_changes()"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def update_pci_for_migration(self, context, instance, sign\u003d1):"},{"line_number":245,"context_line":"        \"\"\"Update instance\u0027s pci usage information when it is migrated."}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_16159c48","line":242,"in_reply_to":"3a961159_6ead3d88","updated":"2014-12-18 23:56:49.000000000","message":"such device can not match any device on this host so no side deffect , it will works .  look the remove match device.","commit_id":"e91251517cc64f29297b5a65c2493ba5a01fe8a8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"533f3cba4fc0063e6c5b0d654d82061972a4d1b7","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        else:"},{"line_number":248,"context_line":"            self._collect_backe_devices_state(instance)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def _collect_backe_devices_state(self, instance):"},{"line_number":251,"context_line":"        \"\"\"Collection back the devices status from instance\"\"\""},{"line_number":252,"context_line":"        if isinstance(instance, dict):"},{"line_number":253,"context_line":"            pci_devices \u003d instance.get(\u0027pci_devices\u0027, [])"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_27d9ed83","line":250,"updated":"2015-02-09 09:58:00.000000000","message":"backe \u003d\u003e back","commit_id":"e1f3504159f0beb24ca7f43a977459506d13a676"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"7f238870b514ddde7ae039c548c30956d6de855c","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        else:"},{"line_number":248,"context_line":"            self._collect_backe_devices_state(instance)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def _collect_backe_devices_state(self, instance):"},{"line_number":251,"context_line":"        \"\"\"Collection back the devices status from instance\"\"\""},{"line_number":252,"context_line":"        if isinstance(instance, dict):"},{"line_number":253,"context_line":"            pci_devices \u003d instance.get(\u0027pci_devices\u0027, [])"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_2d799afc","line":250,"in_reply_to":"da86d52c_27d9ed83","updated":"2015-02-10 07:27:52.000000000","message":"Done","commit_id":"e1f3504159f0beb24ca7f43a977459506d13a676"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"533f3cba4fc0063e6c5b0d654d82061972a4d1b7","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def _collect_backe_devices_state(self, instance):"},{"line_number":251,"context_line":"        \"\"\"Collection back the devices status from instance\"\"\""},{"line_number":252,"context_line":"        if isinstance(instance, dict):"},{"line_number":253,"context_line":"            pci_devices \u003d instance.get(\u0027pci_devices\u0027, [])"},{"line_number":254,"context_line":"        else:"},{"line_number":255,"context_line":"            pci_devices \u003d instance[\u0027pci_devices\u0027]"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_27c00d7c","line":252,"updated":"2015-02-09 09:58:00.000000000","message":"should this not be an instance object?","commit_id":"e1f3504159f0beb24ca7f43a977459506d13a676"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"377cc685a59b3d5bd66f7c6d1e5580cd512f5bbb","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def _collect_backe_devices_state(self, instance):"},{"line_number":251,"context_line":"        \"\"\"Collection back the devices status from instance\"\"\""},{"line_number":252,"context_line":"        if isinstance(instance, dict):"},{"line_number":253,"context_line":"            pci_devices \u003d instance.get(\u0027pci_devices\u0027, [])"},{"line_number":254,"context_line":"        else:"},{"line_number":255,"context_line":"            pci_devices \u003d instance[\u0027pci_devices\u0027]"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_bef85ac5","line":252,"in_reply_to":"da86d52c_27c00d7c","updated":"2015-02-10 03:22:13.000000000","message":"when update from migration, it\u0027s not,resource track convert it to a dict.  i wrote  several patches for resize(release soon), based on this.","commit_id":"e1f3504159f0beb24ca7f43a977459506d13a676"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"b43f13fcfb0cc27f12e176ffb8ac0c518eab9867","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            self.pci_devs \u003d []"},{"line_number":63,"context_line":"        self._initial_instance_usage()"},{"line_number":64,"context_line":"        self.defer_collection \u003d []"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _initial_instance_usage(self):"},{"line_number":67,"context_line":"        self.allocations \u003d collections.defaultdict(list)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a80dd14_ed76ef3e","line":64,"updated":"2015-03-17 00:45:18.000000000","message":"there are a couple of patches which would ultimately set the node_id correctly at start: https://review.openstack.org/#/c/148904/ (under review)\nhttps://review.openstack.org/#/c/145619/ (already merged)\n\nThere is no need of deferring any more.","commit_id":"63611be19095ad649f34d0facd92fc723736dd92"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"1b7994d2eb80846b4a4574655789fed840b45df5","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            self.pci_devs \u003d []"},{"line_number":63,"context_line":"        self._initial_instance_usage()"},{"line_number":64,"context_line":"        self.defer_collection \u003d []"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _initial_instance_usage(self):"},{"line_number":67,"context_line":"        self.allocations \u003d collections.defaultdict(list)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a80dd14_5775a1ca","line":64,"in_reply_to":"9a80dd14_28b47534","updated":"2015-03-17 17:57:42.000000000","message":"It\u0027s fine for me to remove the -1. But it doesn\u0027t seem to solve the issue completely.","commit_id":"63611be19095ad649f34d0facd92fc723736dd92"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"0c47edd06616206f4ba22627dc8b69f4d2e00136","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            self.pci_devs \u003d []"},{"line_number":63,"context_line":"        self._initial_instance_usage()"},{"line_number":64,"context_line":"        self.defer_collection \u003d []"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _initial_instance_usage(self):"},{"line_number":67,"context_line":"        self.allocations \u003d collections.defaultdict(list)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a80dd14_eabcd508","line":64,"in_reply_to":"9a80dd14_5775a1ca","updated":"2015-03-18 02:50:47.000000000","message":"refer following  inline comments. in general, this is solve this critical bug,  but not intend to solve the initialize problem , that one had another bug, another several patch now not active.(btw, i\u0027m trying to find resource to push that one.)\n\n thanks.","commit_id":"63611be19095ad649f34d0facd92fc723736dd92"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"dd4a7c4bcdd63250683a761b41d9a3dbecec3cc8","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            self.pci_devs \u003d []"},{"line_number":63,"context_line":"        self._initial_instance_usage()"},{"line_number":64,"context_line":"        self.defer_collection \u003d []"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _initial_instance_usage(self):"},{"line_number":67,"context_line":"        self.allocations \u003d collections.defaultdict(list)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a80dd14_28b47534","line":64,"in_reply_to":"9a80dd14_ed76ef3e","updated":"2015-03-17 01:10:52.000000000","message":"that\u0027s a good fix, i know, but this critical bug, should not wait that patches. do you ok with it?","commit_id":"63611be19095ad649f34d0facd92fc723736dd92"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"1b7994d2eb80846b4a4574655789fed840b45df5","unresolved":false,"context_lines":[{"line_number":212,"context_line":"            -- need to allocate PCI devices for migration."},{"line_number":213,"context_line":"        VM state in BUILDING:"},{"line_number":214,"context_line":"            -- need to allocate PCI devices."},{"line_number":215,"context_line":"        VM state in other states like PAUSED SUSPENDED STOPPED RESCUED:"},{"line_number":216,"context_line":"           -- no resource change, then NO any action need to be taken."},{"line_number":217,"context_line":"            in these states, allocation information is already in DB."},{"line_number":218,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"9a80dd14_ad8bee66","line":215,"updated":"2015-03-17 17:57:42.000000000","message":"What\u0027s said above doesn\u0027t seem to be consistent with what\u0027s being done starting from line 248","commit_id":"63611be19095ad649f34d0facd92fc723736dd92"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"9c95489a6daf3db7f8a92307b24b30a69b783585","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        vm_state \u003d instance[\u0027vm_state\u0027]"},{"line_number":225,"context_line":"        task_state \u003d instance[\u0027task_state\u0027]"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        if vm_state \u003d\u003d vm_states.DELETED:"},{"line_number":228,"context_line":"            if self.allocations.pop(uuid, None):"},{"line_number":229,"context_line":"                self._free_instance(instance)"},{"line_number":230,"context_line":"            elif self.claims.pop(uuid, None):"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a80dd14_628dae2a","line":227,"range":{"start_line":227,"start_character":11,"end_line":227,"end_character":19},"updated":"2015-03-17 00:03:41.000000000","message":"I don\u0027t tend to love these blocks of if / elifs. I tend to write things like this as:\n\n\n if vm_state \u003d\u003d vm_states.DELETED:\n     ...\n     return\n if task_state \u003d\u003d task_states.RESIZE_MIGRATED:\n     ...\n     return\n ...\n\nI think its more readable that way. However, its totally a nit, and this is consistent with the pre-existing style here.","commit_id":"63611be19095ad649f34d0facd92fc723736dd92"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"1b7994d2eb80846b4a4574655789fed840b45df5","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                self._allocate_instance(instance, devs)"},{"line_number":247,"context_line":"                self.allocations[uuid] \u003d devs"},{"line_number":248,"context_line":"        else:"},{"line_number":249,"context_line":"            self._collect_back_devices_state(instance)"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def _collect_back_devices_state(self, instance):"},{"line_number":252,"context_line":"        \"\"\"Collection back the devices status from instance\"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"9a80dd14_6dd81680","line":249,"updated":"2015-03-17 17:57:42.000000000","message":"Comments is needed to describe what\u0027s being done in here.\n\nIf this is used for restart case, please indicate the VM\u0027s state, etc. , for this to be working.","commit_id":"63611be19095ad649f34d0facd92fc723736dd92"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"1b7994d2eb80846b4a4574655789fed840b45df5","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        if pci_devices:"},{"line_number":258,"context_line":"            for dev in pci_devices:"},{"line_number":259,"context_line":"                if self.node_id is None:"},{"line_number":260,"context_line":"                    self.defer_collection.append((instance[\u0027uuid\u0027], dev))"},{"line_number":261,"context_line":"                else:"},{"line_number":262,"context_line":"                    self._update_state_from_device(instance[\u0027uuid\u0027], dev)"},{"line_number":263,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9a80dd14_68bf24fd","line":260,"updated":"2015-03-17 17:57:42.000000000","message":"if node_id is none, the defer_collection should include all the devices. Therefore, no loop is needed.\n\nAssuming that a device is already in use before restart. Given that the node id will only be available after some time of delay, I\u0027m not sure if this method will guarantee that the same device won\u0027t be allocated again in that window of time after the restart.","commit_id":"63611be19095ad649f34d0facd92fc723736dd92"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"c4f61d9e428fea9a675237d38ff8a439c6ee6524","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        if pci_devices:"},{"line_number":258,"context_line":"            for dev in pci_devices:"},{"line_number":259,"context_line":"                if self.node_id is None:"},{"line_number":260,"context_line":"                    self.defer_collection.append((instance[\u0027uuid\u0027], dev))"},{"line_number":261,"context_line":"                else:"},{"line_number":262,"context_line":"                    self._update_state_from_device(instance[\u0027uuid\u0027], dev)"},{"line_number":263,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9a80dd14_6725805b","line":260,"in_reply_to":"9a80dd14_68bf24fd","updated":"2015-03-18 02:18:15.000000000","message":"\u003e\u003eif node_id is none, the defer_collection should include all the devices. Therefore, no loop is needed.\n\nno, we want collection the device chain in the devices, node_id is none just mean we need defer.\n\n\u003e\u003eAssuming that a device is already in use before restart. Give\nthis will not happen, we does reported a stale status to schedule, but just before report it to scheduler, the pci stats been updated(because we got node_id there), so when  new allocation arrive, we hold correct allocation information, no duplicate  alloc will happen.\n\nthis is not a nice solution, i know.","commit_id":"63611be19095ad649f34d0facd92fc723736dd92"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"1b7994d2eb80846b4a4574655789fed840b45df5","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        for dev in self.pci_devs:"},{"line_number":321,"context_line":"            dev.compute_node_id \u003d node_id"},{"line_number":322,"context_line":"        for uuid, dev in self.defer_collection:"},{"line_number":323,"context_line":"            self._update_state_from_device(uuid, dev)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"def get_instance_pci_devs(inst, request_id\u003dNone):"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a80dd14_2d39be41","line":323,"updated":"2015-03-17 17:57:42.000000000","message":"once it\u0027s done, the defer_collection is no longer needed, right?","commit_id":"63611be19095ad649f34d0facd92fc723736dd92"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"c4f61d9e428fea9a675237d38ff8a439c6ee6524","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        for dev in self.pci_devs:"},{"line_number":321,"context_line":"            dev.compute_node_id \u003d node_id"},{"line_number":322,"context_line":"        for uuid, dev in self.defer_collection:"},{"line_number":323,"context_line":"            self._update_state_from_device(uuid, dev)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"def get_instance_pci_devs(inst, request_id\u003dNone):"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a80dd14_c4d46abd","line":323,"in_reply_to":"9a80dd14_2d39be41","updated":"2015-03-18 02:18:15.000000000","message":"yeah, but also don\u0027t need to clean up.","commit_id":"63611be19095ad649f34d0facd92fc723736dd92"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"70c9cfc54e882891f9cc5956e555532958e751ef","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                    dev[\u0027instance_uuid\u0027] \u003d\u003d instance[\u0027uuid\u0027]):"},{"line_number":200,"context_line":"                self._free_device(dev)"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def update_pci_for_instance(self, context, instance):"},{"line_number":203,"context_line":"        \"\"\"Update PCI usage information if devices are de/allocated."},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        The caller should hold the COMPUTE_RESOURCE_SEMAPHORE lock."}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6ced46_cc335560","line":202,"updated":"2015-03-26 11:56:06.000000000","message":"Actually from reading the code - this method is completely broken IMHO. \n\nI\u0027ll try to summarize the problem - the resource tracker actually works in such a way that it will \"wipe the slate clean\" for every periodic refresh that calls \"update_available resources\", and because of that it will automatically skip deleted instances:\n\nhttps://github.com/openstack/nova/blob/1fb09cc821589cde69da293c7d74f8e10b08d128/nova/compute/resource_tracker.py#L758\n\nbut this method does not assume clean slate, and will try to do it\u0027s own tracking of active instances and update usage based on that.\n\ninstead of trying to hack around it - we really should make this method work like other update_from_instance and just accept an instance and a \"sign\" flag, and leave instance state tracking up to the actual resource tracker.\n\nThis will I believe also fix the bug.\n\nThe fix proposed here is a (Imho sloppy)  workaround that will make the situation worse in the long run as it introduces another edge case that we cannot account for properly.","commit_id":"dbc175c38b26fcedd4776aa591e90d5a37b0dac3"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"c5373675742d68bb60e4f32be28fabdc7209a096","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                    dev[\u0027instance_uuid\u0027] \u003d\u003d instance[\u0027uuid\u0027]):"},{"line_number":200,"context_line":"                self._free_device(dev)"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def update_pci_for_instance(self, context, instance):"},{"line_number":203,"context_line":"        \"\"\"Update PCI usage information if devices are de/allocated."},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        The caller should hold the COMPUTE_RESOURCE_SEMAPHORE lock."}],"source_content_type":"text/x-python","patch_set":18,"id":"fa963961_7063871b","line":202,"in_reply_to":"1a6ced46_cc335560","updated":"2015-03-27 01:36:15.000000000","message":"hi, \nthe situation for PCI resource management is, we can not \"wipe the slate\", because not like vcpu/mem, it need differentiate individual PCI device(for vcpu/mem, individual is identical).\nso pci manager could not just subtract the \u0027count\u0027 of pci devices, instead it need count which one  been allocted. \n\nso,  the allocation must be done at some \u0027moment\u0027, now it based on the instance state. but we still need the collection back per some complexity of  individual differentiation factor:\n\n1. while resize, instance will loaded the pci device not belong this compute node.\n2. while resize, pci manager need chang  the device state don\u0027t not belong this compute node(if not allow, it will more complex, refer old resize bug fix patch: https://review.openstack.org/#/c/137530/\n3. consideration the object mode, more complexity arise: the pci device manager\u0027s pci device object is not same object as the instance\u0027s one. \n\nhere is wiki page draw a diagram for this, hope it will help:\nhttps://wiki.openstack.org/wiki/Pci_resource_management\n\nand \u0027collection back\u0027 version resize patch set refer to (now it need rebase, soon -):  )\nhttps://review.openstack.org/#/q/status:open+project:openstack/nova+branch:master+topic:pci_resize,n,z\n\nYongli He","commit_id":"dbc175c38b26fcedd4776aa591e90d5a37b0dac3"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"02a4b26f0481a5352b5bb3021b46d1c17771f659","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self.node_id \u003d node_id"},{"line_number":54,"context_line":"        self.stats \u003d stats.PciDeviceStats()"},{"line_number":55,"context_line":"        if node_id:"},{"line_number":56,"context_line":"            self.pci_devs \u003d list("},{"line_number":57,"context_line":"                objects.PciDeviceList.get_by_compute_node(context, node_id))"},{"line_number":58,"context_line":"        else:"},{"line_number":59,"context_line":"            self.pci_devs \u003d []"}],"source_content_type":"text/x-python","patch_set":21,"id":"baa041b7_deb91d7b","line":56,"updated":"2015-04-02 22:44:25.000000000","message":"since node_id is available now, this should retrieve all the pci devices from last run","commit_id":"4bcc90720344dfe2c3ae673d77d3b4229046a903"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"02a4b26f0481a5352b5bb3021b46d1c17771f659","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            self.pci_devs \u003d list("},{"line_number":57,"context_line":"                objects.PciDeviceList.get_by_compute_node(context, node_id))"},{"line_number":58,"context_line":"        else:"},{"line_number":59,"context_line":"            self.pci_devs \u003d []"},{"line_number":60,"context_line":"        self._initial_instance_usage()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _initial_instance_usage(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"baa041b7_3e648920","line":59,"updated":"2015-04-02 22:44:25.000000000","message":"this would cause the pci devices updated in the pci stats.","commit_id":"4bcc90720344dfe2c3ae673d77d3b4229046a903"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"02a4b26f0481a5352b5bb3021b46d1c17771f659","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    @property"},{"line_number":88,"context_line":"    def pci_stats(self):"},{"line_number":89,"context_line":"        return self.stats"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def set_hvdevs(self, devices):"},{"line_number":92,"context_line":"        \"\"\"Sync the pci device tracker with hypervisor information."},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baa041b7_3e4b6989","line":90,"updated":"2015-04-02 22:44:25.000000000","message":"this method takes the devices currently available on the node and sync up with what are tracked.","commit_id":"4bcc90720344dfe2c3ae673d77d3b4229046a903"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"02a4b26f0481a5352b5bb3021b46d1c17771f659","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        if sign \u003d\u003d -1:"},{"line_number":222,"context_line":"            self.free_instance(context, instance)"},{"line_number":223,"context_line":"        else:"},{"line_number":224,"context_line":"            self._collect_back_devices_state(instance)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def _collect_back_devices_state(self, instance):"},{"line_number":227,"context_line":"        \"\"\"Collection back the devices status from instance\"\"\""}],"source_content_type":"text/x-python","patch_set":21,"id":"baa041b7_be8ad9bd","line":224,"updated":"2015-04-02 22:44:25.000000000","message":"So this is mainly to handle the restart if I understand it correctly. Due to changes made in this patch, pci device allocation happens in claim_instance() that is called by RT while doing claim_test()\n\nDue to the commit: https://review.openstack.org/#/c/148904/, the pci devices should have already been in sync with the DB (check the methods _initial_instance_usage() and set_hvdevs()). Therefore this seems to be redundant to say the least.","commit_id":"4bcc90720344dfe2c3ae673d77d3b4229046a903"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"5ffd84d7c7565a06f94801702154884adb703692","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        if sign \u003d\u003d -1:"},{"line_number":222,"context_line":"            self.free_instance(context, instance)"},{"line_number":223,"context_line":"        else:"},{"line_number":224,"context_line":"            self._collect_back_devices_state(instance)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def _collect_back_devices_state(self, instance):"},{"line_number":227,"context_line":"        \"\"\"Collection back the devices status from instance\"\"\""}],"source_content_type":"text/x-python","patch_set":21,"id":"baa041b7_c74cb044","line":224,"in_reply_to":"baa041b7_be8ad9bd","updated":"2015-04-03 01:01:57.000000000","message":"not just for the restart, considering we need allow other compute node modify same pci deivces, like resize. but i agree this patch may not need thoese code.\n\nthanks","commit_id":"4bcc90720344dfe2c3ae673d77d3b4229046a903"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e297a0e07d96fd8404cb629a1df7df53d128dee6","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            dev_obj \u003d objects.PciDevice.create(dev)"},{"line_number":151,"context_line":"            self.pci_devs.append(dev_obj)"},{"line_number":152,"context_line":"            self.stats.add_device(dev_obj)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _claim_instance(self, context, instance, prefix\u003d\u0027\u0027):"},{"line_number":155,"context_line":"        pci_requests \u003d objects.InstancePCIRequests.get_by_instance("},{"line_number":156,"context_line":"            context, instance)"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa041b7_4a1c12c1","line":153,"updated":"2015-04-03 16:05:24.000000000","message":"Not really related to this patch - but prefix is not used anywhere...","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"d1333c53019c2711302d1c6c725313641b65a6d2","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            dev_obj \u003d objects.PciDevice.create(dev)"},{"line_number":151,"context_line":"            self.pci_devs.append(dev_obj)"},{"line_number":152,"context_line":"            self.stats.add_device(dev_obj)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _claim_instance(self, context, instance, prefix\u003d\u0027\u0027):"},{"line_number":155,"context_line":"        pci_requests \u003d objects.InstancePCIRequests.get_by_instance("},{"line_number":156,"context_line":"            context, instance)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9aa53dc9_d09373a2","line":153,"in_reply_to":"baa041b7_4a1c12c1","updated":"2015-04-07 01:22:13.000000000","message":"i leave this to a clean up patch, is it ok?","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"6da3275895f46a9f7951b263a8552e0daefecb6b","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        for dev in devs:"},{"line_number":181,"context_line":"            device.allocate(dev, instance)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def claim_instance(self, context, instance):"},{"line_number":184,"context_line":"        devs \u003d self._claim_instance(context, instance)"},{"line_number":185,"context_line":"        if devs:"},{"line_number":186,"context_line":"            self._allocate_instance(instance, devs)"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa041b7_4047514b","line":183,"updated":"2015-04-03 16:16:56.000000000","message":"add this check: \n\nif not self.pci_devs:\n    return","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"d1333c53019c2711302d1c6c725313641b65a6d2","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        for dev in devs:"},{"line_number":181,"context_line":"            device.allocate(dev, instance)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def claim_instance(self, context, instance):"},{"line_number":184,"context_line":"        devs \u003d self._claim_instance(context, instance)"},{"line_number":185,"context_line":"        if devs:"},{"line_number":186,"context_line":"            self._allocate_instance(instance, devs)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9aa53dc9_100e7b34","line":183,"in_reply_to":"baa041b7_4047514b","updated":"2015-04-07 01:22:13.000000000","message":"Done","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"58157cd6d36f62e4ad17abef8001cbb7d3aaa935","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        for dev in devs:"},{"line_number":181,"context_line":"            device.allocate(dev, instance)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def claim_instance(self, context, instance):"},{"line_number":184,"context_line":"        devs \u003d self._claim_instance(context, instance)"},{"line_number":185,"context_line":"        if devs:"},{"line_number":186,"context_line":"            self._allocate_instance(instance, devs)"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa041b7_fb4f2cbb","line":183,"in_reply_to":"baa041b7_4047514b","updated":"2015-04-04 02:26:39.000000000","message":"thanks, going to add it, it\u0027s weekend here -:)","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e297a0e07d96fd8404cb629a1df7df53d128dee6","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            return"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        if sign \u003d\u003d -1:"},{"line_number":222,"context_line":"            self.free_instance(context, instance)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def update_pci_for_migration(self, context, instance, sign\u003d1):"},{"line_number":225,"context_line":"        \"\"\"Update instance\u0027s pci usage information when it is migrated."}],"source_content_type":"text/x-python","patch_set":22,"id":"baa041b7_14086f90","line":222,"updated":"2015-04-03 16:05:24.000000000","message":"Aren\u0027t we missing the allocate_instance case here in the else: ?","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"718c13a446bc9df145f1abb315d9ebff956cb5c8","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            return"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        if sign \u003d\u003d -1:"},{"line_number":222,"context_line":"            self.free_instance(context, instance)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def update_pci_for_migration(self, context, instance, sign\u003d1):"},{"line_number":225,"context_line":"        \"\"\"Update instance\u0027s pci usage information when it is migrated."}],"source_content_type":"text/x-python","patch_set":22,"id":"9aa53dc9_243f8e25","line":222,"in_reply_to":"9aa53dc9_50a083f4","updated":"2015-04-09 12:37:54.000000000","message":"Ugh that\u0027s just sloppy, we don\u0027t really need the states anymore anyway, but as long as we have them - we should keep them reasonably updated or remove them.","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"d1333c53019c2711302d1c6c725313641b65a6d2","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            return"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        if sign \u003d\u003d -1:"},{"line_number":222,"context_line":"            self.free_instance(context, instance)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def update_pci_for_migration(self, context, instance, sign\u003d1):"},{"line_number":225,"context_line":"        \"\"\"Update instance\u0027s pci usage information when it is migrated."}],"source_content_type":"text/x-python","patch_set":22,"id":"9aa53dc9_50a083f4","line":222,"in_reply_to":"baa041b7_14086f90","updated":"2015-04-07 01:22:13.000000000","message":"Done","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"58157cd6d36f62e4ad17abef8001cbb7d3aaa935","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            return"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        if sign \u003d\u003d -1:"},{"line_number":222,"context_line":"            self.free_instance(context, instance)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def update_pci_for_migration(self, context, instance, sign\u003d1):"},{"line_number":225,"context_line":"        \"\"\"Update instance\u0027s pci usage information when it is migrated."}],"source_content_type":"text/x-python","patch_set":22,"id":"baa041b7_7b5b1c88","line":222,"in_reply_to":"baa041b7_14086f90","updated":"2015-04-04 02:26:39.000000000","message":"pci device don\u0027t need allocated here, just allocated in the claim.\n\nsuppose, we reserve the pci in claim, the reserved pci devices actually identical to allocated. there is no difference if allocated them here. \n\nfor vcpu, instance \u0027record\u0027 it\u0027s need , i.e, 2 vcpu, vcpu update s just subtract the number of vcpu. but pci need know which device been reserved, so it\u0027s identical to allocated. \n\n\u0027claim\u0027 status does not needed, any more. and btw, even with \u0027claim\u0027 status, instance still  load that device to inst.pci_devices.","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"82562fee4e6a9ce28713ae53ebbd577868811aa1","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        if self.allocations.pop(instance[\u0027uuid\u0027], None):"},{"line_number":214,"context_line":"            self._free_instance(instance)"},{"line_number":215,"context_line":"        elif self.claims.pop(instance[\u0027uuid\u0027], None):"},{"line_number":216,"context_line":"            self._free_instance(instance)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def update_pci_for_instance(self, context, instance, sign):"},{"line_number":219,"context_line":"        \"\"\"Update PCI usage information if devices are de/allocated."}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_65a6d411","line":216,"updated":"2015-04-08 16:39:49.000000000","message":"if not self.pci_devs:\n    return\n\nif (self.allocations.pop(instance[\u0027uuid\u0027], None) or \n    self.claims.pop(instance[\u0027uuid\u0027], None):\n    self._free_instance(instance)","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"05f18fd4bc1f170bd9699de8edc7b3d557515778","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        if self.allocations.pop(instance[\u0027uuid\u0027], None):"},{"line_number":214,"context_line":"            self._free_instance(instance)"},{"line_number":215,"context_line":"        elif self.claims.pop(instance[\u0027uuid\u0027], None):"},{"line_number":216,"context_line":"            self._free_instance(instance)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def update_pci_for_instance(self, context, instance, sign):"},{"line_number":219,"context_line":"        \"\"\"Update PCI usage information if devices are de/allocated."}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_fd6c9a36","line":216,"in_reply_to":"9aa53dc9_65a6d411","updated":"2015-04-09 12:38:45.000000000","message":"These seem to be nits + I am not too happy about constantly checking if pci_devs is a non empty list - all of the methods would work if it were an empty list so no reason to have that check.","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"ac81024b1db15b03a49d05e4b04f29fa57de01e8","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        if self.allocations.pop(instance[\u0027uuid\u0027], None):"},{"line_number":214,"context_line":"            self._free_instance(instance)"},{"line_number":215,"context_line":"        elif self.claims.pop(instance[\u0027uuid\u0027], None):"},{"line_number":216,"context_line":"            self._free_instance(instance)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def update_pci_for_instance(self, context, instance, sign):"},{"line_number":219,"context_line":"        \"\"\"Update PCI usage information if devices are de/allocated."}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_c3dafd4a","line":216,"in_reply_to":"9aa53dc9_fd6c9a36","updated":"2015-04-10 02:04:12.000000000","message":"Nikola +1, that does not save that many time here.","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"82562fee4e6a9ce28713ae53ebbd577868811aa1","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        elif self.claims.pop(instance[\u0027uuid\u0027], None):"},{"line_number":216,"context_line":"            self._free_instance(instance)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def update_pci_for_instance(self, context, instance, sign):"},{"line_number":219,"context_line":"        \"\"\"Update PCI usage information if devices are de/allocated."},{"line_number":220,"context_line":"        \"\"\""},{"line_number":221,"context_line":"        if not self.pci_devs:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_852af87c","line":218,"updated":"2015-04-08 16:39:49.000000000","message":"With the two new methods: claim_instance() and free_instance(), Why do  we need this method any more?","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"05f18fd4bc1f170bd9699de8edc7b3d557515778","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        elif self.claims.pop(instance[\u0027uuid\u0027], None):"},{"line_number":216,"context_line":"            self._free_instance(instance)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def update_pci_for_instance(self, context, instance, sign):"},{"line_number":219,"context_line":"        \"\"\"Update PCI usage information if devices are de/allocated."},{"line_number":220,"context_line":"        \"\"\""},{"line_number":221,"context_line":"        if not self.pci_devs:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_dd4c36ca","line":218,"in_reply_to":"9aa53dc9_852af87c","updated":"2015-04-09 12:38:45.000000000","message":"imho it alligns more nicely with the other methods that RT uses so I say leave it for now and consider removing it in the future.","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"ac81024b1db15b03a49d05e4b04f29fa57de01e8","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        elif self.claims.pop(instance[\u0027uuid\u0027], None):"},{"line_number":216,"context_line":"            self._free_instance(instance)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def update_pci_for_instance(self, context, instance, sign):"},{"line_number":219,"context_line":"        \"\"\"Update PCI usage information if devices are de/allocated."},{"line_number":220,"context_line":"        \"\"\""},{"line_number":221,"context_line":"        if not self.pci_devs:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_8322b550","line":218,"in_reply_to":"9aa53dc9_dd4c36ca","updated":"2015-04-10 02:04:12.000000000","message":"Nikola +1","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"05f18fd4bc1f170bd9699de8edc7b3d557515778","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            return"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        if sign \u003d\u003d -1:"},{"line_number":225,"context_line":"            self.free_instance(context, instance)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def update_pci_for_migration(self, context, instance, sign\u003d1):"},{"line_number":228,"context_line":"        \"\"\"Update instance\u0027s pci usage information when it is migrated."}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_2aaf55e3","line":225,"updated":"2015-04-09 12:38:45.000000000","message":"As commented on the previous patch - we should do an allocate here too","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"63d1e0c431eb9eedbcadac6ccf2e1b3889f6926c","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            return"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        if sign \u003d\u003d -1:"},{"line_number":225,"context_line":"            self.free_instance(context, instance)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def update_pci_for_migration(self, context, instance, sign\u003d1):"},{"line_number":228,"context_line":"        \"\"\"Update instance\u0027s pci usage information when it is migrated."}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_35eb0d15","line":225,"in_reply_to":"9aa53dc9_231529e4","updated":"2015-04-10 12:28:44.000000000","message":"A hah - well OK then - we should really get rid of those states eventually.\n\nHow about a comment here explaining what is happening?","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"ac81024b1db15b03a49d05e4b04f29fa57de01e8","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            return"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        if sign \u003d\u003d -1:"},{"line_number":225,"context_line":"            self.free_instance(context, instance)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def update_pci_for_migration(self, context, instance, sign\u003d1):"},{"line_number":228,"context_line":"        \"\"\"Update instance\u0027s pci usage information when it is migrated."}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_231529e4","line":225,"in_reply_to":"9aa53dc9_2aaf55e3","updated":"2015-04-10 02:04:12.000000000","message":"Nikola,\nwe don\u0027t need allocted the device here, cause we do allocation at claim state. refer to\n\ndef claim_instance(self, context, instance):\t183\n        if not self.pci_devs:\t184\n            return\t185\n186\n        devs \u003d self._claim_instance(context, instance)\t187\n        if devs:\t188\n            self._allocate_instance(instance, devs)\t189\n            self.allocations[instance[\u0027uuid\u0027]] \u003d devs\t190\n            return devs\t191\n        return None","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"82562fee4e6a9ce28713ae53ebbd577868811aa1","unresolved":false,"context_lines":[{"line_number":271,"context_line":"      soft_reboot and hard_boot of \u0027xen\u0027 instances."},{"line_number":272,"context_line":"    \"\"\""},{"line_number":273,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":274,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load"},{"line_number":275,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":276,"context_line":"    return [device for device in pci_devices if"},{"line_number":277,"context_line":"                   device.request_id \u003d\u003d request_id or request_id \u003d\u003d \u0027all\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_25dfac6a","line":274,"updated":"2015-04-08 16:39:49.000000000","message":"can you add comments explaining why this is necessary?","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"05f18fd4bc1f170bd9699de8edc7b3d557515778","unresolved":false,"context_lines":[{"line_number":271,"context_line":"      soft_reboot and hard_boot of \u0027xen\u0027 instances."},{"line_number":272,"context_line":"    \"\"\""},{"line_number":273,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":274,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load"},{"line_number":275,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":276,"context_line":"    return [device for device in pci_devices if"},{"line_number":277,"context_line":"                   device.request_id \u003d\u003d request_id or request_id \u003d\u003d \u0027all\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_67b91879","line":274,"in_reply_to":"9aa53dc9_25dfac6a","updated":"2015-04-09 12:38:45.000000000","message":"well we want to make sure that we have an up-to date pci_device list. I am not really sure this is needed though. We can really only change PCI devices by resizing (known not to work but that\u0027s a different discussion :D).","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"ac81024b1db15b03a49d05e4b04f29fa57de01e8","unresolved":false,"context_lines":[{"line_number":271,"context_line":"      soft_reboot and hard_boot of \u0027xen\u0027 instances."},{"line_number":272,"context_line":"    \"\"\""},{"line_number":273,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":274,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load"},{"line_number":275,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":276,"context_line":"    return [device for device in pci_devices if"},{"line_number":277,"context_line":"                   device.request_id \u003d\u003d request_id or request_id \u003d\u003d \u0027all\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_836f552a","line":274,"in_reply_to":"9aa53dc9_67b91879","updated":"2015-04-10 02:04:12.000000000","message":"we definitely need this:\nwhen api stage, network api access this field, trigger a lazy load, then we allocated the device for this instance, the new allocation devs never going going to be loading to the instance.\n\nlazy loading depending on this attr not in the object instance.","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"63d1e0c431eb9eedbcadac6ccf2e1b3889f6926c","unresolved":false,"context_lines":[{"line_number":271,"context_line":"      soft_reboot and hard_boot of \u0027xen\u0027 instances."},{"line_number":272,"context_line":"    \"\"\""},{"line_number":273,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":274,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load"},{"line_number":275,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":276,"context_line":"    return [device for device in pci_devices if"},{"line_number":277,"context_line":"                   device.request_id \u003d\u003d request_id or request_id \u003d\u003d \u0027all\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_95d099f7","line":274,"in_reply_to":"9aa53dc9_836f552a","updated":"2015-04-10 12:28:44.000000000","message":"WHAT? So this would mean that we were mutating and then saving the pci devices assigned to an instance with code that does not access it through the instance objects _inside_ the same boot request?!\n\nThat sounds like a separate bug, and one that should not be fixed like this for sure - this is horrible.\n\nLet me look into this a bit more.","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8e29fceb3270638c8ba6632c3408738fe7e5fb78","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        devs \u003d self._claim_instance(context, instance)"},{"line_number":188,"context_line":"        if devs:"},{"line_number":189,"context_line":"            self._allocate_instance(instance, devs)"},{"line_number":190,"context_line":"            self.allocations[instance[\u0027uuid\u0027]] \u003d devs"},{"line_number":191,"context_line":"            return devs"},{"line_number":192,"context_line":"        return None"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"7aaa499b_fed2e133","line":190,"updated":"2015-04-10 15:52:49.000000000","message":"I guess this makes sense -but we kind of completely skip the \u0027claimed\u0027  state at this point.","commit_id":"79fd9928e1b4f66b4339458e05b1246bb1f68ecf"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"9f9d91a573d2a509ff00c63d849806cc456a352a","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        devs \u003d self._claim_instance(context, instance)"},{"line_number":188,"context_line":"        if devs:"},{"line_number":189,"context_line":"            self._allocate_instance(instance, devs)"},{"line_number":190,"context_line":"            self.allocations[instance[\u0027uuid\u0027]] \u003d devs"},{"line_number":191,"context_line":"            return devs"},{"line_number":192,"context_line":"        return None"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"7aaa499b_a9dbe81a","line":190,"in_reply_to":"7aaa499b_fed2e133","updated":"2015-04-13 01:08:10.000000000","message":"i don\u0027t think we need a claim stage: claimed device also loading into instance.pci_devices","commit_id":"79fd9928e1b4f66b4339458e05b1246bb1f68ecf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"483a3cf0674d79a516021f75c747cc1fc5fcfb74","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    - API stage will access instance.pci_devices trigger a lazy loading"},{"line_number":273,"context_line":"      after allocate new devices, need re-trigger the loading process."},{"line_number":274,"context_line":"    \"\"\""},{"line_number":275,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":276,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load pci_devices"},{"line_number":277,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":278,"context_line":"    return [device for device in pci_devices if"}],"source_content_type":"text/x-python","patch_set":24,"id":"9aa53dc9_b5971d47","line":275,"updated":"2015-04-10 12:21:06.000000000","message":"Mmm, I missed why you need to check if the Instance object is correctly hydrated with the context ?","commit_id":"79fd9928e1b4f66b4339458e05b1246bb1f68ecf"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"08ca560d6671b41380851d25f676d8b82732fcef","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    - API stage will access instance.pci_devices trigger a lazy loading"},{"line_number":273,"context_line":"      after allocate new devices, need re-trigger the loading process."},{"line_number":274,"context_line":"    \"\"\""},{"line_number":275,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":276,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load pci_devices"},{"line_number":277,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":278,"context_line":"    return [device for device in pci_devices if"}],"source_content_type":"text/x-python","patch_set":24,"id":"7aaa499b_9874e69c","line":275,"in_reply_to":"7aaa499b_0bf6498f","updated":"2015-04-13 14:26:30.000000000","message":"ok, i get it what you concern, will update it. thanks","commit_id":"79fd9928e1b4f66b4339458e05b1246bb1f68ecf"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"929ce0dcdfc9eaed331f0aa72ca1bf3286590a91","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    - API stage will access instance.pci_devices trigger a lazy loading"},{"line_number":273,"context_line":"      after allocate new devices, need re-trigger the loading process."},{"line_number":274,"context_line":"    \"\"\""},{"line_number":275,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":276,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load pci_devices"},{"line_number":277,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":278,"context_line":"    return [device for device in pci_devices if"}],"source_content_type":"text/x-python","patch_set":24,"id":"7aaa499b_0bf6498f","line":275,"in_reply_to":"7aaa499b_8946ecbd","updated":"2015-04-13 09:47:15.000000000","message":"Right - so the issue is that again  - we do things differently in the PCI tracker. We keep track of states of devices on the tracker object (and the DB as well) but we don\u0027t care about updating the actual instance object. That is wrong IMHO and this is precisely what claiming logic should do.\n\nIf you take a look at the NUMA code, we would store the actual claimed topology on the claim object, and then assign it to the instance before updating resources (this is not needed for the PCI tracker as stats are already update when we claim):\n\nhttps://github.com/openstack/nova/blob/6b69b705481958bc55f9d4e29732b09a45f392a5/nova/compute/resource_tracker.py#L135\n\nBut we also make sure that the instance is updated once the claim is successful:\n\nhttps://github.com/openstack/nova/blob/6b69b705481958bc55f9d4e29732b09a45f392a5/nova/compute/manager.py#L2302\n\nLeaving this up to the method that does the retrieval to do is worng IMHO (and if we really want to do it - it should be part of the object itself.\n\nI would personally like to see claim only move devices to \"claimed\" and then allocation (done after the claim) moving them to allocated - but I\u0027d settle for anything that is explicitly keeping the instance up-to-date.","commit_id":"79fd9928e1b4f66b4339458e05b1246bb1f68ecf"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"9f9d91a573d2a509ff00c63d849806cc456a352a","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    - API stage will access instance.pci_devices trigger a lazy loading"},{"line_number":273,"context_line":"      after allocate new devices, need re-trigger the loading process."},{"line_number":274,"context_line":"    \"\"\""},{"line_number":275,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":276,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load pci_devices"},{"line_number":277,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":278,"context_line":"    return [device for device in pci_devices if"}],"source_content_type":"text/x-python","patch_set":24,"id":"7aaa499b_8946ecbd","line":275,"in_reply_to":"9aa53dc9_3bce5763","updated":"2015-04-13 01:08:10.000000000","message":"Nikola\n\nwe need this, though instance_cliam append new allocated device to instance.pci_devices, but claim actually used a \u0027cloned\u0027 version instances, then that\u0027s can not take effect in the libvirt stage.\n\nrefer to: Claim init\n   def __init__(self, context, instance, tracker, resources, overhead\u003dNone,\n                 limits\u003dNone):\n        super(Claim, self).__init__()\n        # Stash a copy of the instance at the current point of time\n        if isinstance(instance, obj_base.NovaObject):\n            self.instance \u003d instance.obj_clone()","commit_id":"79fd9928e1b4f66b4339458e05b1246bb1f68ecf"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c75c63cbee9c8f8ed7bd9d23d08c04c2877ebd7c","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    - API stage will access instance.pci_devices trigger a lazy loading"},{"line_number":273,"context_line":"      after allocate new devices, need re-trigger the loading process."},{"line_number":274,"context_line":"    \"\"\""},{"line_number":275,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":276,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load pci_devices"},{"line_number":277,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":278,"context_line":"    return [device for device in pci_devices if"}],"source_content_type":"text/x-python","patch_set":24,"id":"9aa53dc9_b5b27d92","line":275,"in_reply_to":"9aa53dc9_b5971d47","updated":"2015-04-10 12:34:02.000000000","message":"See previous comment - IMHO this is very bad and a separate bug, and should not be part of this patch but am trying to confirm now.","commit_id":"79fd9928e1b4f66b4339458e05b1246bb1f68ecf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c71bac5011cf5dfe14ad78e7cf3f84e5cfaa3a58","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    - API stage will access instance.pci_devices trigger a lazy loading"},{"line_number":273,"context_line":"      after allocate new devices, need re-trigger the loading process."},{"line_number":274,"context_line":"    \"\"\""},{"line_number":275,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":276,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load pci_devices"},{"line_number":277,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":278,"context_line":"    return [device for device in pci_devices if"}],"source_content_type":"text/x-python","patch_set":24,"id":"9aa53dc9_aae0d7cd","line":275,"in_reply_to":"9aa53dc9_b5b27d92","updated":"2015-04-10 14:14:31.000000000","message":"Okay, I","commit_id":"79fd9928e1b4f66b4339458e05b1246bb1f68ecf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c71bac5011cf5dfe14ad78e7cf3f84e5cfaa3a58","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    - API stage will access instance.pci_devices trigger a lazy loading"},{"line_number":273,"context_line":"      after allocate new devices, need re-trigger the loading process."},{"line_number":274,"context_line":"    \"\"\""},{"line_number":275,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":276,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load pci_devices"},{"line_number":277,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":278,"context_line":"    return [device for device in pci_devices if"}],"source_content_type":"text/x-python","patch_set":24,"id":"9aa53dc9_aa2e97f8","line":275,"in_reply_to":"9aa53dc9_b5b27d92","updated":"2015-04-10 14:14:31.000000000","message":"Okay, I left a +1 because I was thinking about RC2 while I thought it was horrible to do this but considering your PS23 comment, turning my vote to -1","commit_id":"79fd9928e1b4f66b4339458e05b1246bb1f68ecf"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8e29fceb3270638c8ba6632c3408738fe7e5fb78","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    - API stage will access instance.pci_devices trigger a lazy loading"},{"line_number":273,"context_line":"      after allocate new devices, need re-trigger the loading process."},{"line_number":274,"context_line":"    \"\"\""},{"line_number":275,"context_line":"    if inst._context and hasattr(inst, \"pci_devices\"):"},{"line_number":276,"context_line":"        delattr(inst, \"pci_devices\")  # re-trigger lazy load pci_devices"},{"line_number":277,"context_line":"    pci_devices \u003d inst.pci_devices"},{"line_number":278,"context_line":"    return [device for device in pci_devices if"}],"source_content_type":"text/x-python","patch_set":24,"id":"9aa53dc9_3bce5763","line":275,"in_reply_to":"9aa53dc9_b5b27d92","updated":"2015-04-10 15:52:49.000000000","message":"Yongli wrote: \n\"\"\"\nwe definitely need this: when api stage, network api access this field, trigger a lazy load, then we allocated the device for this instance, the new allocation devs never going going to be loading to the instance.\n\nlazy loading depending on this attr not in the object instance\n\"\"\"\n\nSo I am not sure that this is true actually - in your patch - we would call device.allocate in instance_claim (see above), so as long as this method is called from within the \u0027with instance_claim()\u0027 block, the instance should have it\u0027s devices updated regardles of whether a lazy load has happened at any point earlier in the request.\n\nI think you should drop this line.","commit_id":"79fd9928e1b4f66b4339458e05b1246bb1f68ecf"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c17dc04a7969c891c719a697c9af8bf3c13be014","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        if sign \u003d\u003d -1:"},{"line_number":224,"context_line":"            self.free_instance(context, instance)"},{"line_number":225,"context_line":"        if sign \u003d\u003d 1:"},{"line_number":226,"context_line":"            devs \u003d self.claims.pop(instance[\u0027uuid\u0027], [])"},{"line_number":227,"context_line":"            self._allocate_instance(instance, devs)"},{"line_number":228,"context_line":"            if devs:"},{"line_number":229,"context_line":"                self.allocations[instance[\u0027uuid\u0027]] +\u003d devs"}],"source_content_type":"text/x-python","patch_set":26,"id":"7ad32947_e99f9d5d","line":226,"updated":"2015-04-28 11:02:56.000000000","message":"This whole thing could go into it\u0027s own method allocate_instance - but not a big deal","commit_id":"2b3b22ebf9ab63087e787f1100d396aca9fdf09e"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"44d3c9bc6862235452427dd0f8c22a6b2a06032e","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        if sign \u003d\u003d -1:"},{"line_number":224,"context_line":"            self.free_instance(context, instance)"},{"line_number":225,"context_line":"        if sign \u003d\u003d 1:"},{"line_number":226,"context_line":"            devs \u003d self.claims.pop(instance[\u0027uuid\u0027], [])"},{"line_number":227,"context_line":"            self._allocate_instance(instance, devs)"},{"line_number":228,"context_line":"            if devs:"},{"line_number":229,"context_line":"                self.allocations[instance[\u0027uuid\u0027]] +\u003d devs"}],"source_content_type":"text/x-python","patch_set":26,"id":"5ad0253b_a01d4168","line":226,"in_reply_to":"7ad32947_e99f9d5d","updated":"2015-04-29 07:59:40.000000000","message":"Done","commit_id":"2b3b22ebf9ab63087e787f1100d396aca9fdf09e"}],"nova/pci/stats.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"533f3cba4fc0063e6c5b0d654d82061972a4d1b7","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            if pool:"},{"line_number":138,"context_line":"                devs \u003d [d for d in pool[\u0027devices\u0027]"},{"line_number":139,"context_line":"                         if (d[\u0027address\u0027] \u003d\u003d device[\u0027address\u0027] and"},{"line_number":140,"context_line":"                           d[\u0027compute_node_id\u0027] \u003d\u003d device[\u0027compute_node_id\u0027])]"},{"line_number":141,"context_line":"                if devs:"},{"line_number":142,"context_line":"                    pool[\u0027devices\u0027].remove(devs[0])"},{"line_number":143,"context_line":"                    self._decrease_pool_count(self.pools, pool)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_475421ca","line":140,"updated":"2015-02-09 09:58:00.000000000","message":"alignment","commit_id":"e1f3504159f0beb24ca7f43a977459506d13a676"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"7f238870b514ddde7ae039c548c30956d6de855c","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            if pool:"},{"line_number":138,"context_line":"                devs \u003d [d for d in pool[\u0027devices\u0027]"},{"line_number":139,"context_line":"                         if (d[\u0027address\u0027] \u003d\u003d device[\u0027address\u0027] and"},{"line_number":140,"context_line":"                           d[\u0027compute_node_id\u0027] \u003d\u003d device[\u0027compute_node_id\u0027])]"},{"line_number":141,"context_line":"                if devs:"},{"line_number":142,"context_line":"                    pool[\u0027devices\u0027].remove(devs[0])"},{"line_number":143,"context_line":"                    self._decrease_pool_count(self.pools, pool)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_0d1bf6ca","line":140,"in_reply_to":"da86d52c_475421ca","updated":"2015-02-10 07:27:52.000000000","message":"Done","commit_id":"e1f3504159f0beb24ca7f43a977459506d13a676"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e297a0e07d96fd8404cb629a1df7df53d128dee6","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            if sum([pool[\u0027count\u0027] for pool in pools]) \u003c count:"},{"line_number":151,"context_line":"                for d in range(len(alloc_devices)):"},{"line_number":152,"context_line":"                    self.add_device(alloc_devices.pop())"},{"line_number":153,"context_line":"                    return None"},{"line_number":154,"context_line":"            for pool in pools:"},{"line_number":155,"context_line":"                if pool[\u0027count\u0027] \u003e\u003d count:"},{"line_number":156,"context_line":"                    num_alloc \u003d count"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa041b7_651ee764","line":153,"updated":"2015-04-03 16:05:24.000000000","message":"This should be outside of the loop if I am reading this code correctly.","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"d1333c53019c2711302d1c6c725313641b65a6d2","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            if sum([pool[\u0027count\u0027] for pool in pools]) \u003c count:"},{"line_number":151,"context_line":"                for d in range(len(alloc_devices)):"},{"line_number":152,"context_line":"                    self.add_device(alloc_devices.pop())"},{"line_number":153,"context_line":"                    return None"},{"line_number":154,"context_line":"            for pool in pools:"},{"line_number":155,"context_line":"                if pool[\u0027count\u0027] \u003e\u003d count:"},{"line_number":156,"context_line":"                    num_alloc \u003d count"}],"source_content_type":"text/x-python","patch_set":22,"id":"9aa53dc9_b0622fd7","line":153,"in_reply_to":"baa041b7_651ee764","updated":"2015-04-07 01:22:13.000000000","message":"Done","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"58157cd6d36f62e4ad17abef8001cbb7d3aaa935","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            if sum([pool[\u0027count\u0027] for pool in pools]) \u003c count:"},{"line_number":151,"context_line":"                for d in range(len(alloc_devices)):"},{"line_number":152,"context_line":"                    self.add_device(alloc_devices.pop())"},{"line_number":153,"context_line":"                    return None"},{"line_number":154,"context_line":"            for pool in pools:"},{"line_number":155,"context_line":"                if pool[\u0027count\u0027] \u003e\u003d count:"},{"line_number":156,"context_line":"                    num_alloc \u003d count"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa041b7_fbfdec3a","line":153,"in_reply_to":"baa041b7_651ee764","updated":"2015-04-04 02:26:39.000000000","message":"thanks. will update the patch soon.","commit_id":"199bde68f444e19b6bede24df9ef57855f73b70b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e7a3edc0f16b9a0a86574a16416f36f9d8856feb","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            if sum([pool[\u0027count\u0027] for pool in pools]) \u003c count:"},{"line_number":151,"context_line":"                for d in range(len(alloc_devices)):"},{"line_number":152,"context_line":"                    self.add_device(alloc_devices.pop())"},{"line_number":153,"context_line":"                return None"},{"line_number":154,"context_line":"            for pool in pools:"},{"line_number":155,"context_line":"                if pool[\u0027count\u0027] \u003e\u003d count:"},{"line_number":156,"context_line":"                    num_alloc \u003d count"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_660dbf36","line":153,"updated":"2015-04-08 16:10:44.000000000","message":"Erm, while I understand why you change the behaviour by returning None instead of an Exception, I think you should leave it as it is, and just catch the Exception in _claim_instance()\n\nThat would also reduce the level of change.","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"51e63b26c0b7da0f48a4a7cfbe27ae30181e552c","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            if sum([pool[\u0027count\u0027] for pool in pools]) \u003c count:"},{"line_number":151,"context_line":"                for d in range(len(alloc_devices)):"},{"line_number":152,"context_line":"                    self.add_device(alloc_devices.pop())"},{"line_number":153,"context_line":"                return None"},{"line_number":154,"context_line":"            for pool in pools:"},{"line_number":155,"context_line":"                if pool[\u0027count\u0027] \u003e\u003d count:"},{"line_number":156,"context_line":"                    num_alloc \u003d count"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_96a208fc","line":153,"in_reply_to":"9aa53dc9_079ecc62","updated":"2015-04-09 14:07:33.000000000","message":"Well, I thought it was better to minimize the level of change, as particular as there are many files impacted and new method signatures. I was also thinking it would have been better to split that patch into 2 (like renaming methods to make it more RT-ish, and fixing the problem) but due to the criticity of the bug tagged for a release candidature, I felt it was unnecessary.\n\nAnyway, fair enough, I don\u0027t want to bikeshed.","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"05f18fd4bc1f170bd9699de8edc7b3d557515778","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            if sum([pool[\u0027count\u0027] for pool in pools]) \u003c count:"},{"line_number":151,"context_line":"                for d in range(len(alloc_devices)):"},{"line_number":152,"context_line":"                    self.add_device(alloc_devices.pop())"},{"line_number":153,"context_line":"                return None"},{"line_number":154,"context_line":"            for pool in pools:"},{"line_number":155,"context_line":"                if pool[\u0027count\u0027] \u003e\u003d count:"},{"line_number":156,"context_line":"                    num_alloc \u003d count"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_079ecc62","line":153,"in_reply_to":"9aa53dc9_660dbf36","updated":"2015-04-09 12:38:45.000000000","message":"I strongly disagree - there is no point in doing that.","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"ac81024b1db15b03a49d05e4b04f29fa57de01e8","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            if sum([pool[\u0027count\u0027] for pool in pools]) \u003c count:"},{"line_number":151,"context_line":"                for d in range(len(alloc_devices)):"},{"line_number":152,"context_line":"                    self.add_device(alloc_devices.pop())"},{"line_number":153,"context_line":"                return None"},{"line_number":154,"context_line":"            for pool in pools:"},{"line_number":155,"context_line":"                if pool[\u0027count\u0027] \u003e\u003d count:"},{"line_number":156,"context_line":"                    num_alloc \u003d count"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_a36ff9fa","line":153,"in_reply_to":"9aa53dc9_96a208fc","updated":"2015-04-10 02:04:12.000000000","message":"Sylvain,\n\ni will keep it for none for now. but thanks you ideas, i would like issue a clean up patch if any agreement.","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"b1ac98a2d50f9d8592bc701080dbebb62a0f28ef","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                          \" This should not happen, since the scheduler\""},{"line_number":155,"context_line":"                          \" should have accurate information, and allocation\""},{"line_number":156,"context_line":"                          \" during claims is controlled via a hold\""},{"line_number":157,"context_line":"                          \" on the compute node semaphore\"))"},{"line_number":158,"context_line":"                for d in range(len(alloc_devices)):"},{"line_number":159,"context_line":"                    self.add_device(alloc_devices.pop())"},{"line_number":160,"context_line":"                raise exception.PciDeviceRequestFailed(requests\u003dpci_requests)"}],"source_content_type":"text/x-python","patch_set":25,"id":"7aaa499b_33e82c10","side":"PARENT","line":157,"updated":"2015-04-14 12:50:02.000000000","message":"Why remove this?","commit_id":"1e3412deeca725cc3ecfd12ff4e185515f9fda1b"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"c794f7774991e939501b79f2b47beaae856c22e8","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                          \" This should not happen, since the scheduler\""},{"line_number":155,"context_line":"                          \" should have accurate information, and allocation\""},{"line_number":156,"context_line":"                          \" during claims is controlled via a hold\""},{"line_number":157,"context_line":"                          \" on the compute node semaphore\"))"},{"line_number":158,"context_line":"                for d in range(len(alloc_devices)):"},{"line_number":159,"context_line":"                    self.add_device(alloc_devices.pop())"},{"line_number":160,"context_line":"                raise exception.PciDeviceRequestFailed(requests\u003dpci_requests)"}],"source_content_type":"text/x-python","patch_set":25,"id":"7aaa499b_a8d4ad1f","side":"PARENT","line":157,"in_reply_to":"7aaa499b_33e82c10","updated":"2015-04-15 01:04:44.000000000","message":"Claim has it\u0027s own fail log, and like vcpu/mem, do not raise exception here.","commit_id":"1e3412deeca725cc3ecfd12ff4e185515f9fda1b"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"eb92bc53ac5ce5ae637d28ed42d812ee82cbdb1e","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                          \" This should not happen, since the scheduler\""},{"line_number":155,"context_line":"                          \" should have accurate information, and allocation\""},{"line_number":156,"context_line":"                          \" during claims is controlled via a hold\""},{"line_number":157,"context_line":"                          \" on the compute node semaphore\"))"},{"line_number":158,"context_line":"                for d in range(len(alloc_devices)):"},{"line_number":159,"context_line":"                    self.add_device(alloc_devices.pop())"},{"line_number":160,"context_line":"                raise exception.PciDeviceRequestFailed(requests\u003dpci_requests)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5aa745d1_2d99226f","side":"PARENT","line":157,"in_reply_to":"7aaa499b_78a2defe","updated":"2015-04-16 12:22:17.000000000","message":"Done","commit_id":"1e3412deeca725cc3ecfd12ff4e185515f9fda1b"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"fae5f245734aea9922d31c5ae9a34ec8392ad76e","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                          \" This should not happen, since the scheduler\""},{"line_number":155,"context_line":"                          \" should have accurate information, and allocation\""},{"line_number":156,"context_line":"                          \" during claims is controlled via a hold\""},{"line_number":157,"context_line":"                          \" on the compute node semaphore\"))"},{"line_number":158,"context_line":"                for d in range(len(alloc_devices)):"},{"line_number":159,"context_line":"                    self.add_device(alloc_devices.pop())"},{"line_number":160,"context_line":"                raise exception.PciDeviceRequestFailed(requests\u003dpci_requests)"}],"source_content_type":"text/x-python","patch_set":25,"id":"7aaa499b_78a2defe","side":"PARENT","line":157,"in_reply_to":"7aaa499b_a8d4ad1f","updated":"2015-04-15 15:30:23.000000000","message":"Ok I understand that you can remove the exception. But It\u0027ll be good to keep the log where it happens.","commit_id":"1e3412deeca725cc3ecfd12ff4e185515f9fda1b"}],"nova/tests/pci/test_manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1b163dac08c38835960101d9c63c6b736f2c1cc5","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        self.tracker.update_pci_for_migration(None, inst_2)"},{"line_number":333,"context_line":"        free_devs \u003d self.tracker.pci_stats.get_free_devs()"},{"line_number":334,"context_line":"        self.assertEqual(len(free_devs), 1)"},{"line_number":335,"context_line":"        self.tracker.clean_usage([self.inst], [migr], [orph])"},{"line_number":336,"context_line":"        free_devs \u003d self.tracker.pci_stats.get_free_devs()"},{"line_number":337,"context_line":"        self.assertEqual(len(free_devs), 2)"},{"line_number":338,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_461a8118","line":335,"updated":"2014-10-30 17:34:59.000000000","message":"How about a test that ensures that we do nothing if not self.pci_devs, and if vm_state !\u003d BUILDING?","commit_id":"03f36d598705698fea3fe3cb6afe4542a8bb6f72"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"eac579f5d9bdd676e5744a04eea42e132c98cd8f","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        self.tracker.update_pci_for_migration(None, inst_2)"},{"line_number":333,"context_line":"        free_devs \u003d self.tracker.pci_stats.get_free_devs()"},{"line_number":334,"context_line":"        self.assertEqual(len(free_devs), 1)"},{"line_number":335,"context_line":"        self.tracker.clean_usage([self.inst], [migr], [orph])"},{"line_number":336,"context_line":"        free_devs \u003d self.tracker.pci_stats.get_free_devs()"},{"line_number":337,"context_line":"        self.assertEqual(len(free_devs), 2)"},{"line_number":338,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_754e3ec3","line":335,"in_reply_to":"7a8c0949_461a8118","updated":"2014-10-31 01:53:00.000000000","message":"Done","commit_id":"03f36d598705698fea3fe3cb6afe4542a8bb6f72"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"0161c8700eaea8532360ac54c4314c5455ed28af","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":320,"context_line":"    def test_pci_update_bound(self, mock_get):"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        self.inst.vm_state \u003d vm_states.ACTIVE"},{"line_number":323,"context_line":"        self._create_pci_requests_object(mock_get,"},{"line_number":324,"context_line":"            [{\u0027count\u0027: 1, \u0027spec\u0027: [{\u0027vendor_id\u0027: \u0027v\u0027}]}])"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_2f48da2c","line":321,"updated":"2014-10-31 13:56:03.000000000","message":"nit; blank line","commit_id":"d551a8fb82af17e78c2ca78913dd72d8eca49988"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"aa43d84572d0c47140c66fd89a74fc83b35fc60d","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":320,"context_line":"    def test_pci_update_bound(self, mock_get):"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        self.inst.vm_state \u003d vm_states.ACTIVE"},{"line_number":323,"context_line":"        self._create_pci_requests_object(mock_get,"},{"line_number":324,"context_line":"            [{\u0027count\u0027: 1, \u0027spec\u0027: [{\u0027vendor_id\u0027: \u0027v\u0027}]}])"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_60b0218c","line":321,"in_reply_to":"7a8c0949_2f48da2c","updated":"2014-11-03 01:19:14.000000000","message":"Done","commit_id":"d551a8fb82af17e78c2ca78913dd72d8eca49988"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"0161c8700eaea8532360ac54c4314c5455ed28af","unresolved":false,"context_lines":[{"line_number":319,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":320,"context_line":"    def test_pci_update_bound(self, mock_get):"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        self.inst.vm_state \u003d vm_states.ACTIVE"},{"line_number":323,"context_line":"        self._create_pci_requests_object(mock_get,"},{"line_number":324,"context_line":"            [{\u0027count\u0027: 1, \u0027spec\u0027: [{\u0027vendor_id\u0027: \u0027v\u0027}]}])"},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_6faae271","line":322,"updated":"2014-10-31 13:56:03.000000000","message":"Might as well come up with a list of vm stats (PAUSED, etc, mentioned in the code), and loop over them for the same test.","commit_id":"d551a8fb82af17e78c2ca78913dd72d8eca49988"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"aa43d84572d0c47140c66fd89a74fc83b35fc60d","unresolved":false,"context_lines":[{"line_number":319,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":320,"context_line":"    def test_pci_update_bound(self, mock_get):"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        self.inst.vm_state \u003d vm_states.ACTIVE"},{"line_number":323,"context_line":"        self._create_pci_requests_object(mock_get,"},{"line_number":324,"context_line":"            [{\u0027count\u0027: 1, \u0027spec\u0027: [{\u0027vendor_id\u0027: \u0027v\u0027}]}])"},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_80ad0d34","line":322,"in_reply_to":"7a8c0949_6faae271","updated":"2014-11-03 01:19:14.000000000","message":"done","commit_id":"d551a8fb82af17e78c2ca78913dd72d8eca49988"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"0161c8700eaea8532360ac54c4314c5455ed28af","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        spci_free \u003d \u0027nova.pci.manager.PciDevTracker._free_instance\u0027"},{"line_number":327,"context_line":"        spci_alloc \u003d \u0027nova.pci.manager.PciDevTracker._allocate_instance\u0027"},{"line_number":328,"context_line":"        spci_claim \u003d \u0027nova.pci.manager.PciDevTracker._claim_instance\u0027"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        with mock.patch(spci_free) as pci_free:"},{"line_number":331,"context_line":"            with mock.patch(spci_alloc) as pci_alloc:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_efb5f2cd","line":328,"updated":"2014-10-31 13:56:03.000000000","message":"Use decorators instead (the same as get_by_instance)","commit_id":"d551a8fb82af17e78c2ca78913dd72d8eca49988"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"aa43d84572d0c47140c66fd89a74fc83b35fc60d","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        spci_free \u003d \u0027nova.pci.manager.PciDevTracker._free_instance\u0027"},{"line_number":327,"context_line":"        spci_alloc \u003d \u0027nova.pci.manager.PciDevTracker._allocate_instance\u0027"},{"line_number":328,"context_line":"        spci_claim \u003d \u0027nova.pci.manager.PciDevTracker._claim_instance\u0027"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        with mock.patch(spci_free) as pci_free:"},{"line_number":331,"context_line":"            with mock.patch(spci_alloc) as pci_alloc:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_c07e35ae","line":328,"in_reply_to":"7a8c0949_efb5f2cd","updated":"2014-11-03 01:19:14.000000000","message":"Done","commit_id":"d551a8fb82af17e78c2ca78913dd72d8eca49988"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"0161c8700eaea8532360ac54c4314c5455ed28af","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                    self.assertFalse(pci_alloc.called)"},{"line_number":336,"context_line":"                    self.assertFalse(pci_claim.called)"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        pci_devs \u003d self.tracker.pci_devs"},{"line_number":339,"context_line":"        self.tracker.pci_devs \u003d []"},{"line_number":340,"context_line":"        with mock.patch(spci_free) as pci_free:"},{"line_number":341,"context_line":"            with mock.patch(spci_alloc) as pci_alloc:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_2fc7fa46","line":338,"updated":"2014-10-31 13:56:03.000000000","message":"this doesn\u0027t seem to be necessary","commit_id":"d551a8fb82af17e78c2ca78913dd72d8eca49988"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"aa43d84572d0c47140c66fd89a74fc83b35fc60d","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                    self.assertFalse(pci_alloc.called)"},{"line_number":336,"context_line":"                    self.assertFalse(pci_claim.called)"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        pci_devs \u003d self.tracker.pci_devs"},{"line_number":339,"context_line":"        self.tracker.pci_devs \u003d []"},{"line_number":340,"context_line":"        with mock.patch(spci_free) as pci_free:"},{"line_number":341,"context_line":"            with mock.patch(spci_alloc) as pci_alloc:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_80742dd0","line":338,"in_reply_to":"7a8c0949_2fc7fa46","updated":"2014-11-03 01:19:14.000000000","message":"Done","commit_id":"d551a8fb82af17e78c2ca78913dd72d8eca49988"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"0161c8700eaea8532360ac54c4314c5455ed28af","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                    self.assertFalse(pci_free.called)"},{"line_number":345,"context_line":"                    self.assertFalse(pci_alloc.called)"},{"line_number":346,"context_line":"                    self.assertFalse(pci_claim.called)"},{"line_number":347,"context_line":"        self.tracker.pci_devs \u003d pci_devs"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":350,"context_line":"    def test_clean_usage_claims(self, mock_get):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_cffe766b","line":347,"updated":"2014-10-31 13:56:03.000000000","message":"this doesn\u0027t seem to be necessary","commit_id":"d551a8fb82af17e78c2ca78913dd72d8eca49988"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"aa43d84572d0c47140c66fd89a74fc83b35fc60d","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                    self.assertFalse(pci_free.called)"},{"line_number":345,"context_line":"                    self.assertFalse(pci_alloc.called)"},{"line_number":346,"context_line":"                    self.assertFalse(pci_claim.called)"},{"line_number":347,"context_line":"        self.tracker.pci_devs \u003d pci_devs"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":350,"context_line":"    def test_clean_usage_claims(self, mock_get):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_a0812991","line":347,"in_reply_to":"7a8c0949_cffe766b","updated":"2014-11-03 01:19:14.000000000","message":"Done","commit_id":"d551a8fb82af17e78c2ca78913dd72d8eca49988"}],"nova/tests/unit/compute/test_claims.py":[{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"a53bad50fdb7074e057fc528b8bf2ae90b372417","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        self.resources \u003d self._fake_resources()"},{"line_number":69,"context_line":"        self.tracker \u003d DummyTracker()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @mock.patch(\u0027nova.objects.PciDevice.save\u0027, return_value\u003dNone)"},{"line_number":72,"context_line":"    def _claim(self, limits\u003dNone, overhead\u003dNone, **kwargs):"},{"line_number":73,"context_line":"        numa_topology \u003d kwargs.pop(\u0027numa_topology\u0027, None)"},{"line_number":74,"context_line":"        instance \u003d self._fake_instance(**kwargs)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_f5baa409","line":71,"updated":"2015-03-31 16:30:48.000000000","message":"This patch decorator is setting limits as the patched method (following the order of the parameters), that\u0027s why Jenkins failed. The calls to _claim define limits again, which causes the given error (\"_claim() got multiple values for keyword argument \u0027limits\u0027\"). I think you will have to use the \"with\" case to mock the \"save\" method in order to preserve the calls or maybe you can add another parameter before limits if all calls to _claim are given with keyword arguments.","commit_id":"641c5b62e17fdcc080890850eb1ab911a384cfd0"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"7826b958eeb9bcf9a5f72febcf91f6c91aaf6e87","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        self.resources \u003d self._fake_resources()"},{"line_number":69,"context_line":"        self.tracker \u003d DummyTracker()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @mock.patch(\u0027nova.objects.PciDevice.save\u0027, return_value\u003dNone)"},{"line_number":72,"context_line":"    def _claim(self, limits\u003dNone, overhead\u003dNone, **kwargs):"},{"line_number":73,"context_line":"        numa_topology \u003d kwargs.pop(\u0027numa_topology\u0027, None)"},{"line_number":74,"context_line":"        instance \u003d self._fake_instance(**kwargs)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_69e90b80","line":71,"in_reply_to":"da9b358b_38ada131","updated":"2015-04-01 01:05:01.000000000","message":"thanks, Kallebe,  it wired my local testing is passed, i wil fix these all soon.","commit_id":"641c5b62e17fdcc080890850eb1ab911a384cfd0"},{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"31f2bae8688e516160d40765c818cd2c2536da65","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        self.resources \u003d self._fake_resources()"},{"line_number":69,"context_line":"        self.tracker \u003d DummyTracker()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @mock.patch(\u0027nova.objects.PciDevice.save\u0027, return_value\u003dNone)"},{"line_number":72,"context_line":"    def _claim(self, limits\u003dNone, overhead\u003dNone, **kwargs):"},{"line_number":73,"context_line":"        numa_topology \u003d kwargs.pop(\u0027numa_topology\u0027, None)"},{"line_number":74,"context_line":"        instance \u003d self._fake_instance(**kwargs)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_38ada131","line":71,"in_reply_to":"da9b358b_f5baa409","updated":"2015-03-31 16:52:07.000000000","message":"Looking at this second option again, I think it will not work, because when you pass keyword parameters you cannot let one (the first one in this case) unassigned. Sorry. I think you will have to use the \"with\" after all.\n\n\n\u003e\u003e\u003e def f(a,b,c):\n\n...     print a,b,c\n\n... \n\n\u003e\u003e\u003e f(b\u003d2, c\u003d3)\n\nTraceback (most recent call last):\n\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n\nTypeError: f() takes exactly 3 arguments (2 given)","commit_id":"641c5b62e17fdcc080890850eb1ab911a384cfd0"},{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"a53bad50fdb7074e057fc528b8bf2ae90b372417","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    def test_memory_with_overhead(self, mock_get):"},{"line_number":153,"context_line":"        overhead \u003d {\u0027memory_mb\u0027: 8}"},{"line_number":154,"context_line":"        limits \u003d {\u0027memory_mb\u0027: 2048}"},{"line_number":155,"context_line":"        self._claim(memory_mb\u003d2040, limits\u003dlimits,"},{"line_number":156,"context_line":"                    overhead\u003doverhead)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_memory_with_overhead_insufficient(self, mock_get):"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_15f3c8d7","line":155,"updated":"2015-03-31 16:30:48.000000000","message":"This call reassigns limits.","commit_id":"641c5b62e17fdcc080890850eb1ab911a384cfd0"},{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"a53bad50fdb7074e057fc528b8bf2ae90b372417","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        limits \u003d {\u0027memory_mb\u0027: 2048}"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self.assertRaises(exception.ComputeResourcesUnavailable,"},{"line_number":163,"context_line":"                          self._claim, limits\u003dlimits, overhead\u003doverhead,"},{"line_number":164,"context_line":"                          memory_mb\u003d2040)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def test_memory_oversubscription(self, mock_get):"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_7513340e","line":163,"updated":"2015-03-31 16:30:48.000000000","message":"Same as above.","commit_id":"641c5b62e17fdcc080890850eb1ab911a384cfd0"},{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"a53bad50fdb7074e057fc528b8bf2ae90b372417","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    def test_memory_insufficient(self, mock_get):"},{"line_number":170,"context_line":"        limits \u003d {\u0027memory_mb\u0027: 8192}"},{"line_number":171,"context_line":"        self.assertRaises(exception.ComputeResourcesUnavailable,"},{"line_number":172,"context_line":"                          self._claim, limits\u003dlimits, memory_mb\u003d16384)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def test_disk_oversubscription(self, mock_get):"},{"line_number":175,"context_line":"        limits \u003d {\u0027disk_gb\u0027: 60}"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_15f4e883","line":172,"updated":"2015-03-31 16:30:48.000000000","message":"Same as above.","commit_id":"641c5b62e17fdcc080890850eb1ab911a384cfd0"},{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"a53bad50fdb7074e057fc528b8bf2ae90b372417","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    def test_disk_oversubscription(self, mock_get):"},{"line_number":175,"context_line":"        limits \u003d {\u0027disk_gb\u0027: 60}"},{"line_number":176,"context_line":"        self._claim(root_gb\u003d10, ephemeral_gb\u003d40,"},{"line_number":177,"context_line":"                    limits\u003dlimits)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def test_disk_insufficient(self, mock_get):"},{"line_number":180,"context_line":"        limits \u003d {\u0027disk_gb\u0027: 45}"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_75eb34b1","line":177,"updated":"2015-03-31 16:30:48.000000000","message":"Same as above.","commit_id":"641c5b62e17fdcc080890850eb1ab911a384cfd0"},{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"a53bad50fdb7074e057fc528b8bf2ae90b372417","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        self.assertRaisesRegex("},{"line_number":182,"context_line":"                exception.ComputeResourcesUnavailable,"},{"line_number":183,"context_line":"                \"disk\","},{"line_number":184,"context_line":"                self._claim, limits\u003dlimits, root_gb\u003d10, ephemeral_gb\u003d40)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def test_disk_and_memory_insufficient(self, mock_get):"},{"line_number":187,"context_line":"        limits \u003d {\u0027disk_gb\u0027: 45, \u0027memory_mb\u0027: 8192}"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_15c62848","line":184,"updated":"2015-03-31 16:30:48.000000000","message":"Same as above.","commit_id":"641c5b62e17fdcc080890850eb1ab911a384cfd0"},{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"a53bad50fdb7074e057fc528b8bf2ae90b372417","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        self.assertRaisesRegex("},{"line_number":189,"context_line":"                exception.ComputeResourcesUnavailable,"},{"line_number":190,"context_line":"                \"memory.*disk\","},{"line_number":191,"context_line":"                self._claim, limits\u003dlimits, root_gb\u003d10, ephemeral_gb\u003d40,"},{"line_number":192,"context_line":"                memory_mb\u003d16384)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    @mock.patch(\u0027nova.objects.PciDevice.save\u0027, return_value\u003dNone)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_752a142e","line":191,"updated":"2015-03-31 16:30:48.000000000","message":"Same as above.","commit_id":"641c5b62e17fdcc080890850eb1ab911a384cfd0"},{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"a53bad50fdb7074e057fc528b8bf2ae90b372417","unresolved":false,"context_lines":[{"line_number":262,"context_line":"            cpu_allocation_ratio\u003d1, ram_allocation_ratio\u003d1)"},{"line_number":263,"context_line":"        self.assertRaises(exception.ComputeResourcesUnavailable,"},{"line_number":264,"context_line":"                          self._claim,"},{"line_number":265,"context_line":"                          limits\u003d{\u0027numa_topology\u0027: limit_topo},"},{"line_number":266,"context_line":"                          numa_topology\u003dhuge_instance)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def test_numa_topology_passes(self, mock_get):"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_7539f440","line":265,"updated":"2015-03-31 16:30:48.000000000","message":"Same as above.","commit_id":"641c5b62e17fdcc080890850eb1ab911a384cfd0"},{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"a53bad50fdb7074e057fc528b8bf2ae90b372417","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                    id\u003d1, cpuset\u003dset([1, 2]), memory\u003d512)])"},{"line_number":272,"context_line":"        limit_topo \u003d objects.NUMATopologyLimits("},{"line_number":273,"context_line":"            cpu_allocation_ratio\u003d1, ram_allocation_ratio\u003d1)"},{"line_number":274,"context_line":"        self._claim(limits\u003d{\u0027numa_topology\u0027: limit_topo},"},{"line_number":275,"context_line":"                    numa_topology\u003dhuge_instance)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    @pci_fakes.patch_pci_whitelist"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_55fa7076","line":274,"updated":"2015-03-31 16:30:48.000000000","message":"Same as above.","commit_id":"641c5b62e17fdcc080890850eb1ab911a384cfd0"}],"nova/tests/unit/pci/test_manager.py":[{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"694090ee185accad79be5235da50a803e9fad6c3","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        pci_requests \u003d copy.deepcopy(fake_pci_requests)"},{"line_number":182,"context_line":"        pci_requests[0][\u0027count\u0027] \u003d 4"},{"line_number":183,"context_line":"        self.inst.vm_state \u003d vm_states.BUILDING"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        self._create_pci_requests_object(mock_get, pci_requests)"},{"line_number":186,"context_line":"        self.assertRaises(exception.PciDeviceRequestFailed,"},{"line_number":187,"context_line":"                          self.tracker.update_pci_for_instance,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_a72635cc","line":184,"updated":"2014-12-11 20:14:47.000000000","message":"I see that you modified existing unit tests where you set the vm_state. Do you need to add other tests where vm_state is something other than BUILDING?","commit_id":"0878a710173a57e0bc720b818a9586c520042068"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"73bbde6fc4ff97f98c3509088dafff912fb7dc0d","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        pci_requests \u003d copy.deepcopy(fake_pci_requests)"},{"line_number":182,"context_line":"        pci_requests[0][\u0027count\u0027] \u003d 4"},{"line_number":183,"context_line":"        self.inst.vm_state \u003d vm_states.BUILDING"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        self._create_pci_requests_object(mock_get, pci_requests)"},{"line_number":186,"context_line":"        self.assertRaises(exception.PciDeviceRequestFailed,"},{"line_number":187,"context_line":"                          self.tracker.update_pci_for_instance,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_72e24230","line":184,"in_reply_to":"3a961159_a72635cc","updated":"2014-12-12 00:54:54.000000000","message":"for boundary condition testing it in the following cases:\ntest_pci_update_bound\n\nhere the state is ensure we testing the \u0027allocation\u0027 operations. so modify exist test case is reasonable and other states is tested.","commit_id":"0878a710173a57e0bc720b818a9586c520042068"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e7a3edc0f16b9a0a86574a16416f36f9d8856feb","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                                                    sign\u003d1)"},{"line_number":201,"context_line":"        self.assertIsNone(devs)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":204,"context_line":"    def test_update_pci_for_instance_with_numa(self, mock_get):"},{"line_number":205,"context_line":"        fake_db_dev_3 \u003d dict(fake_db_dev_1, id\u003d4, address\u003d\u00270000:00:00.4\u0027)"},{"line_number":206,"context_line":"        fake_devs_numa \u003d copy.deepcopy(fake_db_devs)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_a630679f","line":203,"updated":"2015-04-08 16:10:44.000000000","message":"IMHO, you should reflect that you\u0027re not checking the same method by renaming this test","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e7a3edc0f16b9a0a86574a16416f36f9d8856feb","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        self.assertEqual(\u0027v1\u0027, free_devs[1][\u0027vendor_id\u0027])"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":224,"context_line":"    def test_update_pci_for_instance_with_numa_fail(self, mock_get):"},{"line_number":225,"context_line":"        self._create_pci_requests_object(mock_get, fake_pci_requests)"},{"line_number":226,"context_line":"        self.inst.numa_topology \u003d objects.InstanceNUMATopology("},{"line_number":227,"context_line":"                    cells\u003d[objects.InstanceNUMACell("}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_26f697d7","line":224,"updated":"2015-04-08 16:10:44.000000000","message":"IMHO, you should reflect that you\u0027re not checking the same method by renaming this test","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"ac81024b1db15b03a49d05e4b04f29fa57de01e8","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        self.assertEqual(\u0027v1\u0027, free_devs[1][\u0027vendor_id\u0027])"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":224,"context_line":"    def test_update_pci_for_instance_with_numa_fail(self, mock_get):"},{"line_number":225,"context_line":"        self._create_pci_requests_object(mock_get, fake_pci_requests)"},{"line_number":226,"context_line":"        self.inst.numa_topology \u003d objects.InstanceNUMATopology("},{"line_number":227,"context_line":"                    cells\u003d[objects.InstanceNUMACell("}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_43c6ed68","line":224,"in_reply_to":"9aa53dc9_26f697d7","updated":"2015-04-10 02:04:12.000000000","message":"Done","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e7a3edc0f16b9a0a86574a16416f36f9d8856feb","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        self.assertIsNone(self.tracker.claim_instance(None, self.inst))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":233,"context_line":"    def test_update_pci_for_instance_deleted(self, mock_get):"},{"line_number":234,"context_line":"        self.inst.vm_state \u003d vm_states.BUILDING"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        self._create_pci_requests_object(mock_get, fake_pci_requests)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_8627a363","line":233,"updated":"2015-04-08 16:10:44.000000000","message":"ditto","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"ac81024b1db15b03a49d05e4b04f29fa57de01e8","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        self.assertIsNone(self.tracker.claim_instance(None, self.inst))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":233,"context_line":"    def test_update_pci_for_instance_deleted(self, mock_get):"},{"line_number":234,"context_line":"        self.inst.vm_state \u003d vm_states.BUILDING"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        self._create_pci_requests_object(mock_get, fake_pci_requests)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa53dc9_63cd7184","line":233,"in_reply_to":"9aa53dc9_8627a363","updated":"2015-04-10 02:04:12.000000000","message":"Done","commit_id":"df5980d277ba089de918816959e361ea831e7350"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"fae5f245734aea9922d31c5ae9a34ec8392ad76e","unresolved":false,"context_lines":[{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        self.tracker.pci_devs \u003d []"},{"line_number":313,"context_line":"        self.tracker.claim_instance(None, self.inst)"},{"line_number":314,"context_line":"        self.assertFalse(pci_free.called)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":317,"context_line":"    def test_clean_usage_claims(self, mock_get):"}],"source_content_type":"text/x-python","patch_set":25,"id":"7aaa499b_9565731f","line":314,"updated":"2015-04-15 15:30:23.000000000","message":"What\u0027s this test for?","commit_id":"d24126f78cac824433c2f6d6fabe80dbcd0720b2"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"eb92bc53ac5ce5ae637d28ed42d812ee82cbdb1e","unresolved":false,"context_lines":[{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        self.tracker.pci_devs \u003d []"},{"line_number":313,"context_line":"        self.tracker.claim_instance(None, self.inst)"},{"line_number":314,"context_line":"        self.assertFalse(pci_free.called)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":317,"context_line":"    def test_clean_usage_claims(self, mock_get):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5aa745d1_5c3434dd","line":314,"in_reply_to":"7aaa499b_9565731f","updated":"2015-04-16 12:22:17.000000000","message":"done","commit_id":"d24126f78cac824433c2f6d6fabe80dbcd0720b2"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c17dc04a7969c891c719a697c9af8bf3c13be014","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                         set([\u0027v\u0027, \u0027v1\u0027]))"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":246,"context_line":"    def test_update_pci_for_instance_resize_source(self, mock_get):"},{"line_number":247,"context_line":"        self._create_pci_requests_object(mock_get, fake_pci_requests)"},{"line_number":248,"context_line":"        self.tracker.update_pci_for_instance(None, self.inst)"},{"line_number":249,"context_line":"        free_devs \u003d self.tracker.pci_stats.get_free_devs()"}],"source_content_type":"text/x-python","patch_set":26,"id":"7ad32947_2eb11b90","side":"PARENT","line":246,"updated":"2015-04-28 11:02:56.000000000","message":"Hmmm so I am not super happy that we are removing tests for these cases. We still want to make sure this works.\n\nIt seems like the test_tracker.py could be a good place to add some of this as it completely disregards PCI devices at this moment","commit_id":"1e3412deeca725cc3ecfd12ff4e185515f9fda1b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c17dc04a7969c891c719a697c9af8bf3c13be014","unresolved":false,"context_lines":[{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":234,"context_line":"    def test_update_pci_for_instance_deleted(self, mock_get):"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        self._create_pci_requests_object(mock_get, fake_pci_requests)"},{"line_number":237,"context_line":"        self.tracker.claim_instance(None, self.inst)"},{"line_number":238,"context_line":"        free_devs \u003d self.tracker.pci_stats.get_free_devs()"}],"source_content_type":"text/x-python","patch_set":26,"id":"7ad32947_6eb4b3f1","line":235,"updated":"2015-04-28 11:02:56.000000000","message":"Random whitespace :(","commit_id":"2b3b22ebf9ab63087e787f1100d396aca9fdf09e"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"44d3c9bc6862235452427dd0f8c22a6b2a06032e","unresolved":false,"context_lines":[{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    @mock.patch(\u0027nova.objects.InstancePCIRequests.get_by_instance\u0027)"},{"line_number":234,"context_line":"    def test_update_pci_for_instance_deleted(self, mock_get):"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        self._create_pci_requests_object(mock_get, fake_pci_requests)"},{"line_number":237,"context_line":"        self.tracker.claim_instance(None, self.inst)"},{"line_number":238,"context_line":"        free_devs \u003d self.tracker.pci_stats.get_free_devs()"}],"source_content_type":"text/x-python","patch_set":26,"id":"5ad0253b_40a0adf4","line":235,"in_reply_to":"7ad32947_6eb4b3f1","updated":"2015-04-29 07:59:40.000000000","message":"Done","commit_id":"2b3b22ebf9ab63087e787f1100d396aca9fdf09e"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"cef3b104bb31347d84ed839eb1be9ef3defabb82","unresolved":false,"context_lines":[{"line_number":3547,"context_line":"                                            instance,"},{"line_number":3548,"context_line":"                                            image_meta)"},{"line_number":3549,"context_line":"        with mock.patch.object(pci_manager, \u0027get_instance_pci_devs\u0027,"},{"line_number":3550,"context_line":"                               return_value\u003dpci_list):"},{"line_number":3551,"context_line":"            cfg \u003d drvr._get_guest_config(instance, [], {}, disk_info)"},{"line_number":3552,"context_line":""},{"line_number":3553,"context_line":"        had_pci \u003d 0"}],"source_content_type":"text/x-python","patch_set":26,"id":"9abe1de1_b4ca394e","line":3550,"updated":"2015-04-27 13:13:53.000000000","message":"In this change needed any more?","commit_id":"2b3b22ebf9ab63087e787f1100d396aca9fdf09e"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"cef3b104bb31347d84ed839eb1be9ef3defabb82","unresolved":false,"context_lines":[{"line_number":3591,"context_line":"                                            instance,"},{"line_number":3592,"context_line":"                                            image_meta)"},{"line_number":3593,"context_line":"        with mock.patch.object(pci_manager, \u0027get_instance_pci_devs\u0027,"},{"line_number":3594,"context_line":"                               return_value\u003dpci_list):"},{"line_number":3595,"context_line":"            cfg \u003d drvr._get_guest_config(instance, [], {}, disk_info)"},{"line_number":3596,"context_line":"        had_pci \u003d 0"},{"line_number":3597,"context_line":"        # care only about the PCI devices"}],"source_content_type":"text/x-python","patch_set":26,"id":"9abe1de1_74c4a13f","line":3594,"updated":"2015-04-27 13:13:53.000000000","message":"ditto","commit_id":"2b3b22ebf9ab63087e787f1100d396aca9fdf09e"}]}
