)]}'
{"specs/newton/approved/resource-providers-allocations.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f60a408138971b572de72176ac862b146bd194a4","unresolved":false,"context_lines":[{"line_number":120,"context_line":"To recap from the `resource-providers` spec, the `allocations` table schema"},{"line_number":121,"context_line":"looks like so::"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    CREATE TABLE allocations ("},{"line_number":124,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":125,"context_line":"        resource_provider_id INT UNSIGNED NOT NULL,"},{"line_number":126,"context_line":"        consumer_id VARCHAR(64) NOT NULL,"}],"source_content_type":"text/x-rst","patch_set":1,"id":"dab17558_abcea9b1","line":123,"updated":"2016-05-09 14:24:07.000000000","message":"We need to be explicit about which DB this goes in, the API DB (yes) or the cell DB (no).","commit_id":"3c3eeb83923a18e2f0317be273c512939ce9b947"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"70fa1204def68329715595850c57a4e65e2da4c2","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    CREATE TABLE allocations ("},{"line_number":126,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":127,"context_line":"        resource_provider_id INT UNSIGNED NOT NULL,"},{"line_number":128,"context_line":"        consumer_id VARCHAR(64) NOT NULL,"},{"line_number":129,"context_line":"        resource_class_id INT UNSIGNED NOT NULL,"},{"line_number":130,"context_line":"        used INT UNSIGNED NOT NULL,"}],"source_content_type":"text/x-rst","patch_set":2,"id":"dab17558_f2c9985a","line":127,"range":{"start_line":127,"start_character":8,"end_line":127,"end_character":51},"updated":"2016-05-10 10:11:43.000000000","message":"nit: \naccording to the reviews in generic-resource-pools, it\u0027s better to add a foreign key constraint here.","commit_id":"63a0088f9043fdcd7216de75fc0b0f7bde3db6a2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"02e6cb0381820d467eb9779bf57e8c37e56a64f0","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"A method on the `nova.object.ComputeNode` object called"},{"line_number":161,"context_line":"`_migrate_allocations()` will be introduced that will be triggered when the"},{"line_number":162,"context_line":"object code detects an unmigrated compute node object."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"Specifically, the following data migrations will be performed in"},{"line_number":165,"context_line":"`_migrate_allocations()`.The `_migrate_allocations()` method should be a"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dab17558_11aff12a","line":162,"updated":"2016-05-16 12:39:18.000000000","message":"@dansmith: the reason I had it done in the compute node was because if we do it in the instance, the compute node\u0027s inventory won\u0027t be updated atomically in a single transaction and therefore there will be some undefined amount of time when the allocations table will have only *some* of the allocation records for that compute node. This will cause scheduling issues, since the new query that grabs compute node allocation information from the allocations table will see a non-zero-but-inaccurate number for usages. We need to migrate all the allocations for the compute node at the same time unfortunately.\n\nIt will not necessarily cause a database storm, however. Only compute nodes that have had resources allocated or deallocated from them will send an updated compute node object to the database. Compute nodes that don\u0027t have their inventory or allocations updated won\u0027t send an updated ComputeNode object.","commit_id":"d762f2b6100f4f4205723d23142da97dea479d93"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"004cf075f6fed81dbd7aff8eadbb8c5f7cbc2ea5","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"A method on the `nova.object.ComputeNode` object called"},{"line_number":161,"context_line":"`_migrate_allocations()` will be introduced that will be triggered when the"},{"line_number":162,"context_line":"object code detects an unmigrated compute node object."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"Specifically, the following data migrations will be performed in"},{"line_number":165,"context_line":"`_migrate_allocations()`.The `_migrate_allocations()` method should be a"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dab17558_3490634e","line":162,"updated":"2016-05-13 16:27:14.000000000","message":"This is not how I had imagined it. IMHO, inventory is something the compute node owns, which is why we migrate those on save for the compute node.\n\nTo me, the allocation is an instance-centric thing, so I would think we\u0027d want to do the migration then and there.\n\nIf we do this during compute node save, then within 60 seconds of upgrading, every compute node will be trying to migrate every instance in the whole deployment. That will create a huge storm all at once, which has to complete pretty quickly. If we do this per instance, like we did for flavors, then we\u0027re migrating only instances that we touch/create and can do the rest in the background as a metered background task.","commit_id":"d762f2b6100f4f4205723d23142da97dea479d93"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2f8a609326382bd57f4fe3697f729d108f406bc6","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"A method on the `nova.object.ComputeNode` object called"},{"line_number":161,"context_line":"`_migrate_allocations()` will be introduced that will be triggered when the"},{"line_number":162,"context_line":"object code detects an unmigrated compute node object."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"Specifically, the following data migrations will be performed in"},{"line_number":165,"context_line":"`_migrate_allocations()`.The `_migrate_allocations()` method should be a"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bab6814e_28338d15","line":162,"in_reply_to":"dab17558_11aff12a","updated":"2016-05-20 21:29:43.000000000","message":"I guess that\u0027s because you\u0027re thinking we need to subtract instances that are represented by an allocation from the free_gb (for example) values? I was assuming that we would have a cutover, where the scheduler filter that considers allocations would not be used until all instance records have been migrated. It doesn\u0027t seem important to me to try to have both the existing and new allocation/inventory scheduler filters included right away.\n\nActually, even if we did, wouldn\u0027t the new filter just see the compute nodes as largely unused and pass them all, and the existing filters would do the right thing? As we start to write allocation records, then the new filter would start to \"work\". There\u0027s no reason we can\u0027t keep reporting the same free_* values in the compute node like we do today so that the current filters continue to work if enabled, right?\n\nEither way, migrating all the instances on a given compute node as soon as that compute node detects a change in resources seems like it will still cause a run on the DB. Like, free_memory changes by small amounts all the time, especially if you restart the service?","commit_id":"d762f2b6100f4f4205723d23142da97dea479d93"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b49698f9d02ca9091969228444a22f4aeac01522","unresolved":false,"context_lines":[{"line_number":164,"context_line":"Specifically, the following data migrations will be performed in"},{"line_number":165,"context_line":"`_migrate_allocations()`.The `_migrate_allocations()` method should be a"},{"line_number":166,"context_line":"`@remotable` method that uses a single database transaction to ensure all DB"},{"line_number":167,"context_line":"writes are done atomically."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"1) Grab the list of instances that are active on the compute node."},{"line_number":170,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"dab17558_84644222","line":167,"updated":"2016-05-16 11:30:28.000000000","message":"Is it usual for \"private\" methods to be @remotable?","commit_id":"d762f2b6100f4f4205723d23142da97dea479d93"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"004cf075f6fed81dbd7aff8eadbb8c5f7cbc2ea5","unresolved":false,"context_lines":[{"line_number":223,"context_line":"    WHERE resource_provider_id \u003d $COMPUTE_NODE_UUID;"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"2) Code that *writes* allocation field changes is entirely in the"},{"line_number":226,"context_line":"   `nova.objects.Instance` object\u0027s `save()` method. Where code that currently"},{"line_number":227,"context_line":"   writes a serialized `nova.objects.Flavor` to the `instance_extra.flavor`"},{"line_number":228,"context_line":"   field, we will want to *also* write records to the `allocations` table for"},{"line_number":229,"context_line":"   the various resource classes consumed by the instance. We won\u0027t change the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dab17558_343a2335","line":226,"range":{"start_line":226,"start_character":3,"end_line":226,"end_character":44},"updated":"2016-05-13 16:27:14.000000000","message":"Isn\u0027t this in conflict with most of everything above that talks about doing it in the compute node? I\u0027m very confused.","commit_id":"d762f2b6100f4f4205723d23142da97dea479d93"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"004cf075f6fed81dbd7aff8eadbb8c5f7cbc2ea5","unresolved":false,"context_lines":[{"line_number":247,"context_line":"-----------------"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"The Allocations table will be moved from the cell database to the API database."},{"line_number":250,"context_line":"Otherwise, no new tables, new fields or changed fields will be needed."},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"Transparent (to the caller) changes in the object models."},{"line_number":253,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"dab17558_d4c63715","line":250,"updated":"2016-05-13 16:27:14.000000000","message":"This is true, but since we\u0027re not writing anything there yet, I\u0027d almost just say we ignore the moving and just say that it is \"created\" in the api database.","commit_id":"d762f2b6100f4f4205723d23142da97dea479d93"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"d165d366e13579884cf00d48246f0484cde3314c","unresolved":false,"context_lines":[{"line_number":158,"context_line":"be rows the `allocations` table."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"A method on the `nova.object.Instance` object called `_migrate_allocations()`"},{"line_number":161,"context_line":"will be introduced that will be triggered when the object code detects an"},{"line_number":162,"context_line":"unmigrated instance object."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"Specifically, the following data migrations will be performed in"},{"line_number":165,"context_line":"`_migrate_allocations()`.The `_migrate_allocations()` method should use a"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bab6814e_c89ee562","line":162,"range":{"start_line":161,"start_character":63,"end_line":162,"end_character":26},"updated":"2016-05-24 06:36:50.000000000","message":"So this spec is to gradually migrate resource usages to inventory records for all the *detected* instances and newly created instances. \n\nHow to migrate all the undetected instance, and make sure all the instances are migrated finally?","commit_id":"6e421bf7415ba7150e6194bdae0b90491afa062b"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"d165d366e13579884cf00d48246f0484cde3314c","unresolved":false,"context_lines":[{"line_number":165,"context_line":"`_migrate_allocations()`.The `_migrate_allocations()` method should use a"},{"line_number":166,"context_line":"single database transaction to ensure all DB writes are done atomically."},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"2) Grab the `nova.objects.Flavor` object representing the **current** instance"},{"line_number":169,"context_line":"   type that the instance is consuming on the host."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"3) Insert one record each for RAM and vCPUs into the `allocations` table. Use"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bab6814e_08258dad","line":168,"range":{"start_line":168,"start_character":0,"end_line":168,"end_character":2},"updated":"2016-05-24 06:36:50.000000000","message":"nit:\nstart from 1)","commit_id":"6e421bf7415ba7150e6194bdae0b90491afa062b"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"d165d366e13579884cf00d48246f0484cde3314c","unresolved":false,"context_lines":[{"line_number":180,"context_line":"   the sum of the `root_gb`, `ephemeral_gb`, and `swap` field values of the"},{"line_number":181,"context_line":"   flavor. The `resource_provider_id` field value should be looked up in the"},{"line_number":182,"context_line":"   `resource_providers` table where the `uuid` field matches the compute node\u0027s"},{"line_number":183,"context_line":"   `uuid` field value.*or* the generic resource pool\u0027s provider ID if the"},{"line_number":184,"context_line":"   compute node is associated to an aggregate that is tied to a resource pool"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"5) If the `instance_extra.numa_topology` is not None, insert one record in the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bab6814e_88d05df9","line":183,"range":{"start_line":183,"start_character":21,"end_line":183,"end_character":22},"updated":"2016-05-24 06:36:50.000000000","message":"nit: ,","commit_id":"6e421bf7415ba7150e6194bdae0b90491afa062b"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"d165d366e13579884cf00d48246f0484cde3314c","unresolved":false,"context_lines":[{"line_number":255,"context_line":"Other deployer impact"},{"line_number":256,"context_line":"---------------------"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"We should add an execution piece to the `nova-manage db online_migrations`"},{"line_number":259,"context_line":"command that can batch-process the allocation data migrations for instances."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"Developer impact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bab6814e_4811555d","line":258,"range":{"start_line":258,"start_character":41,"end_line":258,"end_character":73},"updated":"2016-05-24 06:36:50.000000000","message":"The allocation migration process won\u0027t be started until this command is executed?\n\nOr is it doing the final migrations for all the undetected instances as described in comment #162?","commit_id":"6e421bf7415ba7150e6194bdae0b90491afa062b"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"0b2f86e5a15d3934712543ec1c929c56b2862849","unresolved":false,"context_lines":[{"line_number":255,"context_line":"Other deployer impact"},{"line_number":256,"context_line":"---------------------"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"We should add an execution piece to the `nova-manage db online_migrations`"},{"line_number":259,"context_line":"command that can batch-process the allocation data migrations for instances."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"Developer impact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9abb7d3a_5e3bc2eb","line":258,"range":{"start_line":258,"start_character":41,"end_line":258,"end_character":73},"in_reply_to":"bab6814e_4811555d","updated":"2016-05-27 15:41:56.000000000","message":"Yes, this is the typical approach. You can let the migrations happen gradually, or you can run them at once. For large deployments, the gradual approach has many benefits.","commit_id":"6e421bf7415ba7150e6194bdae0b90491afa062b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"627226f61ac49e1bda013254a6b29e2e74f88cc3","unresolved":false,"context_lines":[{"line_number":42,"context_line":"`add_allocations()` will be called when an instance claims resources on the"},{"line_number":43,"context_line":"local compute node (either a new instance or a migrated instance)."},{"line_number":44,"context_line":"`delete_allocations()` will be called when an instance is terminated or"},{"line_number":45,"context_line":"migrated off of the compute node."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"These calls to `ResourceProvider.add_allocations()` and"},{"line_number":48,"context_line":"`ResourceProvider.delete_allocations()` will be made **in adddition to** the"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_597a1b89","line":45,"updated":"2016-07-06 23:06:52.000000000","message":"The current stack of code is not doing this exactly, but intending the resource tracker to do this via the placement API instead of directly (at least by my read of the ordering of the patches).\n\nI realize that we may end up short-circuiting the placement API if time becomes tight, but I don\u0027t think that we should act like the short-circuited approach is our goal, as I believe the above does.\n\nSo I would prefer that we describe the desired long-term situation, and put a comment below that to indicate that we may do something hacky-er in the meantime if required.\n\nAlternately, we could go ahead and give up on the by-API approach for newton, make allocations directly as we do with inventories, and just mention here what the long-term goal is.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"854aa656eb02ed7d487217b6201d9eb00785aff1","unresolved":false,"context_lines":[{"line_number":42,"context_line":"`add_allocations()` will be called when an instance claims resources on the"},{"line_number":43,"context_line":"local compute node (either a new instance or a migrated instance)."},{"line_number":44,"context_line":"`delete_allocations()` will be called when an instance is terminated or"},{"line_number":45,"context_line":"migrated off of the compute node."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"These calls to `ResourceProvider.add_allocations()` and"},{"line_number":48,"context_line":"`ResourceProvider.delete_allocations()` will be made **in adddition to** the"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_cd5765c8","line":45,"updated":"2016-07-07 01:32:38.000000000","message":"Yeah, so we dropped the ball with the placement API\u0027s dealing of allocation records. :( We totally forgot to include REST API calls in the proposed placement API for setting and deleting allocation records for a resource provider. I\u0027ve pushed up an amended generic-resource-pools spec that adds these new REST API calls and I\u0027ll amend this spec to reference those new placement API calls and have the resource tracker call that instead of using objects.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2690b9f351f5badc682cb94525051db22e77e908","unresolved":false,"context_lines":[{"line_number":48,"context_line":"`ResourceProvider.delete_allocations()` will be made **in adddition to** the"},{"line_number":49,"context_line":"existing calls to `ComputeNode.save()` and `Instance.save()` that currently"},{"line_number":50,"context_line":"save allocation and usage information in the child cell `instance_extra` and"},{"line_number":51,"context_line":"`compute_nodes` tables."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Alternatives"},{"line_number":54,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_134b9eca","line":51,"updated":"2016-07-05 18:34:10.000000000","message":"@bauzas: I\u0027m talking about the claim process above...","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5d132c0f16f2b61413615833a9e76fb650419bdd","unresolved":false,"context_lines":[{"line_number":48,"context_line":"`ResourceProvider.delete_allocations()` will be made **in adddition to** the"},{"line_number":49,"context_line":"existing calls to `ComputeNode.save()` and `Instance.save()` that currently"},{"line_number":50,"context_line":"save allocation and usage information in the child cell `instance_extra` and"},{"line_number":51,"context_line":"`compute_nodes` tables."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Alternatives"},{"line_number":54,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3aaa91ec_dffca440","line":51,"updated":"2016-06-28 14:44:25.000000000","message":"to be clear, don\u0027t forget we save those when also claiming for the instance (calling the private _save() method), but that\u0027s an implementation detail.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"854aa656eb02ed7d487217b6201d9eb00785aff1","unresolved":false,"context_lines":[{"line_number":62,"context_line":"-----------------"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"The Allocations table will be moved from the cell database to the API database."},{"line_number":65,"context_line":"Otherwise, no new tables, new fields or changed fields will be needed."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"REST API impact"},{"line_number":68,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_ad5ad9ef","line":65,"updated":"2016-07-07 01:32:38.000000000","message":"Fixed.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"627226f61ac49e1bda013254a6b29e2e74f88cc3","unresolved":false,"context_lines":[{"line_number":62,"context_line":"-----------------"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"The Allocations table will be moved from the cell database to the API database."},{"line_number":65,"context_line":"Otherwise, no new tables, new fields or changed fields will be needed."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"REST API impact"},{"line_number":68,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_d9c28b84","line":65,"updated":"2016-07-06 23:06:52.000000000","message":"This isn\u0027t true, they\u0027re already there:\n\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/016_resource_providers.py#L76","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"627226f61ac49e1bda013254a6b29e2e74f88cc3","unresolved":false,"context_lines":[{"line_number":98,"context_line":"Developer impact"},{"line_number":99,"context_line":"----------------"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"None. Calling interfaces for `ComputeNode` and `Instance` objects stay the"},{"line_number":102,"context_line":"same for the existing allocation fields. `ComputeNode` object shall get two new"},{"line_number":103,"context_line":"methods `get_allocations()` and `set_allocations()` that the resource tracker"},{"line_number":104,"context_line":"will use **in addition to its current action of setting ComputeNode allocation"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_b9405f08","line":101,"range":{"start_line":101,"start_character":0,"end_line":101,"end_character":5},"updated":"2016-07-06 23:06:52.000000000","message":"LOL.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"854aa656eb02ed7d487217b6201d9eb00785aff1","unresolved":false,"context_lines":[{"line_number":102,"context_line":"same for the existing allocation fields. `ComputeNode` object shall get two new"},{"line_number":103,"context_line":"methods `get_allocations()` and `set_allocations()` that the resource tracker"},{"line_number":104,"context_line":"will use **in addition to its current action of setting ComputeNode allocation"},{"line_number":105,"context_line":"fields manually**."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Implementation"},{"line_number":108,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_0d768d6f","line":105,"updated":"2016-07-07 01:32:38.000000000","message":"Removed. Leftover from earlier. Fixed now.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"627226f61ac49e1bda013254a6b29e2e74f88cc3","unresolved":false,"context_lines":[{"line_number":102,"context_line":"same for the existing allocation fields. `ComputeNode` object shall get two new"},{"line_number":103,"context_line":"methods `get_allocations()` and `set_allocations()` that the resource tracker"},{"line_number":104,"context_line":"will use **in addition to its current action of setting ComputeNode allocation"},{"line_number":105,"context_line":"fields manually**."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Implementation"},{"line_number":108,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_995ac3f0","line":105,"updated":"2016-07-06 23:06:52.000000000","message":"Wait, what? Why are we putting these on compute node? I thought you wanted to move the existing {create,update}_inventory() methods from computenode to resourceprovider?","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"854aa656eb02ed7d487217b6201d9eb00785aff1","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"3) Insert **one** record for the DISK resource class. The amount used should be"},{"line_number":168,"context_line":"   the sum of the `root_gb`, `ephemeral_gb`, and `swap` field values of the"},{"line_number":169,"context_line":"   flavor. The `resource_provider_id` field value should be looked up in the"},{"line_number":170,"context_line":"   `resource_providers` table where the `uuid` field matches the compute node\u0027s"},{"line_number":171,"context_line":"   `uuid` field value.*or* the generic resource pool\u0027s provider ID if the"},{"line_number":172,"context_line":"   compute node is associated to an aggregate that is tied to a resource pool"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_ed706174","line":169,"updated":"2016-07-07 01:32:38.000000000","message":"Done.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2690b9f351f5badc682cb94525051db22e77e908","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"3) Insert **one** record for the DISK resource class. The amount used should be"},{"line_number":168,"context_line":"   the sum of the `root_gb`, `ephemeral_gb`, and `swap` field values of the"},{"line_number":169,"context_line":"   flavor. The `resource_provider_id` field value should be looked up in the"},{"line_number":170,"context_line":"   `resource_providers` table where the `uuid` field matches the compute node\u0027s"},{"line_number":171,"context_line":"   `uuid` field value.*or* the generic resource pool\u0027s provider ID if the"},{"line_number":172,"context_line":"   compute node is associated to an aggregate that is tied to a resource pool"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_f34532b3","line":169,"updated":"2016-07-05 18:34:10.000000000","message":"I wasn\u0027t planning on having a 0-amount usage record written for volume-backed (nor instances with their disk image on shared storage) to the allocations table for the DISK_GB resource class and the resource provider ID of the compute node, no. There would be a usage record written for the shared storage case, however, but the resource provider ID will be that of the shared storage pool, not the compute node.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"484e7efe610ea4888b57a4c3c5b77e4c2b92f5ef","unresolved":false,"context_lines":[{"line_number":164,"context_line":"   `resource_class_id` field shall contain the identifier for the appropriate"},{"line_number":165,"context_line":"   resource class (either RAM or vCPU)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"3) Insert **one** record for the DISK resource class. The amount used should be"},{"line_number":168,"context_line":"   the sum of the `root_gb`, `ephemeral_gb`, and `swap` field values of the"},{"line_number":169,"context_line":"   flavor. The `resource_provider_id` field value should be looked up in the"},{"line_number":170,"context_line":"   `resource_providers` table where the `uuid` field matches the compute node\u0027s"},{"line_number":171,"context_line":"   `uuid` field value.*or* the generic resource pool\u0027s provider ID if the"},{"line_number":172,"context_line":"   compute node is associated to an aggregate that is tied to a resource pool"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3aaa91ec_65e51aa7","line":169,"range":{"start_line":167,"start_character":54,"end_line":169,"end_character":10},"updated":"2016-06-28 17:09:45.000000000","message":"Is there ever a case where a volume-backed instance will have a total allocation of zero for the host, since it doesn\u0027t use host disk resources? If so, we will write a zero allocation record?","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"627226f61ac49e1bda013254a6b29e2e74f88cc3","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"3) Insert **one** record for the DISK resource class. The amount used should be"},{"line_number":168,"context_line":"   the sum of the `root_gb`, `ephemeral_gb`, and `swap` field values of the"},{"line_number":169,"context_line":"   flavor. The `resource_provider_id` field value should be looked up in the"},{"line_number":170,"context_line":"   `resource_providers` table where the `uuid` field matches the compute node\u0027s"},{"line_number":171,"context_line":"   `uuid` field value.*or* the generic resource pool\u0027s provider ID if the"},{"line_number":172,"context_line":"   compute node is associated to an aggregate that is tied to a resource pool"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_792f173f","line":169,"in_reply_to":"1aa78d24_c7478b49","updated":"2016-07-06 23:06:52.000000000","message":"Agree it would be good to see that in black-and-white here.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"8bcea8718bc94563600747ffeeb9c4f0077ec8eb","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"3) Insert **one** record for the DISK resource class. The amount used should be"},{"line_number":168,"context_line":"   the sum of the `root_gb`, `ephemeral_gb`, and `swap` field values of the"},{"line_number":169,"context_line":"   flavor. The `resource_provider_id` field value should be looked up in the"},{"line_number":170,"context_line":"   `resource_providers` table where the `uuid` field matches the compute node\u0027s"},{"line_number":171,"context_line":"   `uuid` field value.*or* the generic resource pool\u0027s provider ID if the"},{"line_number":172,"context_line":"   compute node is associated to an aggregate that is tied to a resource pool"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_c7478b49","line":169,"in_reply_to":"1aa78d24_f34532b3","updated":"2016-07-05 21:34:40.000000000","message":"OK, that\u0027s what I was hoping to hear. The text doesn\u0027t say that, though, so maybe clarify that if you re-spin.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"22f36a9db2ab438204875d6052239f1139e6c8f8","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"3) Insert **one** record for the DISK resource class. The amount used should be"},{"line_number":168,"context_line":"   the sum of the `root_gb`, `ephemeral_gb`, and `swap` field values of the"},{"line_number":169,"context_line":"   flavor. The `resource_provider_id` field value should be looked up in the"},{"line_number":170,"context_line":"   `resource_providers` table where the `uuid` field matches the compute node\u0027s"},{"line_number":171,"context_line":"   `uuid` field value.*or* the generic resource pool\u0027s provider ID if the"},{"line_number":172,"context_line":"   compute node is associated to an aggregate that is tied to a resource pool"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_33f21a70","line":169,"in_reply_to":"1aa78d24_f34532b3","updated":"2016-07-05 18:37:42.000000000","message":"Okay. That\u0027s what I expected but I wanted to see it written out to avoid confusion on the reviews later.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"0606be87be435c59e0a9ac8ceaaccec26fac1c0d","unresolved":false,"context_lines":[{"line_number":164,"context_line":"   `resource_class_id` field shall contain the identifier for the appropriate"},{"line_number":165,"context_line":"   resource class (either RAM or vCPU)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"3) Insert **one** record for the DISK resource class. The amount used should be"},{"line_number":168,"context_line":"   the sum of the `root_gb`, `ephemeral_gb`, and `swap` field values of the"},{"line_number":169,"context_line":"   flavor. The `resource_provider_id` field value should be looked up in the"},{"line_number":170,"context_line":"   `resource_providers` table where the `uuid` field matches the compute node\u0027s"},{"line_number":171,"context_line":"   `uuid` field value.*or* the generic resource pool\u0027s provider ID if the"},{"line_number":172,"context_line":"   compute node is associated to an aggregate that is tied to a resource pool"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3aaa91ec_27ab0f20","line":169,"range":{"start_line":167,"start_character":54,"end_line":169,"end_character":10},"in_reply_to":"3aaa91ec_65e51aa7","updated":"2016-06-28 20:02:43.000000000","message":"It is possible, if not now it will be in the future, for a volume backed instance to have an allocation of 0. I would also like to know if these 0 usage records will be written to the db.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5d132c0f16f2b61413615833a9e76fb650419bdd","unresolved":false,"context_lines":[{"line_number":198,"context_line":"  jaypipes"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"Other contributors:"},{"line_number":201,"context_line":"  cdent"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Work Items"},{"line_number":204,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3aaa91ec_bf1b98c9","line":201,"updated":"2016-06-28 14:44:25.000000000","message":"Count me in.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"484e7efe610ea4888b57a4c3c5b77e4c2b92f5ef","unresolved":false,"context_lines":[{"line_number":198,"context_line":"  jaypipes"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"Other contributors:"},{"line_number":201,"context_line":"  cdent"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Work Items"},{"line_number":204,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3aaa91ec_2502f23e","line":201,"in_reply_to":"3aaa91ec_bf1b98c9","updated":"2016-06-28 17:09:45.000000000","message":"I\u0027m game, too.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"627226f61ac49e1bda013254a6b29e2e74f88cc3","unresolved":false,"context_lines":[{"line_number":211,"context_line":"  `ResourceProvider.delete_allocations()` from the resource tracker when an"},{"line_number":212,"context_line":"  allocation (or freeing) occurs."},{"line_number":213,"context_line":"* Full functional integration tests added which validates that the allocations"},{"line_number":214,"context_line":"  table in the API database is being populated with proper data."},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"Dependencies"},{"line_number":217,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_d9e56b09","line":214,"updated":"2016-07-06 23:06:52.000000000","message":"You said you were adding new things to ComputeNode above, but maybe that was just left-over from previous iterations?","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"854aa656eb02ed7d487217b6201d9eb00785aff1","unresolved":false,"context_lines":[{"line_number":211,"context_line":"  `ResourceProvider.delete_allocations()` from the resource tracker when an"},{"line_number":212,"context_line":"  allocation (or freeing) occurs."},{"line_number":213,"context_line":"* Full functional integration tests added which validates that the allocations"},{"line_number":214,"context_line":"  table in the API database is being populated with proper data."},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"Dependencies"},{"line_number":217,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_4d6c159c","line":214,"updated":"2016-07-07 01:32:38.000000000","message":"yeah...","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"854aa656eb02ed7d487217b6201d9eb00785aff1","unresolved":false,"context_lines":[{"line_number":222,"context_line":"  because it ensures each compute node is added as a resource provider with a"},{"line_number":223,"context_line":"  UUID."},{"line_number":224,"context_line":"* The `allocations` table and object models need to be migrated from the cell"},{"line_number":225,"context_line":"  database to the API database."},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"Testing"},{"line_number":228,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_2d6709b8","line":225,"updated":"2016-07-07 01:32:38.000000000","message":"Done.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"627226f61ac49e1bda013254a6b29e2e74f88cc3","unresolved":false,"context_lines":[{"line_number":221,"context_line":"* `compute-node-inventory-newton` blueprint must be completed before this one"},{"line_number":222,"context_line":"  because it ensures each compute node is added as a resource provider with a"},{"line_number":223,"context_line":"  UUID."},{"line_number":224,"context_line":"* The `allocations` table and object models need to be migrated from the cell"},{"line_number":225,"context_line":"  database to the API database."},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"Testing"},{"line_number":228,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_59c05b50","line":225,"range":{"start_line":224,"start_character":0,"end_line":225,"end_character":31},"updated":"2016-07-06 23:06:52.000000000","message":"This should be removed.","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"627226f61ac49e1bda013254a6b29e2e74f88cc3","unresolved":false,"context_lines":[{"line_number":235,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"Developer docs should be added that detail the new `allocations` table and"},{"line_number":238,"context_line":"object models."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"References"},{"line_number":241,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_f998277a","line":238,"updated":"2016-07-06 23:06:52.000000000","message":"But you said no developer impact! :P\n\nSeriously though, do we have developer docs for other tables and objects?","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"854aa656eb02ed7d487217b6201d9eb00785aff1","unresolved":false,"context_lines":[{"line_number":235,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"Developer docs should be added that detail the new `allocations` table and"},{"line_number":238,"context_line":"object models."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"References"},{"line_number":241,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1aa78d24_8d08bddb","line":238,"updated":"2016-07-07 01:32:38.000000000","message":"I\u0027ll add devref docs for the whole resource-providers modeling and placement API....","commit_id":"9d30f3deebfeb8573d380251f3b9c7451c92eeea"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"811569d0cd873bd0895c8ecf5145f6b59e43647f","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"We propose to have the resource tracker populate allocation information in the"},{"line_number":41,"context_line":"API database by calling two new placement REST API methods."},{"line_number":42,"context_line":"`POST /allocations` will be called when an instance claims resources on the"},{"line_number":43,"context_line":"local compute node (either a new instance or a migrated instance)."},{"line_number":44,"context_line":"`DELETE /allocations` will be called when an instance is terminated or"},{"line_number":45,"context_line":"migrated off of the compute node."}],"source_content_type":"text/x-rst","patch_set":7,"id":"1aa78d24_484210af","line":42,"range":{"start_line":42,"start_character":1,"end_line":42,"end_character":5},"updated":"2016-07-07 18:49:03.000000000","message":"This was PUT when I last looked.","commit_id":"a98a752c68a7109a2f22768cfbeb5df095014d88"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"811569d0cd873bd0895c8ecf5145f6b59e43647f","unresolved":false,"context_lines":[{"line_number":210,"context_line":"* `compute-node-inventory-newton` blueprint must be completed before this one"},{"line_number":211,"context_line":"  because it ensures each compute node is added as a resource provider with a"},{"line_number":212,"context_line":"  UUID."},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"Testing"},{"line_number":215,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"1aa78d24_28d984f3","line":213,"updated":"2016-07-07 18:49:03.000000000","message":"generic-resource-pools was called out above as being necessary as well.","commit_id":"a98a752c68a7109a2f22768cfbeb5df095014d88"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"65792a265ed47bece2eb129b3f67a15133056ac2","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"We propose to have the resource tracker populate allocation information in the"},{"line_number":41,"context_line":"API database by calling two new placement REST API methods.  `PUT"},{"line_number":42,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":43,"context_line":"instance claims resources on the local compute node (either a new instance or a"},{"line_number":44,"context_line":"migrated instance).  `DELETE"},{"line_number":45,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"}],"source_content_type":"text/x-rst","patch_set":9,"id":"1aa78d24_58888c71","line":42,"updated":"2016-07-11 21:52:31.000000000","message":"/allocations/...","commit_id":"f4e05aafaa6297fc812eea351122c21a362ca685"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b456fc1389849447475d6c5bb90cda05511cd870","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"We propose to have the resource tracker populate allocation information in the"},{"line_number":41,"context_line":"API database by calling two new placement REST API methods.  `PUT"},{"line_number":42,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":43,"context_line":"instance claims resources on the local compute node (either a new instance or a"},{"line_number":44,"context_line":"migrated instance).  `DELETE"},{"line_number":45,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"}],"source_content_type":"text/x-rst","patch_set":9,"id":"1aa78d24_b841b065","line":42,"in_reply_to":"1aa78d24_58888c71","updated":"2016-07-11 22:15:02.000000000","message":"Done","commit_id":"f4e05aafaa6297fc812eea351122c21a362ca685"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"65792a265ed47bece2eb129b3f67a15133056ac2","unresolved":false,"context_lines":[{"line_number":42,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":43,"context_line":"instance claims resources on the local compute node (either a new instance or a"},{"line_number":44,"context_line":"migrated instance).  `DELETE"},{"line_number":45,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":46,"context_line":"instance is terminated or migrated off of the compute node."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"These calls to will be made **in adddition to** the existing calls to"}],"source_content_type":"text/x-rst","patch_set":9,"id":"1aa78d24_d8947c8c","line":45,"updated":"2016-07-11 21:52:31.000000000","message":"/allocations/...","commit_id":"f4e05aafaa6297fc812eea351122c21a362ca685"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b456fc1389849447475d6c5bb90cda05511cd870","unresolved":false,"context_lines":[{"line_number":42,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":43,"context_line":"instance claims resources on the local compute node (either a new instance or a"},{"line_number":44,"context_line":"migrated instance).  `DELETE"},{"line_number":45,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":46,"context_line":"instance is terminated or migrated off of the compute node."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"These calls to will be made **in adddition to** the existing calls to"}],"source_content_type":"text/x-rst","patch_set":9,"id":"1aa78d24_98467479","line":45,"in_reply_to":"1aa78d24_d8947c8c","updated":"2016-07-11 22:15:02.000000000","message":"Done","commit_id":"f4e05aafaa6297fc812eea351122c21a362ca685"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f723e7b13c5259f44df3d26d178d2cefbdeee703","unresolved":false,"context_lines":[{"line_number":37,"context_line":"Proposed change"},{"line_number":38,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"We propose to have the resource tracker populate allocation information in the"},{"line_number":41,"context_line":"API database by calling two new placement REST API methods.  `PUT"},{"line_number":42,"context_line":"/allocations/{consumer_uuid}` will be called when an instance claims resources"},{"line_number":43,"context_line":"on the local compute node (either a new instance or a migrated instance)."},{"line_number":44,"context_line":"`DELETE /allocations/{consumer_uuid}` will be called when an instance is"},{"line_number":45,"context_line":"terminated or migrated off of the compute node."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"These calls to will be made **in adddition to** the existing calls to"},{"line_number":48,"context_line":"`ComputeNode.save()` and `Instance.save()` that currently save allocation and"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_483f4925","line":45,"range":{"start_line":40,"start_character":0,"end_line":45,"end_character":47},"updated":"2016-07-25 09:41:28.000000000","message":"You should mention that the blueprint generic-resource-pools spec already has a change for adding those.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e061f3abd9b85ce991f1f98fb76d614da3dda0ee","unresolved":false,"context_lines":[{"line_number":42,"context_line":"/allocations/{consumer_uuid}` will be called when an instance claims resources"},{"line_number":43,"context_line":"on the local compute node (either a new instance or a migrated instance)."},{"line_number":44,"context_line":"`DELETE /allocations/{consumer_uuid}` will be called when an instance is"},{"line_number":45,"context_line":"terminated or migrated off of the compute node."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"These calls to will be made **in adddition to** the existing calls to"},{"line_number":48,"context_line":"`ComputeNode.save()` and `Instance.save()` that currently save allocation and"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_1d29ec89","line":45,"updated":"2016-07-25 22:55:34.000000000","message":"ok","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c354afa21d939f2720557f1238cb0f39f2dec214","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"These calls to will be made **in adddition to** the existing calls to"},{"line_number":48,"context_line":"`ComputeNode.save()` and `Instance.save()` that currently save allocation and"},{"line_number":49,"context_line":"usage information in the child cell `instance_extra` and `compute_nodes`"},{"line_number":50,"context_line":"tables."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":10,"id":"1aa78d24_5bad4f87","line":49,"range":{"start_line":49,"start_character":36,"end_line":49,"end_character":72},"updated":"2016-07-15 12:07:56.000000000","message":"Maybe reverse the order of these to match the computenode,instance order that they reference?","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e061f3abd9b85ce991f1f98fb76d614da3dda0ee","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"These calls to will be made **in adddition to** the existing calls to"},{"line_number":48,"context_line":"`ComputeNode.save()` and `Instance.save()` that currently save allocation and"},{"line_number":49,"context_line":"usage information in the child cell `instance_extra` and `compute_nodes`"},{"line_number":50,"context_line":"tables."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_7d20e89b","line":49,"updated":"2016-07-25 22:55:34.000000000","message":"done.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4421b80d155a5bdcb2a15e8aae414fcea3cb448c","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"These calls to will be made **in adddition to** the existing calls to"},{"line_number":48,"context_line":"`ComputeNode.save()` and `Instance.save()` that currently save allocation and"},{"line_number":49,"context_line":"usage information in the child cell `instance_extra` and `compute_nodes`"},{"line_number":50,"context_line":"tables."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_687ea9e5","line":49,"range":{"start_line":49,"start_character":36,"end_line":49,"end_character":72},"in_reply_to":"1aa78d24_5bad4f87","updated":"2016-07-18 21:21:17.000000000","message":"And then add, \", respectively.\" :)","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e061f3abd9b85ce991f1f98fb76d614da3dda0ee","unresolved":false,"context_lines":[{"line_number":55,"context_line":"We could continue to store allocated resource amounts in the variety of field"},{"line_number":56,"context_line":"storage formats that we currently do. However, adding new resource"},{"line_number":57,"context_line":"classes/types will almost inevitably result in yet another field being added to"},{"line_number":58,"context_line":"the database schema and a whole new way of accounting hacked into Nova."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Data model impact"},{"line_number":61,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_5d2364a7","line":58,"updated":"2016-07-25 22:55:34.000000000","message":"@mriedem: Good point on the PCI/NUMA thing. For \"regular\" non-SRIOV PCI devices, we can handle those resources just like any other, and I plan to have the resource tracker send those PCI inventory/allocation records to the placement API in Newton. For the NUMA topologies and the SR-IOV PCI devices that have a hierarchical relationship, those will need to wait until the nested resource providers work is solid and proposed for Ocata.\n\nI\u0027ve added the above information into the next revision of this spec.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4421b80d155a5bdcb2a15e8aae414fcea3cb448c","unresolved":false,"context_lines":[{"line_number":52,"context_line":"Alternatives"},{"line_number":53,"context_line":"------------"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"We could continue to store allocated resource amounts in the variety of field"},{"line_number":56,"context_line":"storage formats that we currently do. However, adding new resource"},{"line_number":57,"context_line":"classes/types will almost inevitably result in yet another field being added to"},{"line_number":58,"context_line":"the database schema and a whole new way of accounting hacked into Nova."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Data model impact"},{"line_number":61,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_88ee7d89","line":58,"range":{"start_line":55,"start_character":0,"end_line":58,"end_character":71},"updated":"2016-07-18 21:21:17.000000000","message":"The resource-providers spec and/or generic-resource-pools spec said we\u0027d be handling resource inventory/allocation for disk/cpu/ram/pci/numa but the latter two never got handled. Is this spec something to bridge that gap and if so, it might be good to explain that - i.e. why pci/numa was deferred and why we need *this* before we can handle those resources. Or am I way off? I feel like I just missed something about pci/numa and now we\u0027re here.\n\nOtherwise if this is really just, \u0027we do it this way for inventories, so this spec is really just paperwork for doing it the same way for allocations\u0027, then OK.\n\nI just got thinking about pci/numa because of the wording you have in this section, i.e. additional hacks that we\u0027re having a hard time sorting out how to deal with.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e061f3abd9b85ce991f1f98fb76d614da3dda0ee","unresolved":false,"context_lines":[{"line_number":85,"context_line":"Performance Impact"},{"line_number":86,"context_line":"------------------"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"None."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"Other deployer impact"},{"line_number":91,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_bd3a60cb","line":88,"updated":"2016-07-25 22:55:34.000000000","message":"Added wording in next revision about this.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4421b80d155a5bdcb2a15e8aae414fcea3cb448c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"Performance Impact"},{"line_number":86,"context_line":"------------------"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"None."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"Other deployer impact"},{"line_number":91,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_e8ff3932","line":88,"range":{"start_line":88,"start_character":0,"end_line":88,"end_character":4},"updated":"2016-07-18 21:21:17.000000000","message":"Really? There will at least be some API/DB overhead for making these new/duplicate calls.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f723e7b13c5259f44df3d26d178d2cefbdeee703","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"* `PUT /allocations/{consumer_uuid}`"},{"line_number":115,"context_line":"* `DELETE /allocations/{consumer_uuid}`"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"The resource tracker shall call the `PUT` API call, supplying all amounts of"},{"line_number":118,"context_line":"resources that the instance (the consumer) gets allocated on the compute node"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_088391cd","line":115,"updated":"2016-07-25 09:41:28.000000000","message":"You should make sure that people first review https://review.openstack.org/#/c/338618/ before commenting that out.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4421b80d155a5bdcb2a15e8aae414fcea3cb448c","unresolved":false,"context_lines":[{"line_number":121,"context_line":"in the request and each resource class being consumed) in a transactional"},{"line_number":122,"context_line":"manner, ensuring no partial updates."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"When an instance is terminated, the corresponding `DELETE` API call will be"},{"line_number":125,"context_line":"made from the resource tracker, which will atomically delete all allocation"},{"line_number":126,"context_line":"records for that instance (consumer) on the compute node (resource provider)."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"When constructing the payload for the `PUT` placement API call, the resource"},{"line_number":129,"context_line":"tracker should examine the `Instance` object (and/or `Migration` object) for a"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_c89fd501","line":126,"range":{"start_line":124,"start_character":0,"end_line":126,"end_character":77},"updated":"2016-07-18 21:21:17.000000000","message":"What about local deletes (our favorite terrible code in the compute API)? In that case we don\u0027t get to the nova-compute service and RT to do this cleanup, so will the compute API do it? And if so, it seems the RT doesn\u0027t even need to handle the DELETE if the compute API can do it.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e061f3abd9b85ce991f1f98fb76d614da3dda0ee","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":" * When the compute node utilizes **local storage** for instance disks and the"},{"line_number":149,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":150,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":151,"context_line":"   `resource_provider_uuid` should be the **compute node\u0027s UUID**."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":" * When the compute utilizes **shared storage** for instance disks and the"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_9d35dcdc","line":150,"updated":"2016-07-25 22:55:34.000000000","message":"@all: Yes, I think the \"honors_swap\" is more of a capability than a quantitative thing, and should be dealt with accordingly as a qualitative tag and filter.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c354afa21d939f2720557f1238cb0f39f2dec214","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":" * When the compute node utilizes **local storage** for instance disks and the"},{"line_number":149,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":150,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":151,"context_line":"   `resource_provider_uuid` should be the **compute node\u0027s UUID**."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":" * When the compute utilizes **shared storage** for instance disks and the"}],"source_content_type":"text/x-rst","patch_set":10,"id":"1aa78d24_d040fe09","line":150,"range":{"start_line":150,"start_character":65,"end_line":150,"end_character":71},"updated":"2016-07-15 12:07:56.000000000","message":"Thank you for saying \"fields of the flavor\" here. I think it\u0027s important that we distinguish from the legacy fields on the instance. Shameless plug for my series here which converts all remaining uses of the legacy fields:\n\nhttps://review.openstack.org/#/c/341049/\n\nAlso, I know that at least the hyper-v driver does not support swap today, which means that even if a flavor has swap\u003d20, the virt driver will just ignore it. If the RT reports a sum including swap, that will be inaccurate both for estimating the footprint and the remaining capacity on such a cloud. I\u0027m not sure how to address this other than by making hyper-v support swap and/or asking the virt driver some questions.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"9f15aa77263a1a98fa1ad61dfcfb83ee6e9db87f","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":" * When the compute node utilizes **local storage** for instance disks and the"},{"line_number":149,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":150,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":151,"context_line":"   `resource_provider_uuid` should be the **compute node\u0027s UUID**."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":" * When the compute utilizes **shared storage** for instance disks and the"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fad55976_11ddcb42","line":150,"in_reply_to":"1aa78d24_d040fe09","updated":"2016-07-15 16:57:05.000000000","message":"So it seems like the resource tracker making these placement calls just needs to be knowledgeable in both the target resource provider\u0027s restrictions (e.g. uses a driver that ignores swap) and the instance type (e.g. is a BFV instance that ignores root-gb). It can then compute the correct disk sizing to allocate. Would that be problematic?","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"b7a8a51a1af5328f7f1f0429397b9b5a44f31ffb","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":" * When the compute node utilizes **local storage** for instance disks and the"},{"line_number":149,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":150,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":151,"context_line":"   `resource_provider_uuid` should be the **compute node\u0027s UUID**."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":" * When the compute utilizes **shared storage** for instance disks and the"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fad55976_8a1d0069","line":150,"in_reply_to":"fad55976_11ddcb42","updated":"2016-07-15 17:28:29.000000000","message":"John: That would add a lot of complexity to a system whose goal is just to track available and consumed amounts of things. It could be done but I think we lose some of the benefit of this new model if it turns into a set of special cases.\n\nDan: That is problematic, but I wonder if we need to solve that here. I see one possible solution being that the ability to request swap space is a qualitative/capability request which could filter out hypervisors which do not honor that. So keep it outside of the resource tracker but the only requests that would get to a point of making an allocation containing swap would be requests for a hypervisor that supports swap.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4421b80d155a5bdcb2a15e8aae414fcea3cb448c","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":" * When the compute node utilizes **local storage** for instance disks and the"},{"line_number":149,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":150,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":151,"context_line":"   `resource_provider_uuid` should be the **compute node\u0027s UUID**."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":" * When the compute utilizes **shared storage** for instance disks and the"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_5c528a14","line":150,"in_reply_to":"fad55976_5457d8cd","updated":"2016-07-18 21:21:17.000000000","message":"FWIW I agree with Laski that we should fail if we can\u0027t honor a request (I\u0027m thinking file injection since that\u0027s recent for me), but with flavors it gets messy and we do run into the existing instances issue (and flavors, and behaviors) that Dan brings up. We could \u0027deprecate\u0027 the behavior, but that seems bad (fix all of your flavors or else!). For now it seems the easiest is just a capabilities flag in the virt driver which the RT checks and if swap isn\u0027t supported we don\u0027t include that in the calculation on that host.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ca99eb7b42fde0c4ee0f0f8e04a3d6b3f6e0036e","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":" * When the compute node utilizes **local storage** for instance disks and the"},{"line_number":149,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":150,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":151,"context_line":"   `resource_provider_uuid` should be the **compute node\u0027s UUID**."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":" * When the compute utilizes **shared storage** for instance disks and the"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fad55976_c11d1668","line":150,"in_reply_to":"fad55976_8a1d0069","updated":"2016-07-15 21:26:41.000000000","message":"I dunno, I think it seems really weird to have a flavor with some swap specified but that isn\u0027t honored. That\u0027s a problem we have today though.\n\nHowever, my point is just that if we do what is described here we\u0027ll be over-reporting disk space by Ngb per instance on each host where swap isn\u0027t honored. That would be a new problem, a new inconsistency in the system, which I think Jay wanted to avoid. Adding new places where we\u0027re reporting wrong resources are just more things to fix later. We could at least use a virt capabilities flag to be more righter immediately, which isn\u0027t much work.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"2f2b086a96c2aedb6ecad235eb8ec8fc03248598","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":" * When the compute node utilizes **local storage** for instance disks and the"},{"line_number":149,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":150,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":151,"context_line":"   `resource_provider_uuid` should be the **compute node\u0027s UUID**."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":" * When the compute utilizes **shared storage** for instance disks and the"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fad55976_e7878a10","line":150,"in_reply_to":"fad55976_c11d1668","updated":"2016-07-15 21:41:35.000000000","message":"Using the virt capabilities flag is inline with what I\u0027m suggesting. I think the difference may be that I think the virt capabilities should filter out requests that aren\u0027t supported, not change the reporting of those requests.\n\nSo in the swap instance if hyper-v doesn\u0027t honor swap then a flavor with !\u003d 0 swap should not be scheduled to a hyper-v host and therefore the resource tracker is not in the position of reporting a usage that isn\u0027t honored.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4af3ffaa144aea95e65e8d440f0efaea8ba5daa8","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":" * When the compute node utilizes **local storage** for instance disks and the"},{"line_number":149,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":150,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":151,"context_line":"   `resource_provider_uuid` should be the **compute node\u0027s UUID**."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":" * When the compute utilizes **shared storage** for instance disks and the"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fad55976_5457d8cd","line":150,"in_reply_to":"fad55976_e7878a10","updated":"2016-07-16 12:05:10.000000000","message":"Okay, the only problem with that is the change in behavior people will see immediately when deploying that code. It\u0027s something operators can deal with, but it might be a bit jarring for the users. I guess ops would just have to pre-fix all the flavors, but then we have the problem of relocating existing instances which have private flavors with non-zero swap.\n\nDefinitely agree that reporting what we have and restricting requests is the right plan, had we done it from the beginning. Just gotta make sure we don\u0027t make a mess.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e061f3abd9b85ce991f1f98fb76d614da3dda0ee","unresolved":false,"context_lines":[{"line_number":154,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":155,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":156,"context_line":"   `resource_provider_uuid` should be the **UUID of the resource provider of"},{"line_number":157,"context_line":"   that shared disk storage**"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":" * When the instance was booted from volume, do **NOT** include an allocation"},{"line_number":160,"context_line":"   record for `DISK_GB`."}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_fd34d8de","line":157,"updated":"2016-07-25 22:55:34.000000000","message":"@dansmith: Exactly correct. I\u0027ll modify the above to say \"Eventually, the resource provider UUID will be the shared storage provider UUID, but initially, there will not be the information available to the resource tracker to determine this UUID value until the admin creates the shared storage provider and associates it to one or more compute nodes via an aggregate.\"","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c354afa21d939f2720557f1238cb0f39f2dec214","unresolved":false,"context_lines":[{"line_number":154,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":155,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":156,"context_line":"   `resource_provider_uuid` should be the **UUID of the resource provider of"},{"line_number":157,"context_line":"   that shared disk storage**"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":" * When the instance was booted from volume, do **NOT** include an allocation"},{"line_number":160,"context_line":"   record for `DISK_GB`."}],"source_content_type":"text/x-rst","patch_set":10,"id":"1aa78d24_d098fe6c","line":157,"updated":"2016-07-15 12:07:56.000000000","message":"How are we going to know what the uuid is that we should report? I assume that this should say something like \"Eventually...\" in front right? I assume that initially we will either not report or report the wrong thing if the instance is on shared storage right?\n\nThe reason I ask is that I don\u0027t think we could do what you describe here _today_ ... right?","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"9f15aa77263a1a98fa1ad61dfcfb83ee6e9db87f","unresolved":false,"context_lines":[{"line_number":154,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":155,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":156,"context_line":"   `resource_provider_uuid` should be the **UUID of the resource provider of"},{"line_number":157,"context_line":"   that shared disk storage**"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":" * When the instance was booted from volume, do **NOT** include an allocation"},{"line_number":160,"context_line":"   record for `DISK_GB`."}],"source_content_type":"text/x-rst","patch_set":10,"id":"fad55976_31c72f47","line":157,"in_reply_to":"1aa78d24_d098fe6c","updated":"2016-07-15 16:57:05.000000000","message":"I\u0027m not so familiar with shared storage yet, but it seems like the UUID to the shared storage would be needed to provision the instance, and this would either be available internally/configured by Nova, or else passed in by the client call. Either way it seems like this UUID would be available for the RT to do the placement?","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ca99eb7b42fde0c4ee0f0f8e04a3d6b3f6e0036e","unresolved":false,"context_lines":[{"line_number":154,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":155,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":156,"context_line":"   `resource_provider_uuid` should be the **UUID of the resource provider of"},{"line_number":157,"context_line":"   that shared disk storage**"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":" * When the instance was booted from volume, do **NOT** include an allocation"},{"line_number":160,"context_line":"   record for `DISK_GB`."}],"source_content_type":"text/x-rst","patch_set":10,"id":"fad55976_a13102ef","line":157,"in_reply_to":"fad55976_31c72f47","updated":"2016-07-15 21:26:41.000000000","message":"No, it would not part of the boot request. It would be something the compute node would eventually know about the storage system it is consuming.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c354afa21d939f2720557f1238cb0f39f2dec214","unresolved":false,"context_lines":[{"line_number":157,"context_line":"   that shared disk storage**"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":" * When the instance was booted from volume, do **NOT** include an allocation"},{"line_number":160,"context_line":"   record for `DISK_GB`."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"* If the `instance_extra.numa_topology` is not None, include on allocation"},{"line_number":163,"context_line":"  record in the `PUT` payload for the `NUMA_SOCKETS`, `NUMA_CORES`, and"}],"source_content_type":"text/x-rst","patch_set":10,"id":"1aa78d24_30d6a2f1","line":160,"updated":"2016-07-15 12:07:56.000000000","message":"Don\u0027t instances booted from volume still consume swap and ephemeral space? Maybe we should just exclude the root disk here? Or maybe we should report all of the disk BDMs that are not volumes? I know that we can have multiple ephemerals in some situations and with some virt drivers.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e061f3abd9b85ce991f1f98fb76d614da3dda0ee","unresolved":false,"context_lines":[{"line_number":157,"context_line":"   that shared disk storage**"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":" * When the instance was booted from volume, do **NOT** include an allocation"},{"line_number":160,"context_line":"   record for `DISK_GB`."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"* If the `instance_extra.numa_topology` is not None, include on allocation"},{"line_number":163,"context_line":"  record in the `PUT` payload for the `NUMA_SOCKETS`, `NUMA_CORES`, and"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_dd2f5486","line":160,"updated":"2016-07-25 22:55:34.000000000","message":"Fixed.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"95ef494af0636d2af289455c474ed17159c760dd","unresolved":false,"context_lines":[{"line_number":157,"context_line":"   that shared disk storage**"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":" * When the instance was booted from volume, do **NOT** include an allocation"},{"line_number":160,"context_line":"   record for `DISK_GB`."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"* If the `instance_extra.numa_topology` is not None, include on allocation"},{"line_number":163,"context_line":"  record in the `PUT` payload for the `NUMA_SOCKETS`, `NUMA_CORES`, and"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fad55976_ad4c6977","line":160,"in_reply_to":"1aa78d24_30d6a2f1","updated":"2016-07-15 14:34:38.000000000","message":"Good catch. The DISK_GB allocation should include the sum of \u0027root_gb\u0027, \u0027ephemeral_gb\u0027, and \u0027swap\u0027 if that value is non zero. It just so happens that in BFV \u0027root_gb\u0027 is 0, but the others may not be.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"9f15aa77263a1a98fa1ad61dfcfb83ee6e9db87f","unresolved":false,"context_lines":[{"line_number":157,"context_line":"   that shared disk storage**"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":" * When the instance was booted from volume, do **NOT** include an allocation"},{"line_number":160,"context_line":"   record for `DISK_GB`."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"* If the `instance_extra.numa_topology` is not None, include on allocation"},{"line_number":163,"context_line":"  record in the `PUT` payload for the `NUMA_SOCKETS`, `NUMA_CORES`, and"}],"source_content_type":"text/x-rst","patch_set":10,"id":"fad55976_f4ebc5ae","line":160,"in_reply_to":"fad55976_ad4c6977","updated":"2016-07-15 16:57:05.000000000","message":"Please see comment above.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f723e7b13c5259f44df3d26d178d2cefbdeee703","unresolved":false,"context_lines":[{"line_number":157,"context_line":"   that shared disk storage**"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":" * When the instance was booted from volume, do **NOT** include an allocation"},{"line_number":160,"context_line":"   record for `DISK_GB`."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"* If the `instance_extra.numa_topology` is not None, include on allocation"},{"line_number":163,"context_line":"  record in the `PUT` payload for the `NUMA_SOCKETS`, `NUMA_CORES`, and"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_c8bb3974","line":160,"in_reply_to":"fad55976_f4ebc5ae","updated":"2016-07-25 09:41:28.000000000","message":"Yup, we can still have ephemeral space for BFV, nope ?\nAlso, if the above compute is not including the allocation, which one should be doing that ? Cinder, as a mid-term ? maybe, but then we\u0027re missing the openstack-client and it can be a problem for people upgrading Nova before Cinder.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e061f3abd9b85ce991f1f98fb76d614da3dda0ee","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    pinned to?\" Instead, the `allocations` table is only answering questions"},{"line_number":175,"context_line":"    about how many sockets (NUMA cells), cores, and threads an instance is"},{"line_number":176,"context_line":"    consuming."},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"* If the `pci_devices` table contains any records linking the instance UUID to"},{"line_number":179,"context_line":"  any PCI device in `ALLOCATED` status, include one allocation record for"},{"line_number":180,"context_line":"  **each type of PCI device**. The value of the record should be the total"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_3d4dd072","line":177,"updated":"2016-07-25 22:55:34.000000000","message":"I went ahead and changed this paragraph to only include the generic PCI_DEVICE resource class, not any SRIOV devices.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e061f3abd9b85ce991f1f98fb76d614da3dda0ee","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    \"PCI_SRIOV_VF\": 2"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"As an example payload, if an instance claimed 2 VCPUs, 4096GB of RAM and 10GB"},{"line_number":188,"context_line":"of disk space on shared storage, the payload constructed would look like this::"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    PUT /allocations/{instance_uuid}"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_1d50cc09","line":187,"updated":"2016-07-25 22:55:34.000000000","message":"fixed.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"90b3288bf02d5443223da8b2c517afc5f1621157","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    \"PCI_SRIOV_VF\": 2"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"As an example payload, if an instance claimed 2 VCPUs, 4096GB of RAM and 10GB"},{"line_number":188,"context_line":"of disk space on shared storage, the payload constructed would look like this::"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    PUT /allocations/{instance_uuid}"}],"source_content_type":"text/x-rst","patch_set":10,"id":"1aa78d24_85e5480a","line":187,"range":{"start_line":187,"start_character":59,"end_line":187,"end_character":61},"updated":"2016-07-12 14:12:05.000000000","message":"nit: MB","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"358c28e1ccf344f21c9bfa7815fe70147f60b9dd","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    PUT /allocations/{instance_uuid}"},{"line_number":191,"context_line":"    {"},{"line_number":192,"context_line":"      \"allocations\": {"},{"line_number":193,"context_line":"        \"{compute_node_uuid}\": {"},{"line_number":194,"context_line":"          \"VCPU\": 2,"},{"line_number":195,"context_line":"          \"MEMORY_MB\": 4096"},{"line_number":196,"context_line":"        },"}],"source_content_type":"text/x-rst","patch_set":10,"id":"1aa78d24_aeda0a49","line":193,"range":{"start_line":193,"start_character":10,"end_line":193,"end_character":27},"updated":"2016-07-11 22:57:08.000000000","message":"This would be more clear as resource_provider_uuid to show that it\u0027s more generic than just computes.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e061f3abd9b85ce991f1f98fb76d614da3dda0ee","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    PUT /allocations/{instance_uuid}"},{"line_number":191,"context_line":"    {"},{"line_number":192,"context_line":"      \"allocations\": {"},{"line_number":193,"context_line":"        \"{compute_node_uuid}\": {"},{"line_number":194,"context_line":"          \"VCPU\": 2,"},{"line_number":195,"context_line":"          \"MEMORY_MB\": 4096"},{"line_number":196,"context_line":"        },"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_7d574802","line":193,"updated":"2016-07-25 22:55:34.000000000","message":"Yeah, the reason I did this was to differentiate between a compute node and a shared storage provider...","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"2270769a6fca3df823710993452a7e85e6f2ff40","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    PUT /allocations/{instance_uuid}"},{"line_number":191,"context_line":"    {"},{"line_number":192,"context_line":"      \"allocations\": {"},{"line_number":193,"context_line":"        \"{compute_node_uuid}\": {"},{"line_number":194,"context_line":"          \"VCPU\": 2,"},{"line_number":195,"context_line":"          \"MEMORY_MB\": 4096"},{"line_number":196,"context_line":"        },"}],"source_content_type":"text/x-rst","patch_set":10,"id":"1aa78d24_897b15be","line":193,"in_reply_to":"1aa78d24_aeda0a49","updated":"2016-07-14 20:49:16.000000000","message":"As an example of the call though, I like seeing the compute and storage UUIDs spelled out explicitly.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e061f3abd9b85ce991f1f98fb76d614da3dda0ee","unresolved":false,"context_lines":[{"line_number":217,"context_line":"* Create `ResourceProvider.add_allocations()` method"},{"line_number":218,"context_line":"* Create `ResourceProvider.delete_allocations()` method"},{"line_number":219,"context_line":"* Call `ResourceProvider.add_allocations()` and"},{"line_number":220,"context_line":"  `ResourceProvider.delete_allocations()` from the resource tracker when an"},{"line_number":221,"context_line":"  allocation (or freeing) occurs."},{"line_number":222,"context_line":"* Full functional integration tests added which validates that the allocations"},{"line_number":223,"context_line":"  table in the API database is being populated with proper data."}],"source_content_type":"text/x-rst","patch_set":10,"id":"dada55a8_5d5a442b","line":220,"updated":"2016-07-25 22:55:34.000000000","message":"Fixed, sorry about that.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"2270769a6fca3df823710993452a7e85e6f2ff40","unresolved":false,"context_lines":[{"line_number":217,"context_line":"* Create `ResourceProvider.add_allocations()` method"},{"line_number":218,"context_line":"* Create `ResourceProvider.delete_allocations()` method"},{"line_number":219,"context_line":"* Call `ResourceProvider.add_allocations()` and"},{"line_number":220,"context_line":"  `ResourceProvider.delete_allocations()` from the resource tracker when an"},{"line_number":221,"context_line":"  allocation (or freeing) occurs."},{"line_number":222,"context_line":"* Full functional integration tests added which validates that the allocations"},{"line_number":223,"context_line":"  table in the API database is being populated with proper data."}],"source_content_type":"text/x-rst","patch_set":10,"id":"1aa78d24_2c7b0f7d","line":220,"updated":"2016-07-14 20:49:16.000000000","message":"Forgive my ignorance here, but I\u0027m confused by this bit here. I was thinking the placement API/service is managing the ResourceProvider entity, and that the resource tracker is not directly invoking operations on these entities, but rather via the placement API as per above (lines #117 and #124 above).\n\nSo my read was that this data model exists on the placement service side of things (roughly):\nResource Provider  --\u003e Inventory --\u003e Resource Type/Class (e.g. DISK)\n                          ^           ^ (deducts               ^\n                          |           |      from?)            |\n                          |           |                        |\nConsumer → Allocation -----------------------------------------/\n\nSo the resource tracker is not allowed to \u0027touch\u0027 any of these entities directly. Is this not accurate though?","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c354afa21d939f2720557f1238cb0f39f2dec214","unresolved":false,"context_lines":[{"line_number":217,"context_line":"* Create `ResourceProvider.add_allocations()` method"},{"line_number":218,"context_line":"* Create `ResourceProvider.delete_allocations()` method"},{"line_number":219,"context_line":"* Call `ResourceProvider.add_allocations()` and"},{"line_number":220,"context_line":"  `ResourceProvider.delete_allocations()` from the resource tracker when an"},{"line_number":221,"context_line":"  allocation (or freeing) occurs."},{"line_number":222,"context_line":"* Full functional integration tests added which validates that the allocations"},{"line_number":223,"context_line":"  table in the API database is being populated with proper data."}],"source_content_type":"text/x-rst","patch_set":10,"id":"1aa78d24_db25bf5c","line":220,"in_reply_to":"1aa78d24_2c7b0f7d","updated":"2016-07-15 12:07:56.000000000","message":"It\u0027s currently touching them, but the plan is to move that manipulation to be via the placement api completely, yeah. Eventually the placement service will detach itself such that direct manipulation is not possible.","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"9f15aa77263a1a98fa1ad61dfcfb83ee6e9db87f","unresolved":false,"context_lines":[{"line_number":217,"context_line":"* Create `ResourceProvider.add_allocations()` method"},{"line_number":218,"context_line":"* Create `ResourceProvider.delete_allocations()` method"},{"line_number":219,"context_line":"* Call `ResourceProvider.add_allocations()` and"},{"line_number":220,"context_line":"  `ResourceProvider.delete_allocations()` from the resource tracker when an"},{"line_number":221,"context_line":"  allocation (or freeing) occurs."},{"line_number":222,"context_line":"* Full functional integration tests added which validates that the allocations"},{"line_number":223,"context_line":"  table in the API database is being populated with proper data."}],"source_content_type":"text/x-rst","patch_set":10,"id":"fad55976_ff34434b","line":220,"in_reply_to":"1aa78d24_db25bf5c","updated":"2016-07-15 16:57:05.000000000","message":"Excellent, thanks!","commit_id":"38cc92e9ae81f144e9378878a978e09aabcb9092"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7de3867b1acc3d0789f4d00afd0bc0942c22186a","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"We propose to have the resource tracker populate allocation information in the"},{"line_number":41,"context_line":"API database by calling two new placement REST API methods.  `PUT"},{"line_number":42,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":43,"context_line":"instance claims resources on the local compute node (either a new instance or a"},{"line_number":44,"context_line":"migrated instance).  `DELETE"},{"line_number":45,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bacf61ea_7d378ab0","line":42,"updated":"2016-07-28 12:17:36.000000000","message":"/allocations/{consumer_uuid}","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0cd5803488385ed3f5b33f6b323d3d8a30f41ba","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"We propose to have the resource tracker populate allocation information in the"},{"line_number":41,"context_line":"API database by calling two new placement REST API methods.  `PUT"},{"line_number":42,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":43,"context_line":"instance claims resources on the local compute node (either a new instance or a"},{"line_number":44,"context_line":"migrated instance).  `DELETE"},{"line_number":45,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bacf61ea_092b5e95","line":42,"updated":"2016-07-29 20:58:50.000000000","message":"done.","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7de3867b1acc3d0789f4d00afd0bc0942c22186a","unresolved":false,"context_lines":[{"line_number":42,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":43,"context_line":"instance claims resources on the local compute node (either a new instance or a"},{"line_number":44,"context_line":"migrated instance).  `DELETE"},{"line_number":45,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":46,"context_line":"instance is terminated or migrated off of the compute node. Note that the"},{"line_number":47,"context_line":"`generic-resource-pools` spec includes the server side changes that implement"},{"line_number":48,"context_line":"the above placement REST API calls."}],"source_content_type":"text/x-rst","patch_set":12,"id":"bacf61ea_fd4b7a29","line":45,"updated":"2016-07-28 12:17:36.000000000","message":"ditto","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0cd5803488385ed3f5b33f6b323d3d8a30f41ba","unresolved":false,"context_lines":[{"line_number":42,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":43,"context_line":"instance claims resources on the local compute node (either a new instance or a"},{"line_number":44,"context_line":"migrated instance).  `DELETE"},{"line_number":45,"context_line":"/resource_providers/{uuid}/allocations/{consumer_uuid}` will be called when an"},{"line_number":46,"context_line":"instance is terminated or migrated off of the compute node. Note that the"},{"line_number":47,"context_line":"`generic-resource-pools` spec includes the server side changes that implement"},{"line_number":48,"context_line":"the above placement REST API calls."}],"source_content_type":"text/x-rst","patch_set":12,"id":"bacf61ea_691ada7e","line":45,"updated":"2016-07-29 20:58:50.000000000","message":"done.","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"feda30a0503d18db6997dbd073f65241f2d6da96","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"**NOTE**: In Newton, we plan to have the resource tracker send allocation"},{"line_number":56,"context_line":"records to the placement API for the following resource classes: `VCPU`,"},{"line_number":57,"context_line":"`MEMORY_MB`, `DISK_GB`, `PCI_DEVICE`. For NUMA topology classes and"},{"line_number":58,"context_line":"`SRIOV_NET_*`, those resource classes will be handled in Ocata when the nested"},{"line_number":59,"context_line":"resource providers work is stabilized."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"dada55a8_8f1455e9","line":57,"range":{"start_line":57,"start_character":24,"end_line":57,"end_character":37},"updated":"2016-07-26 15:54:57.000000000","message":"well, we already create/update inventories for CPU/RAM/DISK but not for PCI devices. I saw your comment on PS10 and I\u0027m fine with you addressing the gap in a later implementation, but wanted to make things clear that it\u0027s not done yet.","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0cd5803488385ed3f5b33f6b323d3d8a30f41ba","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"**NOTE**: In Newton, we plan to have the resource tracker send allocation"},{"line_number":56,"context_line":"records to the placement API for the following resource classes: `VCPU`,"},{"line_number":57,"context_line":"`MEMORY_MB`, `DISK_GB`, `PCI_DEVICE`. For NUMA topology classes and"},{"line_number":58,"context_line":"`SRIOV_NET_*`, those resource classes will be handled in Ocata when the nested"},{"line_number":59,"context_line":"resource providers work is stabilized."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"bacf61ea_491f166c","line":57,"updated":"2016-07-29 20:58:50.000000000","message":"yup.","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7de3867b1acc3d0789f4d00afd0bc0942c22186a","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"* `PUT /resource-providers/{uuid}/allocations/{consumer_uuid}`"},{"line_number":126,"context_line":"* `DELETE /resource-providers/{uuid}/allocations/{consumer_uuid}`"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"The resource tracker shall call the `PUT` API call, supplying all amounts of"},{"line_number":129,"context_line":"resources that the instance (the consumer) gets allocated on the compute node"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bacf61ea_1d6ace80","line":126,"updated":"2016-07-28 12:17:36.000000000","message":"/allocations/{consumer_uuid}","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0cd5803488385ed3f5b33f6b323d3d8a30f41ba","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"* `PUT /resource-providers/{uuid}/allocations/{consumer_uuid}`"},{"line_number":126,"context_line":"* `DELETE /resource-providers/{uuid}/allocations/{consumer_uuid}`"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"The resource tracker shall call the `PUT` API call, supplying all amounts of"},{"line_number":129,"context_line":"resources that the instance (the consumer) gets allocated on the compute node"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bacf61ea_a910525a","line":126,"updated":"2016-07-29 20:58:50.000000000","message":"done","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0cd5803488385ed3f5b33f6b323d3d8a30f41ba","unresolved":false,"context_lines":[{"line_number":128,"context_line":"The resource tracker shall call the `PUT` API call, supplying all amounts of"},{"line_number":129,"context_line":"resources that the instance (the consumer) gets allocated on the compute node"},{"line_number":130,"context_line":"(the resource provider). The `PUT` API call writes all of the allocation"},{"line_number":131,"context_line":"records (one for each resource class being consumed) in a transactional manner,"},{"line_number":132,"context_line":"ensuring no partial updates."},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"When an instance is terminated, the corresponding `DELETE` API call will be"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bacf61ea_89158e4a","line":131,"updated":"2016-07-29 20:58:50.000000000","message":"@bauzas: correct.","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"feda30a0503d18db6997dbd073f65241f2d6da96","unresolved":false,"context_lines":[{"line_number":128,"context_line":"The resource tracker shall call the `PUT` API call, supplying all amounts of"},{"line_number":129,"context_line":"resources that the instance (the consumer) gets allocated on the compute node"},{"line_number":130,"context_line":"(the resource provider). The `PUT` API call writes all of the allocation"},{"line_number":131,"context_line":"records (one for each resource class being consumed) in a transactional manner,"},{"line_number":132,"context_line":"ensuring no partial updates."},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"When an instance is terminated, the corresponding `DELETE` API call will be"}],"source_content_type":"text/x-rst","patch_set":12,"id":"dada55a8_af55d91e","line":131,"range":{"start_line":131,"start_character":58,"end_line":131,"end_character":78},"updated":"2016-07-26 15:54:57.000000000","message":"just to be clear (because I reviewed the server-side spec), you\u0027re planning to do a single HTTP PUT method with all the allocations as part of the payload (the \"one for each\" wording confused me first by thinking it was separate HTTP calls for every allocation until I remembered that the API allows a multiple allocation for the same consumer)","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0cd5803488385ed3f5b33f6b323d3d8a30f41ba","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"When an instance is terminated, the corresponding `DELETE` API call will be"},{"line_number":135,"context_line":"made from the resource tracker, which will atomically delete all allocation"},{"line_number":136,"context_line":"records for that instance (consumer) on the compute node (resource provider)."},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"When constructing the payload for the `PUT` placement API call, the resource"},{"line_number":139,"context_line":"tracker should examine the `Instance` object (and/or `Migration` object) for a"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bacf61ea_e90eca39","line":136,"updated":"2016-07-29 20:58:50.000000000","message":"@bauzas: yes, absolutely correct.","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"feda30a0503d18db6997dbd073f65241f2d6da96","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"When an instance is terminated, the corresponding `DELETE` API call will be"},{"line_number":135,"context_line":"made from the resource tracker, which will atomically delete all allocation"},{"line_number":136,"context_line":"records for that instance (consumer) on the compute node (resource provider)."},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"When constructing the payload for the `PUT` placement API call, the resource"},{"line_number":139,"context_line":"tracker should examine the `Instance` object (and/or `Migration` object) for a"}],"source_content_type":"text/x-rst","patch_set":12,"id":"dada55a8_8a6603b9","line":136,"updated":"2016-07-26 15:54:57.000000000","message":"So we assume that our soft deleted instances only triggered by the API codebase will be synchronized about resource usage only once the compute noticies it has to delete the instance, right? I\u0027m fine with that, I just want to make clear that resource tracking was and is always a compute service duty where we only decrement resource usage by there.","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"feda30a0503d18db6997dbd073f65241f2d6da96","unresolved":false,"context_lines":[{"line_number":166,"context_line":"   creates a resource provider for the shared storage pool and associates that"},{"line_number":167,"context_line":"   provider to a compute node via a host aggregate association, there is no way"},{"line_number":168,"context_line":"   for the resource tracker to know what the UUID of that shared storage"},{"line_number":169,"context_line":"   provider will be."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"* If the `pci_devices` table contains any records linking the instance UUID to"},{"line_number":172,"context_line":"  any PCI device in `ALLOCATED` status, create one allocation record for"}],"source_content_type":"text/x-rst","patch_set":12,"id":"dada55a8_aaee67ea","line":169,"updated":"2016-07-26 15:54:57.000000000","message":"That means the original problem of shared resources counted multiple times can\u0027t be fixed until we land the client side. Fair enough.","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e0cd5803488385ed3f5b33f6b323d3d8a30f41ba","unresolved":false,"context_lines":[{"line_number":166,"context_line":"   creates a resource provider for the shared storage pool and associates that"},{"line_number":167,"context_line":"   provider to a compute node via a host aggregate association, there is no way"},{"line_number":168,"context_line":"   for the resource tracker to know what the UUID of that shared storage"},{"line_number":169,"context_line":"   provider will be."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"* If the `pci_devices` table contains any records linking the instance UUID to"},{"line_number":172,"context_line":"  any PCI device in `ALLOCATED` status, create one allocation record for"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bacf61ea_c90b0629","line":169,"updated":"2016-07-29 20:58:50.000000000","message":"Yes, true.","commit_id":"2aff459eded0e908aadfc78aa48476baf9d94acd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2f4ac9289030e093d3d1b09531276f4456002f66","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"In the `compute-node-inventory-newton` work, we populate the new"},{"line_number":21,"context_line":"resource-providers `inventories` table in the API database by having the"},{"line_number":22,"context_line":"resource tracker simulataneously write data to both the child cell database via"},{"line_number":23,"context_line":"the existing `ComputeNode.save()` call as well as write to the new"},{"line_number":24,"context_line":"resource-providers `inventories` table in the API database by a new"},{"line_number":25,"context_line":"`ResourceProvider.set_inventory()` call."}],"source_content_type":"text/x-rst","patch_set":13,"id":"bacf61ea_b6bfcd5f","line":22,"updated":"2016-08-01 14:50:11.000000000","message":"done.","commit_id":"d20cdbcebad2e2b843ccae572f4a78f7a42bac79"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"cf38c7152ed57b4a5f271af3ccc3e34fe679df01","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"In the `compute-node-inventory-newton` work, we populate the new"},{"line_number":21,"context_line":"resource-providers `inventories` table in the API database by having the"},{"line_number":22,"context_line":"resource tracker simulataneously write data to both the child cell database via"},{"line_number":23,"context_line":"the existing `ComputeNode.save()` call as well as write to the new"},{"line_number":24,"context_line":"resource-providers `inventories` table in the API database by a new"},{"line_number":25,"context_line":"`ResourceProvider.set_inventory()` call."}],"source_content_type":"text/x-rst","patch_set":13,"id":"bacf61ea_6f97573a","line":22,"range":{"start_line":22,"start_character":17,"end_line":22,"end_character":32},"updated":"2016-08-01 06:55:20.000000000","message":"nit: simultaneously","commit_id":"d20cdbcebad2e2b843ccae572f4a78f7a42bac79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2f4ac9289030e093d3d1b09531276f4456002f66","unresolved":false,"context_lines":[{"line_number":47,"context_line":"`generic-resource-pools` spec includes the server side changes that implement"},{"line_number":48,"context_line":"the above placement REST API calls."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"These calls to will be made **in adddition to** the existing calls to"},{"line_number":51,"context_line":"`ComputeNode.save()` and `Instance.save()` that currently save allocation and"},{"line_number":52,"context_line":"usage information in the child cell `compute_nodes` and `instance_extra`"},{"line_number":53,"context_line":"tables, respectively."}],"source_content_type":"text/x-rst","patch_set":13,"id":"bacf61ea_96c289e7","line":50,"updated":"2016-08-01 14:50:11.000000000","message":"done.","commit_id":"d20cdbcebad2e2b843ccae572f4a78f7a42bac79"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"cf38c7152ed57b4a5f271af3ccc3e34fe679df01","unresolved":false,"context_lines":[{"line_number":47,"context_line":"`generic-resource-pools` spec includes the server side changes that implement"},{"line_number":48,"context_line":"the above placement REST API calls."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"These calls to will be made **in adddition to** the existing calls to"},{"line_number":51,"context_line":"`ComputeNode.save()` and `Instance.save()` that currently save allocation and"},{"line_number":52,"context_line":"usage information in the child cell `compute_nodes` and `instance_extra`"},{"line_number":53,"context_line":"tables, respectively."}],"source_content_type":"text/x-rst","patch_set":13,"id":"bacf61ea_efd98723","line":50,"range":{"start_line":50,"start_character":33,"end_line":50,"end_character":42},"updated":"2016-08-01 06:55:20.000000000","message":"nit: addition","commit_id":"d20cdbcebad2e2b843ccae572f4a78f7a42bac79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2f4ac9289030e093d3d1b09531276f4456002f66","unresolved":false,"context_lines":[{"line_number":179,"context_line":"  payload that looks like this::"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    \"PCI_DEVICE\": 2"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":".. note::"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    We will not be creating allocation records for SR-IOV PCI devices or NUMA"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bacf61ea_f6b5c57d","line":182,"updated":"2016-08-01 14:50:11.000000000","message":"@_gryf: The allocation records do not indicate which particular vCPU or which sector of a disk a particular instance was assigned (not that a vCPU is actually assigned in non-NUMA situations anyway...). All the inventory and allocations tables are intended to answer is \"how many of this type of resource does this provider have available?\" and \"which consumers are consuming this kind of resource on this resource provider?\".\n\nWhen we start implementing the nested resource providers work, the placement API will be able to answer slightly more complex questions, like \"which resource provider represents the physical function of an SR-IOV virtual function resource type that is being consumed by this consumer?\" or \"how much memory is being consumed by this instance on this particular NUMA node represented by this resource provider UUID?\".\n\nThe pci_devices table is going to continue to live in the Nova cell DB and for the foreseeable future, the existing PCI device tracker in Nova will continue to use that table for answering specific questions about individual devices including the device\u0027s tags, parent PF (if applicable), it\u0027s product and vendor ID, etc.","commit_id":"d20cdbcebad2e2b843ccae572f4a78f7a42bac79"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"cf38c7152ed57b4a5f271af3ccc3e34fe679df01","unresolved":false,"context_lines":[{"line_number":179,"context_line":"  payload that looks like this::"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    \"PCI_DEVICE\": 2"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":".. note::"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    We will not be creating allocation records for SR-IOV PCI devices or NUMA"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bacf61ea_5a7a0f78","line":182,"updated":"2016-08-01 06:55:20.000000000","message":"Currently, PCI resource tracker doing much more than storing information, how many of simple PCI devices are used. Given that, if we have 4 PCI devices of the same type, two of them are taken by the instance, it will be hard to distinguish which one are taken, and which are free using only the information from resource-*, unless I\u0027ve missed something obvious. Could you comment on that?","commit_id":"d20cdbcebad2e2b843ccae572f4a78f7a42bac79"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"296f369d11a851d591041f40568b4bf3af65daa6","unresolved":false,"context_lines":[{"line_number":179,"context_line":"  payload that looks like this::"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    \"PCI_DEVICE\": 2"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":".. note::"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    We will not be creating allocation records for SR-IOV PCI devices or NUMA"}],"source_content_type":"text/x-rst","patch_set":13,"id":"bacf61ea_f1082f2a","line":182,"in_reply_to":"bacf61ea_f6b5c57d","updated":"2016-08-01 14:55:32.000000000","message":"Thanks for the explanation!","commit_id":"d20cdbcebad2e2b843ccae572f4a78f7a42bac79"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"71db1b1cac21c1d6e670c99b8e1f98aea0cc9d58","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"When an instance is terminated, the corresponding `DELETE` API call will be"},{"line_number":135,"context_line":"made from the resource tracker, which will atomically delete all allocation"},{"line_number":136,"context_line":"records for that instance (consumer) on the compute node (resource provider)."},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"When constructing the payload for the `PUT` placement API call, the resource"},{"line_number":139,"context_line":"tracker should examine the `Instance` object (and/or `Migration` object) for a"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bacf61ea_6abc7e06","line":136,"updated":"2016-08-04 21:04:04.000000000","message":"@mriedem:\n\nOn #1, that situation will occur only if the delete comes in before the update_available_resource() call is made that writes allocation records and inventory records alike to the placement API during its audit process. And yes, we will simply ignore a 404 on the DELETE.\n\nI\u0027ve added some text about inserting allocation records during the audit process in update_available_resource()\u0027s periodic execution. I also added a note about ignoring the 404 on DELETE.\n\nOne #2,","commit_id":"52f685997fa643d2f5779774444e8ac106baf7ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bf5fbd6722304c8c4ec88ce20e91dfca5fb7c0d5","unresolved":false,"context_lines":[{"line_number":131,"context_line":"records (one for each resource class being consumed) in a transactional manner,"},{"line_number":132,"context_line":"ensuring no partial updates."},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"When an instance is terminated, the corresponding `DELETE` API call will be"},{"line_number":135,"context_line":"made from the resource tracker, which will atomically delete all allocation"},{"line_number":136,"context_line":"records for that instance (consumer) on the compute node (resource provider)."},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"When constructing the payload for the `PUT` placement API call, the resource"},{"line_number":139,"context_line":"tracker should examine the `Instance` object (and/or `Migration` object) for a"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bacf61ea_95d30a38","line":136,"range":{"start_line":134,"start_character":0,"end_line":136,"end_character":77},"updated":"2016-08-04 00:57:34.000000000","message":"Two things:\n\n1. For pre-existing instances, I\u0027m assuming if we try to DELETE for that consumer_uuid (instance.uuid) we\u0027ll get a 404 and just swallow it?\n\n2. In patch set 10 I asked about local delete from the compute API in case the nova-compute service that the instance is on is down - what do we do then since we can\u0027t get to the resource tracker to cleanup? Will we call the placement API from the compute API local delete flow?","commit_id":"52f685997fa643d2f5779774444e8ac106baf7ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3744187004a76901307c431fafb11e44c2acae14","unresolved":false,"context_lines":[{"line_number":131,"context_line":"records (one for each resource class being consumed) in a transactional manner,"},{"line_number":132,"context_line":"ensuring no partial updates."},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"When an instance is terminated, the corresponding `DELETE` API call will be"},{"line_number":135,"context_line":"made from the resource tracker, which will atomically delete all allocation"},{"line_number":136,"context_line":"records for that instance (consumer) on the compute node (resource provider)."},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"When constructing the payload for the `PUT` placement API call, the resource"},{"line_number":139,"context_line":"tracker should examine the `Instance` object (and/or `Migration` object) for a"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bacf61ea_077b3b29","line":136,"range":{"start_line":134,"start_character":0,"end_line":136,"end_character":77},"in_reply_to":"bacf61ea_95d30a38","updated":"2016-08-04 20:45:05.000000000","message":"For the local delete thing, I got to thinking, what happens today if the compute is down and we can\u0027t get to the resource tracker, what claims are we not dropping and how does that affect anything? Maybe we\u0027re no worse off here? Or do we need like a force drop of a consumer\u0027s allocations from the compute API in this case regardless?","commit_id":"52f685997fa643d2f5779774444e8ac106baf7ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bf5fbd6722304c8c4ec88ce20e91dfca5fb7c0d5","unresolved":false,"context_lines":[{"line_number":140,"context_line":"variety of usage information for different resource classes. The"},{"line_number":141,"context_line":"`consumer_uuid` part of the URI should be the instance\u0027s `uuid` field value."},{"line_number":142,"context_line":"The `resource_provider_uuid` should be the compute node\u0027s UUID except for when"},{"line_number":143,"context_line":"share storage is used or boot from volume was used (see instructions below)."},{"line_number":144,"context_line":"The payload\u0027s \"allocations\" field is a dict, with the keys being the string"},{"line_number":145,"context_line":"representation of the appropriate `nova.objects.fields.ResourceClass` enum"},{"line_number":146,"context_line":"values (e.g. \"VCPU\" or \"MEMORY_MB\")."}],"source_content_type":"text/x-rst","patch_set":14,"id":"bacf61ea_15defa6c","line":143,"updated":"2016-08-04 00:57:34.000000000","message":"I\u0027m assuming other things like neutron routed networks also fits into this.","commit_id":"52f685997fa643d2f5779774444e8ac106baf7ed"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"71db1b1cac21c1d6e670c99b8e1f98aea0cc9d58","unresolved":false,"context_lines":[{"line_number":140,"context_line":"variety of usage information for different resource classes. The"},{"line_number":141,"context_line":"`consumer_uuid` part of the URI should be the instance\u0027s `uuid` field value."},{"line_number":142,"context_line":"The `resource_provider_uuid` should be the compute node\u0027s UUID except for when"},{"line_number":143,"context_line":"share storage is used or boot from volume was used (see instructions below)."},{"line_number":144,"context_line":"The payload\u0027s \"allocations\" field is a dict, with the keys being the string"},{"line_number":145,"context_line":"representation of the appropriate `nova.objects.fields.ResourceClass` enum"},{"line_number":146,"context_line":"values (e.g. \"VCPU\" or \"MEMORY_MB\")."}],"source_content_type":"text/x-rst","patch_set":14,"id":"bacf61ea_4ab9ba14","line":143,"updated":"2016-08-04 21:04:04.000000000","message":"yup.","commit_id":"52f685997fa643d2f5779774444e8ac106baf7ed"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"71db1b1cac21c1d6e670c99b8e1f98aea0cc9d58","unresolved":false,"context_lines":[{"line_number":166,"context_line":"   creates a resource provider for the shared storage pool and associates that"},{"line_number":167,"context_line":"   provider to a compute node via a host aggregate association, there is no way"},{"line_number":168,"context_line":"   for the resource tracker to know what the UUID of that shared storage"},{"line_number":169,"context_line":"   provider will be."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"* If the `pci_devices` table contains any records linking the instance UUID to"},{"line_number":172,"context_line":"  any PCI device in `ALLOCATED` status, create one allocation record for"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bacf61ea_aa3836a1","line":169,"updated":"2016-08-04 21:04:04.000000000","message":"No, the UUIDs of all resource providers involved in the allocation will be sent (see generic-resource-pools spec amendment for the PUT API call.)","commit_id":"52f685997fa643d2f5779774444e8ac106baf7ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bf5fbd6722304c8c4ec88ce20e91dfca5fb7c0d5","unresolved":false,"context_lines":[{"line_number":162,"context_line":"   instance was **NOT** booted from volume, the value used should be the sum of"},{"line_number":163,"context_line":"   the `root_gb`, `ephemeral_gb`, and `swap` field values of the flavor. The"},{"line_number":164,"context_line":"   `resource_provider_uuid` should eventually be the **UUID of the resource"},{"line_number":165,"context_line":"   provider of that shared disk storage**. However, until the cloud admin"},{"line_number":166,"context_line":"   creates a resource provider for the shared storage pool and associates that"},{"line_number":167,"context_line":"   provider to a compute node via a host aggregate association, there is no way"},{"line_number":168,"context_line":"   for the resource tracker to know what the UUID of that shared storage"},{"line_number":169,"context_line":"   provider will be."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"* If the `pci_devices` table contains any records linking the instance UUID to"},{"line_number":172,"context_line":"  any PCI device in `ALLOCATED` status, create one allocation record for"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bacf61ea_154c3a41","line":169,"range":{"start_line":165,"start_character":43,"end_line":169,"end_character":20},"updated":"2016-08-04 00:57:34.000000000","message":"So the resource_provider_uuid won\u0027t be sent in the placement API call? Or something else?","commit_id":"52f685997fa643d2f5779774444e8ac106baf7ed"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"b8d455e6a687659ceaf60cdb580398e3d58dd717","unresolved":false,"context_lines":[{"line_number":181,"context_line":"   creates a resource provider for the shared storage pool and associates that"},{"line_number":182,"context_line":"   provider to a compute node via a host aggregate association, there is no way"},{"line_number":183,"context_line":"   for the resource tracker to know what the UUID of that shared storage"},{"line_number":184,"context_line":"   provider will be."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"* If the `pci_devices` table contains any records linking the instance UUID to"},{"line_number":187,"context_line":"  any PCI device in `ALLOCATED` status, create one allocation record for"}],"source_content_type":"text/x-rst","patch_set":15,"id":"bacf61ea_254117aa","line":184,"updated":"2016-08-04 21:48:45.000000000","message":"It\u0027s not stated but is the idea that when a host aggregate has not been set up in this manner that the compute node UUID will be used?\n\nI\u0027m also assuming that if a host aggregate is later added for the shared storage pool that the periodic task would recognize this and move the allocations to the proper resource provider. Is that the intent?","commit_id":"3cd2c9cc493235c21619ba871cfd8436f717c5e1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"07b83e7b6334d3945ff8ef49fbf5068e82e1328f","unresolved":false,"context_lines":[{"line_number":181,"context_line":"   creates a resource provider for the shared storage pool and associates that"},{"line_number":182,"context_line":"   provider to a compute node via a host aggregate association, there is no way"},{"line_number":183,"context_line":"   for the resource tracker to know what the UUID of that shared storage"},{"line_number":184,"context_line":"   provider will be."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"* If the `pci_devices` table contains any records linking the instance UUID to"},{"line_number":187,"context_line":"  any PCI device in `ALLOCATED` status, create one allocation record for"}],"source_content_type":"text/x-rst","patch_set":15,"id":"bacf61ea_e0236d56","line":184,"in_reply_to":"bacf61ea_254117aa","updated":"2016-08-04 22:09:26.000000000","message":"Heh, I had a similar question in the last patch set - it would be good to be explicit, but I guess we can leave it in the review comments for posterity.","commit_id":"3cd2c9cc493235c21619ba871cfd8436f717c5e1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d9cd31b119ab039e556e92726ab0701cc8f20713","unresolved":false,"context_lines":[{"line_number":181,"context_line":"   creates a resource provider for the shared storage pool and associates that"},{"line_number":182,"context_line":"   provider to a compute node via a host aggregate association, there is no way"},{"line_number":183,"context_line":"   for the resource tracker to know what the UUID of that shared storage"},{"line_number":184,"context_line":"   provider will be."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"* If the `pci_devices` table contains any records linking the instance UUID to"},{"line_number":187,"context_line":"  any PCI device in `ALLOCATED` status, create one allocation record for"}],"source_content_type":"text/x-rst","patch_set":15,"id":"bacf61ea_05da13e8","line":184,"in_reply_to":"bacf61ea_254117aa","updated":"2016-08-04 21:52:28.000000000","message":"Yes, correct on both questions.","commit_id":"3cd2c9cc493235c21619ba871cfd8436f717c5e1"}]}
