)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c580d5662dbd642d56a80acab0af886d8417ef4d","unresolved":false,"context_lines":[{"line_number":17,"context_line":"We should just load up the pci_passthrough_whitelist (if set)"},{"line_number":18,"context_line":"when starting the nova-compute service so we can fail fast and"},{"line_number":19,"context_line":"kill the service on any misconfiguration rather than run with"},{"line_number":20,"context_line":"a broken service."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: If50fb837b490042bb5ef20e9ad843b28f871a44e"},{"line_number":23,"context_line":"Closes-Bug: #1603034"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fad55976_b1e3b004","line":20,"updated":"2016-07-16 19:09:27.000000000","message":"For the record, I agree with this fail-fast approach. In fact, I think we should fail fast for ALL things that the resource tracker or compute manager need to communicate with. I stated this in the following bug:\n\nhttps://bugs.launchpad.net/nova/+bug/1357453\n\nUnfortunately, a number of folks including Sahid and Sylvain were worried that adding checks to the constructor of the resource tracker would \"slow down\" the startup of nova-compute. :( In addition, there were comments that we don\u0027t want to stop the resource tracker from starting up if we can\u0027t connect to the message bus/DB and instead keep retrying to connect to the message bus/DB. I think that is a bad approach, personally. IMHO, we should do all things necessary in the constructor of the resource tracker to ensure that the resource tracker actually *works*, and error out on any failed check.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"}],"nova/compute/manager.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"53c140f43c839b85845039bf63c97e3a405a1d2d","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_2bda1879","line":1132,"updated":"2016-07-18 05:13:05.000000000","message":"@Raghuveer: I don\u0027t see how this patch would change anything about that event other than move the failure from the update_available_resource() call to earlier in the nova-compute worker startup.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c580d5662dbd642d56a80acab0af886d8417ef4d","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fad55976_d1e8e4e4","line":1132,"updated":"2016-07-16 19:09:27.000000000","message":"@ludovic: I\u0027ve been wanting to do that (create the resource tracker instance on startup of the nova-compute) for ages. Every time I push patches that try to do that, I get push back saying that it would \"slow down the nova-compute startup\" (as if that is a valid concern...) or that the nova-compute worker should create the resource tracker \"on demand\" and deal with failures by retrying the creation of connections to things like the message bus. :( See https://bugs.launchpad.net/nova/+bug/1357453 for more information.\n@mriedem: Killing the update available resources greenlet is indeed bad, which is why we should do this type of validation on nova-compute initialization!","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03a1f413dc41b04ccb102b051925dfd1401207b2","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_663a87cf","line":1132,"updated":"2016-07-18 06:04:58.000000000","message":"@raghuveer: In the scenario that you describe, I don\u0027t see how this patch would change anything. The whitelist would still be valid. The eth0 PF would be assigned to a VM but that doesn\u0027t make the pci_passthrough_whitelist CONF option invalid.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"76ce02a070c8529632082c840f35cd7f7449e683","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_4b7cac20","line":1132,"updated":"2016-07-18 05:30:18.000000000","message":"@rughaveer: Simply repeating your previous comment verbatim doesn\u0027t make it any more clear. In what way does *this patch* change the behaviour you are describing? The PCI passthrough whitelist is the thing that specifies the PCI devices that may be assigned to a VM. This patch changes the validation of that configuration option to be done at nova-compute startup instead of inside the update_available_resource() periodic task. What does your \"allow me to create a VM with PF or VF on eth0\" scenario have to do with where the validation of the whitelist CONF option is done?","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":15130,"name":"Sonu","email":"sonu.sudhakaran@gmail.com","username":"sonu"},"change_message_id":"5ce1dad13d2ae6217f2a49411aa9948544902ea7","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_2953ef6d","line":1132,"range":{"start_line":1132,"start_character":0,"end_line":1132,"end_character":12},"updated":"2016-07-15 05:48:30.000000000","message":"For a wrong value in whitelist, should we penalize many correct entries? It is a case of validation, where errors are reported, but doesn\u0027t bring down the entire system.\n\nDetection of wrong entries can be done using logs or nova pci stat apis (bp - https://review.openstack.org/#/c/342001/)","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":10368,"name":"Raghuveer Shenoy","email":"rshenoy@hpe.com","username":"RaghuveerShenoy"},"change_message_id":"829c2875cacdf4a79d44187cd70b703c7133ee48","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_b89f2b64","line":1132,"range":{"start_line":1132,"start_character":62,"end_line":1132,"end_character":63},"updated":"2016-07-15 03:37:54.000000000","message":"I think, your fix will create another problem. Consider the below valid pci_whitelist:\npci_passthrough_whitelist \u003d [ {\"devname\": \"eth0\", \"physical_network\": \"physnet1\"},{\"physical_network\": \"physnet1\", \"address\": \"*:04:00.0\"},{\"physical_network\": \"physnet2\", \"address\": \"*:04:00.1\"}]\n\nThis whitelist will allow me to create a VM with PF or VF on eth0. Now if I create a PCI Passthrough VM using PF on eth0, the device will disappear from hypervisor since VM took the device. Now if I restart the nova compute service, your fix will cause the nova compute service to go down and it never comes up because eth0 is not present on hypervisor.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"564ec66b77744a4ed224ddc13d504746fa80fe69","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_e52755b3","line":1132,"updated":"2016-07-14 23:26:52.000000000","message":"I\u0027m wondering if trying to create the resource tracker here would be a more generic solution for this kind of issue.\n\nI\u0027m just thinking that trying to do so would maybe avoid other issues like this one that would kill the periodic task because of misconfiguration or the like.\n\nSee https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L543","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"25a3064689b4cc9644a5125fd45ba64db712cd43","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_c63093a1","line":1132,"updated":"2016-07-18 06:22:20.000000000","message":"Sorry, I\u0027m just not seeing what you\u0027re seeing. I don\u0027t see any problem with what you are describing. If the nova-compute fails to start because a user has consumed a PF that was providing VFs in a previous valid whitelist configuration value, then it\u0027s absolutely appropriate for the nova-compute not to start. The admin should fix the whitelist to be valid for the new environment now that the user has consumed the PF. What am I missing here? :(","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":15130,"name":"Sonu","email":"sonu.sudhakaran@gmail.com","username":"sonu"},"change_message_id":"66270f3b61a6ac448a319b953657ba6f6f24056d","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_6905f712","line":1132,"range":{"start_line":1132,"start_character":0,"end_line":1132,"end_character":12},"updated":"2016-07-15 05:53:56.000000000","message":"This creates a false failure when the a pci device is made passthrough to the Guest. Once the pci device is attached to the guest, it disappears from the Host, and the Whitelist validation will always Fail with PCI device not found.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fe555c179433d0a852ed312f4bd46e45e2e5c724","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fad55976_caa9c3e1","line":1132,"range":{"start_line":1132,"start_character":0,"end_line":1132,"end_character":12},"in_reply_to":"1aa78d24_01d87a7e","updated":"2016-07-15 14:19:57.000000000","message":"So.....it sounds like the pci whitelist is basically a minefield. The reason I went with this is because there are at least a half dozen PCI related exceptions that can come out of constructing the whitelist and I didn\u0027t want to blanket catch NovaException in the resource tracker, and I don\u0027t want to catch like 6+ individual PCI exceptions, which could change over time. We could have a base PCI exception for all of these types of issues and handle that, but it sounds like those might *always* happen depending on what changes on the host.\n\nSo really this is all terrible, but killing the available resources task for hitting something in this minefield is really bad.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"d3d17454b3bd44fe7f2568d29e7a503d8e9b0d3d","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_01d87a7e","line":1132,"range":{"start_line":1132,"start_character":0,"end_line":1132,"end_character":12},"in_reply_to":"1aa78d24_6905f712","updated":"2016-07-15 12:47:50.000000000","message":"I think you are right, specifying the whitelist with \"devname\" seems to be broken for this case.  Restarting nova compute with a PCI device already attached to a guest will fail.  But using \"address\" would still work.\n\nI think most people are configuring the \"whitelist\" using \"address\", that might explain why we never catch this issue before.\n\nOne solution might be to get the information from the hypervisor.  We are already syncing the PCI devices with the hypervisor: https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L443\n\nIf we can\u0027t find the device (by name), I think the hypervisor has the information for resolving the PCI by name to PCI address.  But needs to be validated.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":15130,"name":"Sonu","email":"sonu.sudhakaran@gmail.com","username":"sonu"},"change_message_id":"12d2d8986dbf5fca755e78ad7d2fcd44ba64f6f4","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_e102af3d","line":1132,"in_reply_to":"dada55a8_27606d35","updated":"2016-07-19 02:01:28.000000000","message":"I also think, Whitelist syntax should be validated, and if any error found n-cmp should exit with appropriate error code.\nAlso, I see the need of strictly validating each PCI device entry (bus address or devname) in the whitelist for its availability on the Host. If the device is not found on Host, can a check to the hypervisor driver be made for the device already assigned to Guest?\nAlternatively, if PCI device \u0027devname\u0027 is also stored as extra info in the pci_devices stat then such checks can be made within the resource tracker.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":10368,"name":"Raghuveer Shenoy","email":"rshenoy@hpe.com","username":"RaghuveerShenoy"},"change_message_id":"68c5c451786892a919e1b8cf4b4bd3ca9af41276","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_4bf94cc8","line":1132,"in_reply_to":"dada55a8_2bda1879","updated":"2016-07-18 05:21:37.000000000","message":"@Jay, I agree with your comments if it was only for invalid entries. But consider the scenario with valid pci_whiltelist entry as follow (sorry for repeating):\n\npci_passthrough_whitelist \u003d [ {\"devname\": \"eth0\", \"physical_network\": \"physnet1\"},{\"physical_network\": \"physnet1\", \"address\": \"*:04:00.0\"},{\"physical_network\": \"physnet2\", \"address\": \"*:04:00.1\"}]\nThis whitelist will allow me to create a VM with PF or VF on eth0. Now if I create a PCI Passthrough VM using PF on eth0, the device will disappear from hypervisor since VM took the device. Now if I restart the nova compute service, your fix will cause the nova compute service to go down and it never comes up because eth0 is not present on hypervisor.\n\nIMHO, the fix should take care of all the scenarios not just invalid entries from user.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":10368,"name":"Raghuveer Shenoy","email":"rshenoy@hpe.com","username":"RaghuveerShenoy"},"change_message_id":"ebdc7459a3139bb5ebc8f2fdfda95dc776a9b5ad","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_4bb02c8c","line":1132,"in_reply_to":"dada55a8_4b7cac20","updated":"2016-07-18 05:57:47.000000000","message":"@Jay, I am not sure how I can explain better. I think, Ludovic, Andrew and Matt were able to understand the scenario. Let me try to explain you with steps:\n\n1. Update the pci_whitelist as below:\npci_passthrough_whitelist \u003d [ {\"devname\": \"eth0\", \"physical_network\": \"physnet1\"},{\"physical_network\": \"physnet1\", \"address\": \"*:04:00.0\"},{\"physical_network\": \"physnet2\", \"address\": \"*:04:00.1\"}]\n\n2. Now the validation passes since the entries are correct.\n3. Now create a PCI Passthrough VM as follows:\n   a. neutron port-create $net --vnic-type\u003ddirect-physical\n     This creates a neutron port on physnet1 say with port_id\u003d\"abcd\"\n   b. Now boot a VM with this port.Assume this takes PF eth0.\n4. Now try to restart the nova compute service.\n5. With the fix proposed, Nova compute service will not come up because the device \"eth0\" has been assigned to VM. Now the parsing of whitelist fails saying \"eth0\" not found. \n6. Without the fix, compute service will come up but periodic resource tracker will be stopped. This is also bad.\n\nI agree that the proposed fix is not changing the existing behaviour with resource tracker, but it will not resolve the issue.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":10368,"name":"Raghuveer Shenoy","email":"rshenoy@hpe.com","username":"RaghuveerShenoy"},"change_message_id":"7a79b80c177e2761494cdaac77a8514585119e6b","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_26a52f04","line":1132,"in_reply_to":"dada55a8_663a87cf","updated":"2016-07-18 06:13:32.000000000","message":"@Jay, As you said the pci_whitelist still valid. But the check fails because eth0 had been given to VM and this makes it unavailable for the hypervisor and when we restart the compute service, Whitelist/pciDevSpec object tries to get the PCI address of the dev name \"eth0\" specified in the pci_whitelist which it wont get it and raises the exception.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"3c8226a6c8a12aced60756b11ed9fd187312fc28","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_bf93cba2","line":1132,"in_reply_to":"dada55a8_880fb3e0","updated":"2016-07-18 15:19:41.000000000","message":"IMHO, unless there\u0027s a syntax error in the configuration, we should never see errors using the whitelist. If the whitelist refers to a device which does not currently exist on the host, that\u0027s fine - it should silently return 0 matches in that case - it certainly should never raise an exception.\n\nThe whitelist is merely expressing a list of permitted devices - it says nothing about whether those devices have to actually exist or not.\n\nIOW, I think this change is wrong - we should be fixing the whitelist to not ever raise exceptions when matching devices.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a224abae17d3727236042efd8f5b1fef81f3669","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_880fb3e0","line":1132,"in_reply_to":"dada55a8_af2c42ac","updated":"2016-07-18 14:03:02.000000000","message":"So we think it\u0027s reasonable for the admin to set a config option, which can be invalidated simply by a user using the system, and thus breaking resource tracking for the entire compute host? That seems bonkers to me.\n\nI admittedly don\u0027t understand how all of the pcidevtracker and pci whitelist code works, but this seems ridiculously fragile.\n\nWhat I\u0027m hearing is basically in the Whitelist code that\u0027s parsing the whitelist and the entries, it should catch and swallow any exceptions and just log them as warnings because we can\u0027t trust any of this.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":10368,"name":"Raghuveer Shenoy","email":"rshenoy@hpe.com","username":"RaghuveerShenoy"},"change_message_id":"22edead757a220e6825b843bcab862733741a18b","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_27606d35","line":1132,"in_reply_to":"dada55a8_bf93cba2","updated":"2016-07-18 16:42:08.000000000","message":"@Matt, @Daniel, +1 from me about this new thought. IMO, Whitelist code should catch the exception and log warning/error/exception based on the failure. It should not kill the resource tracker because of any failure.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":10368,"name":"Raghuveer Shenoy","email":"rshenoy@hpe.com","username":"RaghuveerShenoy"},"change_message_id":"9a273292b9d6101e2fdec21a672ff7eee707c2a4","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_41092d31","line":1132,"in_reply_to":"dada55a8_c63093a1","updated":"2016-07-18 07:22:49.000000000","message":"@Jay, so the expectation is that the admin will change the pci_whitelist if he consumed devname for PF. This could work for nova compute restart case. \n\nBut then this fix will not address periodic resource tracker failure. As soon as PF is consumed by VM, resource tracker will stop sending periodic update. This is because, as per current code, for every resource tracker update, code is trying to parse and validate the pci_whitelist.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":15130,"name":"Sonu","email":"sonu.sudhakaran@gmail.com","username":"sonu"},"change_message_id":"e007eadac6226f8c7eed5d9dd02acdedd503c6a0","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_af2c42ac","line":1132,"in_reply_to":"dada55a8_c63093a1","updated":"2016-07-18 12:59:19.000000000","message":"Jay This looks to be not reasonable to have admin change the whitelist parameter after every boot of a VM with PCI PT network function.\nI do not think it is appropriate either to modify the whitelist parameter automatically, once the PCI PF is assigned to Guest.\n\nI could only think of option to check if the PCI device is assigned to a VM or not thr\u0027 hypervisor interfaces such as Libvirt.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"},{"author":{"_account_id":10368,"name":"Raghuveer Shenoy","email":"rshenoy@hpe.com","username":"RaghuveerShenoy"},"change_message_id":"1cba1d600a2e81bc44734955d9d8447307b0d460","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"            # So load up the whitelist when starting the compute service to"},{"line_number":1130,"context_line":"            # flush any invalid configuration early so we can kill the service"},{"line_number":1131,"context_line":"            # if the configuration is wrong."},{"line_number":1132,"context_line":"            whitelist.Whitelist(CONF.pci_passthrough_whitelist)"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"        self.driver.init_host(host\u003dself.host)"},{"line_number":1135,"context_line":"        context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_f5390343","line":1132,"in_reply_to":"fad55976_d1e8e4e4","updated":"2016-07-18 03:51:22.000000000","message":"@Jay: Please note that this fix has side effects on some other scenario. As I mentioned in my earlier comment this fix could cause nova compute to stop even when the entries are valid.","commit_id":"3a61ae35d4b713f423219c7b714126e1584694e8"}]}
