)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"96b33b69e0236b5d2f96aa395f3b83352d40871c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jay Pipes \u003cjaypipes@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-12-21 10:14:31 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"WIP: Prepare compute nodes for service providers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Moves the inventory/capacity-related fields for the compute node into"},{"line_number":10,"context_line":"the inventories table introduced in the `service-providers` blueprint."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a7b0d38_b734834a","line":7,"updated":"2015-12-22 17:52:20.000000000","message":"not sure, but do you mean resource provides here and","commit_id":"7fb0c94f26bb72253ba0ec8b7aaf53a0cf25410f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"818e6b533f84c03137ccb0c7ebd6f7d11447e4f1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jay Pipes \u003cjaypipes@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-12-21 10:14:31 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"WIP: Prepare compute nodes for service providers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Moves the inventory/capacity-related fields for the compute node into"},{"line_number":10,"context_line":"the inventories table introduced in the `service-providers` blueprint."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a7b0d38_c9540656","line":7,"in_reply_to":"1a7b0d38_b734834a","updated":"2015-12-23 02:18:27.000000000","message":"LOL, yep :)","commit_id":"7fb0c94f26bb72253ba0ec8b7aaf53a0cf25410f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"96b33b69e0236b5d2f96aa395f3b83352d40871c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"WIP: Prepare compute nodes for service providers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Moves the inventory/capacity-related fields for the compute node into"},{"line_number":10,"context_line":"the inventories table introduced in the `service-providers` blueprint."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ide356100006b922f190c6ccd7b91a4e18c6542bc"},{"line_number":13,"context_line":"Blueprint: compute-node-inventory"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a7b0d38_d7390f43","line":10,"updated":"2015-12-22 17:52:20.000000000","message":"here?","commit_id":"7fb0c94f26bb72253ba0ec8b7aaf53a0cf25410f"}],"specs/mitaka/approved/compute-node-inventory.rst":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b8ae128891e18a4c83ee0ada2f5724d38ebd44bb","unresolved":false,"context_lines":[{"line_number":71,"context_line":"   value can be determined by looking at used versus capacity values"},{"line_number":72,"context_line":"* Disk:"},{"line_number":73,"context_line":" * `compute_nodes.local_gb`: Amount of disk storage available to the compute"},{"line_number":74,"context_line":"   node for storage virtual machine ephemeral disks. While this is denoted"},{"line_number":75,"context_line":"   \"local\" disk storage, currently if the local storage for ephemeral disks is"},{"line_number":76,"context_line":"   shared storage, the compute node has no idea that this storage is shared"},{"line_number":77,"context_line":"   among other compute nodes. See the `generic-resource-pools` and"}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa69d971_e1cf9a27","line":74,"updated":"2016-01-07 17:32:23.000000000","message":"either s/storage/storing/ or s/storage/storage of/","commit_id":"2046b629e461d37aca542438922bfac5c45cb709"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b8ae128891e18a4c83ee0ada2f5724d38ebd44bb","unresolved":false,"context_lines":[{"line_number":181,"context_line":""},{"line_number":182,"context_line":"4b) Do the same for the RAM and DISK resource classes. For the DISK resource"},{"line_number":183,"context_line":"class, do not perform the INSERT if the compute node uses shared storage"},{"line_number":184,"context_line":"for the ephemeral disks."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"4c) For the PCI device resource classes (`PCI_GENERIC`, `PCI_SRIOV_PF` and"},{"line_number":187,"context_line":"`PCI_SRIOV_VF`, the inventories table records represent the class of"}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa69d971_e110fa5b","line":184,"updated":"2016-01-07 17:32:23.000000000","message":"Just for my own reference, how do we know if this is the case?","commit_id":"2046b629e461d37aca542438922bfac5c45cb709"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ba1410731c837b6b62b2d63535dc4188494cc48f","unresolved":false,"context_lines":[{"line_number":181,"context_line":""},{"line_number":182,"context_line":"4b) Do the same for the RAM and DISK resource classes. For the DISK resource"},{"line_number":183,"context_line":"class, do not perform the INSERT if the compute node uses shared storage"},{"line_number":184,"context_line":"for the ephemeral disks."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"4c) For the PCI device resource classes (`PCI_GENERIC`, `PCI_SRIOV_PF` and"},{"line_number":187,"context_line":"`PCI_SRIOV_VF`, the inventories table records represent the class of"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba63e191_f249b58f","line":184,"in_reply_to":"fa69d971_e110fa5b","updated":"2016-01-18 20:00:30.000000000","message":"Good question :) Not entirely sure. We could look at the result of the generic-resource-pools work and do a query on the aggregates table joined to the resource_pools table to determine if the compute node is associated with an aggregate that has shared storage tied to it. Or we could add a temporary configuration option that indicated whether shared storage was in use? but that would be for the entire deployment...","commit_id":"2046b629e461d37aca542438922bfac5c45cb709"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"479d6016590d69394fa18e5dbd0ea81412b18fce","unresolved":false,"context_lines":[{"line_number":33,"context_line":"---------"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"As a deployer, I wish to add new classes of resources to my system and do so"},{"line_number":36,"context_line":"without any downtime caused by database schema migrations."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a5de9d1_e3c5650a","line":36,"updated":"2016-02-02 18:25:08.000000000","message":"I don\u0027t think we should support out of tree custom resource. This does make it possible, but it feels like the wrong aim.\n\nWe need to make it easier to evolve our set of resources, that seems like reason enough.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4c5c77edbf265a42b5dd9f52643728e349669b4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"---------"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"As a deployer, I wish to add new classes of resources to my system and do so"},{"line_number":36,"context_line":"without any downtime caused by database schema migrations."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_b387c2d6","line":36,"updated":"2016-02-09 18:57:52.000000000","message":"Right, like Dan says, I\u0027m not talking about supporting out-of-tree resource classes here but rather as we introduce new supported resource classes, I want to remove the downtime associated with data and schema migrations.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fbbb6ebb6bad47d809144889f5953f20f90adb8a","unresolved":false,"context_lines":[{"line_number":33,"context_line":"---------"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"As a deployer, I wish to add new classes of resources to my system and do so"},{"line_number":36,"context_line":"without any downtime caused by database schema migrations."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5a5ae5dd_926ce19d","line":36,"in_reply_to":"7a5de9d1_e3c5650a","updated":"2016-02-03 17:20:53.000000000","message":"I don\u0027t think this is talking about adding out of tree resource classes specifically, but rather saying that adding new things like GPUs or SRIOV NICs to my offering requires the ability to schedule safely on those things and/or monitor capacity.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4c5c77edbf265a42b5dd9f52643728e349669b4","unresolved":false,"context_lines":[{"line_number":146,"context_line":"conditions are found to be in place (for instance, the compute node doesn\u0027t"},{"line_number":147,"context_line":"have a UUID field value). The `_migrate_inventory()` method should be a"},{"line_number":148,"context_line":"`@remotable` method that uses a single database transaction to ensure all DB"},{"line_number":149,"context_line":"writes are done atomically."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"2) Compute nodes that have no `uuid` field set should have a new random UUID"},{"line_number":152,"context_line":"generated on-demand."}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_536d2e31","line":149,"updated":"2016-02-09 18:57:52.000000000","message":"Fixed.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"479d6016590d69394fa18e5dbd0ea81412b18fce","unresolved":false,"context_lines":[{"line_number":146,"context_line":"conditions are found to be in place (for instance, the compute node doesn\u0027t"},{"line_number":147,"context_line":"have a UUID field value). The `_migrate_inventory()` method should be a"},{"line_number":148,"context_line":"`@remotable` method that uses a single database transaction to ensure all DB"},{"line_number":149,"context_line":"writes are done atomically."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"2) Compute nodes that have no `uuid` field set should have a new random UUID"},{"line_number":152,"context_line":"generated on-demand."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a5de9d1_be71b879","line":149,"updated":"2016-02-02 18:25:08.000000000","message":"Nit: we should mention this only happens when we detect (via service versions) that all apis and conductors have been upgraded to the required min_version to do the translation.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fbbb6ebb6bad47d809144889f5953f20f90adb8a","unresolved":false,"context_lines":[{"line_number":146,"context_line":"conditions are found to be in place (for instance, the compute node doesn\u0027t"},{"line_number":147,"context_line":"have a UUID field value). The `_migrate_inventory()` method should be a"},{"line_number":148,"context_line":"`@remotable` method that uses a single database transaction to ensure all DB"},{"line_number":149,"context_line":"writes are done atomically."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"2) Compute nodes that have no `uuid` field set should have a new random UUID"},{"line_number":152,"context_line":"generated on-demand."}],"source_content_type":"text/x-rst","patch_set":4,"id":"5a5ae5dd_f2c75543","line":149,"in_reply_to":"7a5de9d1_be71b879","updated":"2016-02-03 17:20:53.000000000","message":"Correct. If we don\u0027t, then we could have an older API or conductor node that doesn\u0027t know that the transition has taken place, and thus continue updating only the old location, which will cause our is-uuid-set detection on newer nodes to potentially lead us to read stale data from the new location.\n\nAlso, _from_db_object() is not remotable, which means you don\u0027t need to make _migrate_inventory() remotable -- you\u0027re already (and only ever) running it from the conductor side, with direct transactional control over the database.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4c5c77edbf265a42b5dd9f52643728e349669b4","unresolved":false,"context_lines":[{"line_number":236,"context_line":"constraints and the total value to the combined number of the resource. So,"},{"line_number":237,"context_line":"for instance, for the `NUMA_CORES`, we\u0027d set total to 8 (2 sockets having 4"},{"line_number":238,"context_line":"cores each), min_unit to 1, and max_unit to 4 (since each cell has 4 cores)."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"Changes to `ComputeNode` object model"},{"line_number":241,"context_line":"-------------------------------------"},{"line_number":242,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_736aaa1c","line":239,"updated":"2016-02-09 18:57:52.000000000","message":"Done.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"479d6016590d69394fa18e5dbd0ea81412b18fce","unresolved":false,"context_lines":[{"line_number":236,"context_line":"constraints and the total value to the combined number of the resource. So,"},{"line_number":237,"context_line":"for instance, for the `NUMA_CORES`, we\u0027d set total to 8 (2 sockets having 4"},{"line_number":238,"context_line":"cores each), min_unit to 1, and max_unit to 4 (since each cell has 4 cores)."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"Changes to `ComputeNode` object model"},{"line_number":241,"context_line":"-------------------------------------"},{"line_number":242,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a5de9d1_5ed76423","line":239,"updated":"2016-02-02 18:25:08.000000000","message":"we should talk about in the following release, needing to check all fields are not null, and make the uuid not nullable, add a unique constraint, etc.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4c5c77edbf265a42b5dd9f52643728e349669b4","unresolved":false,"context_lines":[{"line_number":259,"context_line":"`ComputeNode` is in the resource tracker, which sets the field values and calls"},{"line_number":260,"context_line":"`save()` on the `ComputeNode` object. We can modify the `save()` method to"},{"line_number":261,"context_line":"write any changes to inventory/capacity information to the new `inventories`"},{"line_number":262,"context_line":"table instead of the `compute_nodes` table."},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"Alternatives"},{"line_number":265,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_1377b603","line":262,"updated":"2016-02-09 18:57:52.000000000","message":"@dansmith: I am proposing that the resource tracker be changed to only save capacity information to the inventory table, not to both locations. I will add a note that the save() method must check to ensure that all conductor and API nodes have been upgraded to a version that supports the inventory table.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fbbb6ebb6bad47d809144889f5953f20f90adb8a","unresolved":false,"context_lines":[{"line_number":259,"context_line":"`ComputeNode` is in the resource tracker, which sets the field values and calls"},{"line_number":260,"context_line":"`save()` on the `ComputeNode` object. We can modify the `save()` method to"},{"line_number":261,"context_line":"write any changes to inventory/capacity information to the new `inventories`"},{"line_number":262,"context_line":"table instead of the `compute_nodes` table."},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"Alternatives"},{"line_number":265,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5a5ae5dd_dcdd8871","line":262,"updated":"2016-02-03 17:20:53.000000000","message":"Are you proposing that we only update the new location once the conversion has happened, or keep updating both?\n\nIf both, then we definitely need the provision John pointed out above of not doing any of this until everything that talks to the database is up to the new level.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4c5c77edbf265a42b5dd9f52643728e349669b4","unresolved":false,"context_lines":[{"line_number":269,"context_line":"answer to the question \"find me the things that have the requested capacity for"},{"line_number":270,"context_line":"this set of resources\" is very convenient and efficient, versus looking in"},{"line_number":271,"context_line":"multiple tables."},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"Data model impact"},{"line_number":274,"context_line":"-----------------"},{"line_number":275,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_337432fc","line":272,"updated":"2016-02-09 18:57:52.000000000","message":"Done.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fbbb6ebb6bad47d809144889f5953f20f90adb8a","unresolved":false,"context_lines":[{"line_number":269,"context_line":"answer to the question \"find me the things that have the requested capacity for"},{"line_number":270,"context_line":"this set of resources\" is very convenient and efficient, versus looking in"},{"line_number":271,"context_line":"multiple tables."},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"Data model impact"},{"line_number":274,"context_line":"-----------------"},{"line_number":275,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5a5ae5dd_5c5e78ea","line":272,"updated":"2016-02-03 17:20:53.000000000","message":"There\u0027s really no alternative, given we\u0027ve already merged the previous spec, right? I mean, it\u0027s cool that you\u0027re acting like there\u0027s some alternative (i.e. keep sucking), but I\u0027d also be fine with just nuking this and pointing out that this is step 2 in an N step irreversible process :)","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"479d6016590d69394fa18e5dbd0ea81412b18fce","unresolved":false,"context_lines":[{"line_number":315,"context_line":"assisted in performing batches of flavor metadata migrations. This command"},{"line_number":316,"context_line":"could could be an optional upgrade step that deployers should run after they"},{"line_number":317,"context_line":"run a `nova-manage db_sync` on a controller node during upgrade of the Nova"},{"line_number":318,"context_line":"code."},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"Developer impact"},{"line_number":321,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a5de9d1_2a981b6a","line":318,"updated":"2016-02-02 18:25:08.000000000","message":"I guess thats just for the uuid bit really, as the data can just be written into the new location when its needed.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4c5c77edbf265a42b5dd9f52643728e349669b4","unresolved":false,"context_lines":[{"line_number":315,"context_line":"assisted in performing batches of flavor metadata migrations. This command"},{"line_number":316,"context_line":"could could be an optional upgrade step that deployers should run after they"},{"line_number":317,"context_line":"run a `nova-manage db_sync` on a controller node during upgrade of the Nova"},{"line_number":318,"context_line":"code."},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"Developer impact"},{"line_number":321,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_d35fde73","line":318,"updated":"2016-02-09 18:57:52.000000000","message":"True. That\u0027s why I wrote \"optimally\" above, which should have been \"optionally\" :) In any case, I\u0027ve removed the above.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fbbb6ebb6bad47d809144889f5953f20f90adb8a","unresolved":false,"context_lines":[{"line_number":315,"context_line":"assisted in performing batches of flavor metadata migrations. This command"},{"line_number":316,"context_line":"could could be an optional upgrade step that deployers should run after they"},{"line_number":317,"context_line":"run a `nova-manage db_sync` on a controller node during upgrade of the Nova"},{"line_number":318,"context_line":"code."},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"Developer impact"},{"line_number":321,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5a5ae5dd_bc00ccab","line":318,"in_reply_to":"7a5de9d1_2a981b6a","updated":"2016-02-03 17:20:53.000000000","message":"Yeah, I don\u0027t think we need a manual command for this after reading the above. This information gets updated by all compute nodes pretty often, which means (unlike flavor info), everything will be converted shortly after upgrade, right?","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"479d6016590d69394fa18e5dbd0ea81412b18fce","unresolved":false,"context_lines":[{"line_number":353,"context_line":"  `resource_providers` table for the compute node"},{"line_number":354,"context_line":"* Modify `nova.objects.ComputeNode` model to read inventory/capacity"},{"line_number":355,"context_line":"  information from the `inventories` table instead of the `compute_nodes` table"},{"line_number":356,"context_line":"* Modify `nova.objects.ComputeNode` model to store **changed** inventory"},{"line_number":357,"context_line":"  information (total amount, min and max unit constraints, and allocation"},{"line_number":358,"context_line":"  ratio) to the `inventories` table instead of the `compute_nodes` table, and"},{"line_number":359,"context_line":"  read the inventory information from the `inventories` table instead of the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a5de9d1_f0951488","line":356,"updated":"2016-02-02 18:25:08.000000000","message":"not sure no the ordering here, but I could be missing something.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e4c5c77edbf265a42b5dd9f52643728e349669b4","unresolved":false,"context_lines":[{"line_number":386,"context_line":"* `resource-classes` blueprint:"},{"line_number":387,"context_line":"    TODO"},{"line_number":388,"context_line":"* `resource-providers` blueprint:"},{"line_number":389,"context_line":"    TODO"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"History"},{"line_number":392,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a57f1b5_f3645a4a","line":389,"updated":"2016-02-09 18:57:52.000000000","message":"Done.","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"479d6016590d69394fa18e5dbd0ea81412b18fce","unresolved":false,"context_lines":[{"line_number":386,"context_line":"* `resource-classes` blueprint:"},{"line_number":387,"context_line":"    TODO"},{"line_number":388,"context_line":"* `resource-providers` blueprint:"},{"line_number":389,"context_line":"    TODO"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"History"},{"line_number":392,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a5de9d1_30f2cc07","line":389,"updated":"2016-02-02 18:25:08.000000000","message":"we have one of those merged now I guess?","commit_id":"b2937d010658f37dd60bd7dbf91e79ee3a2cfccd"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"3b72261bcfb74b49c8b5f40207cf5d250a6acec7","unresolved":false,"context_lines":[{"line_number":86,"context_line":"   problem with shared storage for ephemeral disks applies to this field as"},{"line_number":87,"context_line":"   well"},{"line_number":88,"context_line":" * `compute_nodes.free_disk_gb`: A calculated field that can go away since its"},{"line_number":89,"context_line":"   value can be determined by looking at used versus capacity values"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"* PCI devices:"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"bae84128_bfcab76c","line":89,"updated":"2016-02-25 07:09:21.000000000","message":"I\u0027m curious about another field in ComputeNode related to Disk: disk_available_least.\n\n\nExisting compute node will claim and consume local_gb_used in the resource_tracker (https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L709-L710).\n\n\nHowever, the scheduler has a different behavior, it checks and consumes HostState.free_disk_mb, which is derived from the min value of ComputeNode.free_disk_gb and disk_available_least. (https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L189-L201)\n\n\nThe libvirt driver will calculate the disk_available_least, which will be smaller than the actual free_disk_gb. Does it mean that such information will be changed to be pushed to Inventory.reserved of disk resources periodically from compute nodes?","commit_id":"efe6b4943136d7bc1e66547b4ebd5ee2dd5c6dbb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e7eb22765e6c2942e81a794b94b240f354db76bc","unresolved":false,"context_lines":[{"line_number":86,"context_line":"   problem with shared storage for ephemeral disks applies to this field as"},{"line_number":87,"context_line":"   well"},{"line_number":88,"context_line":" * `compute_nodes.free_disk_gb`: A calculated field that can go away since its"},{"line_number":89,"context_line":"   value can be determined by looking at used versus capacity values"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"* PCI devices:"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7af24918_5f7288ae","line":89,"updated":"2016-03-06 16:36:13.000000000","message":"disk_available_least is kind of an odd thing in Nova. It holds the actual free space on the local filesystem instead of the free virtual space on the filesystem.\n\nTo handle this oddity, we could have the virt drivers periodically update the max_unit value of the new DISK_GB resource class for local disk space on a compute node. The virt driver would do the equivalent of `df -h /var/lib/nova/instances` and set the max_unit to the Used value returned there. This would then be used in the scheduler to determine the maximum size of a request for DISK_GB resources that a compute node could satisfy, which is what disk_available_least is currently used for.","commit_id":"efe6b4943136d7bc1e66547b4ebd5ee2dd5c6dbb"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"a562ec38f2324e6c35e0e13b37e1dd0a2e4fc427","unresolved":false,"context_lines":[{"line_number":123,"context_line":"We propose to consolidate all of the inventory/capacity fields from the above"},{"line_number":124,"context_line":"locations into the new `inventories` table in the following manner:"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"Remember that all compute nodes are resource providers, but all resource"},{"line_number":127,"context_line":"providers are not compute nodes. There is no globally-unique identifier for a"},{"line_number":128,"context_line":"compute node within the OpenStack deployment, and we need a globally-unique"},{"line_number":129,"context_line":"identifier for the resource provider."}],"source_content_type":"text/x-rst","patch_set":5,"id":"dae33548_b550380c","line":126,"updated":"2016-02-19 01:40:48.000000000","message":"As worded now, this is a logical contradiction, based on the placement of the word \"not\". I believe what you mean is:\n\n  all compute nodes are resource providers,\n  but not all resource providers are compute nodes.","commit_id":"efe6b4943136d7bc1e66547b4ebd5ee2dd5c6dbb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e7eb22765e6c2942e81a794b94b240f354db76bc","unresolved":false,"context_lines":[{"line_number":123,"context_line":"We propose to consolidate all of the inventory/capacity fields from the above"},{"line_number":124,"context_line":"locations into the new `inventories` table in the following manner:"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"Remember that all compute nodes are resource providers, but all resource"},{"line_number":127,"context_line":"providers are not compute nodes. There is no globally-unique identifier for a"},{"line_number":128,"context_line":"compute node within the OpenStack deployment, and we need a globally-unique"},{"line_number":129,"context_line":"identifier for the resource provider."}],"source_content_type":"text/x-rst","patch_set":5,"id":"7af24918_bf674ce9","line":126,"updated":"2016-03-06 16:36:13.000000000","message":"Done.","commit_id":"efe6b4943136d7bc1e66547b4ebd5ee2dd5c6dbb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e7eb22765e6c2942e81a794b94b240f354db76bc","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    SELECT resource_class_id, total, allocation_ratio"},{"line_number":261,"context_line":"    FROM inventories"},{"line_number":262,"context_line":"    WHERE resource_provider_id \u003d $COMPUTE_NODE_UUID;"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"2) The only piece of code that *writes* changes to the `vcpus`, `memory_mb`,"},{"line_number":265,"context_line":"`local_gb`, `cpu_allocation_ratio`, and `ram_allocation_ratio` fields of the"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7af24918_9f6410e6","line":262,"updated":"2016-03-06 16:36:13.000000000","message":"Fixed.","commit_id":"efe6b4943136d7bc1e66547b4ebd5ee2dd5c6dbb"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"3b72261bcfb74b49c8b5f40207cf5d250a6acec7","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    SELECT resource_class_id, total, allocation_ratio"},{"line_number":261,"context_line":"    FROM inventories"},{"line_number":262,"context_line":"    WHERE resource_provider_id \u003d $COMPUTE_NODE_UUID;"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"2) The only piece of code that *writes* changes to the `vcpus`, `memory_mb`,"},{"line_number":265,"context_line":"`local_gb`, `cpu_allocation_ratio`, and `ram_allocation_ratio` fields of the"}],"source_content_type":"text/x-rst","patch_set":5,"id":"bae84128_ff8f1fca","line":262,"updated":"2016-02-25 07:09:21.000000000","message":"nit:\nAccording to my understanding of the bp series, $COMPUTE_NODE_UUID is equal to ResourceProvider.uuid but not ResourceProvider.id.","commit_id":"efe6b4943136d7bc1e66547b4ebd5ee2dd5c6dbb"}],"specs/newton/approved/compute-node-inventory.rst":[{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"d24a307a48b81c4379ed4f1be5a9a58571f4fe91","unresolved":false,"context_lines":[{"line_number":47,"context_line":"----------------------------"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"To align the underlying database storage for inventory records, we propose to"},{"line_number":50,"context_line":"move the resource usage and capacity fields from their current locations in the"},{"line_number":51,"context_line":"database to the new `inventories` table added in the `resource-providers`"},{"line_number":52,"context_line":"blueprint."},{"line_number":53,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"3afc51ec_fbfa2b42","line":50,"range":{"start_line":50,"start_character":0,"end_line":50,"end_character":23},"updated":"2016-03-15 08:25:58.000000000","message":"I understand the compute node capacity fields can be moved to the \"total\" field of inventory tables. But what about resource usage fields?\n\nSpecifically, how to move \"resource usage\" fields into the new `inventories` tables? For example: \"vcpus_used\", \"memory_mb_used\" and \"local_gb_used\" mentioned below. I thought they are only related to bp resource-providers-allocations.","commit_id":"bac9edee47e14a765a5c619e1b8695c66eef8069"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"555e2b7b30f9b9336465b467f1e99d462bfb5f27","unresolved":false,"context_lines":[{"line_number":47,"context_line":"----------------------------"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"To align the underlying database storage for inventory records, we propose to"},{"line_number":50,"context_line":"move the resource usage and capacity fields from their current locations in the"},{"line_number":51,"context_line":"database to the new `inventories` table added in the `resource-providers`"},{"line_number":52,"context_line":"blueprint."},{"line_number":53,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"da0c15f0_2b1aa46e","line":50,"range":{"start_line":50,"start_character":0,"end_line":50,"end_character":23},"in_reply_to":"3afc51ec_fbfa2b42","updated":"2016-03-28 14:18:43.000000000","message":"I answered this on IRC at some point, but the _used fields will be read-only and generated from looking at the allocations table eventually.","commit_id":"bac9edee47e14a765a5c619e1b8695c66eef8069"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"51f2ee4c6e87df5eec38c813f1ae6ef3a1e8ed22","unresolved":false,"context_lines":[{"line_number":47,"context_line":"----------------------------"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"To align the underlying database storage for inventory records, we propose to"},{"line_number":50,"context_line":"move the resource usage and capacity fields from their current locations in the"},{"line_number":51,"context_line":"database to the new `inventories` table added in the `resource-providers`"},{"line_number":52,"context_line":"blueprint."},{"line_number":53,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"ba0121b8_3f7cf971","line":50,"range":{"start_line":50,"start_character":0,"end_line":50,"end_character":23},"in_reply_to":"da0c15f0_2b1aa46e","updated":"2016-03-29 01:57:36.000000000","message":"Yes, I only mean moving the resource usage fields is not related to this bp.","commit_id":"bac9edee47e14a765a5c619e1b8695c66eef8069"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"bfb8f38c4b658d315dc3e5fa6e7f4e3bc43010db","unresolved":false,"context_lines":[{"line_number":89,"context_line":"   value can be determined by looking at used versus capacity values"},{"line_number":90,"context_line":" * `disk_available_least`: A field that stores the sum of *actual* used disk"},{"line_number":91,"context_line":"   amounts on the local compute node. This information can be stored in the new"},{"line_number":92,"context_line":"   `max_unit` field of the `inventories` table for the `DISK_GB` resource class"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"* PCI devices:"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"5aef4532_b0c83976","line":92,"updated":"2016-03-07 12:00:47.000000000","message":"This conflicts with my understanding of what `max_unit` is supposed to mean. I though it was the max any given requestor can ask for, not the max that is available. In the context of disk that would mean \"any single vm is only allowed to allocate n GB of the disk\", independent of how much is available.","commit_id":"bac9edee47e14a765a5c619e1b8695c66eef8069"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"86c45b9de3deb146668c308fc688ca00d938cb99","unresolved":false,"context_lines":[{"line_number":89,"context_line":"   value can be determined by looking at used versus capacity values"},{"line_number":90,"context_line":" * `disk_available_least`: A field that stores the sum of *actual* used disk"},{"line_number":91,"context_line":"   amounts on the local compute node. This information can be stored in the new"},{"line_number":92,"context_line":"   `max_unit` field of the `inventories` table for the `DISK_GB` resource class"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"* PCI devices:"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"5aef4532_becfe727","line":92,"in_reply_to":"5aef4532_b0c83976","updated":"2016-03-09 13:46:51.000000000","message":"So, the *purpose* of disk_available_least is to ensure that we never allow a request for a disk that is greater than the actual amount of free disk space on the local drive. Remember that things like QCOW2 images may be 100G in size, but only a small portion of that may be actually on disk. The rest is essentially reserved for use. But the filesystem doesn\u0027t actually account for this reserved size. If we make the DISK_GB resource class\u0027 max_unit value equal the total amount of *actual* free space on the drive, then we ensure that even with overallocation, at least the requested instance disk amount will not exceed the ability of the drive to physically store the virtual size of the requested disk image.","commit_id":"bac9edee47e14a765a5c619e1b8695c66eef8069"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"41fa766f6d57da23f0ac1ce43d2c7dcdee56316d","unresolved":false,"context_lines":[{"line_number":89,"context_line":"   value can be determined by looking at used versus capacity values"},{"line_number":90,"context_line":" * `disk_available_least`: A field that stores the sum of *actual* used disk"},{"line_number":91,"context_line":"   amounts on the local compute node. This information can be stored in the new"},{"line_number":92,"context_line":"   `max_unit` field of the `inventories` table for the `DISK_GB` resource class"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"* PCI devices:"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"3afc51ec_12f09cfd","line":92,"in_reply_to":"5aef4532_becfe727","updated":"2016-03-15 07:13:21.000000000","message":"Agree with this idea, the disk_available_least can be reflected by the `max_unit` of disk inventory.\n\nHowever, it also means that the \"max_unit\" of disk inventory won\u0027t be configurable in the future because it is refreshed by RT periodically.","commit_id":"bac9edee47e14a765a5c619e1b8695c66eef8069"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"41fa766f6d57da23f0ac1ce43d2c7dcdee56316d","unresolved":false,"context_lines":[{"line_number":147,"context_line":"object. We propose having a method called `_migrate_inventory()` that handles"},{"line_number":148,"context_line":"the data migration steps that is called on `_from_db_object()` when certain"},{"line_number":149,"context_line":"conditions are found to be in place (for instance, the compute node doesn\u0027t"},{"line_number":150,"context_line":"have a UUID field value). The `_migrate_inventory()` method should be a"},{"line_number":151,"context_line":"use a single database transaction to ensure all DB writes are done atomically"},{"line_number":152,"context_line":"and it should first check to ensure that all API and conductor nodes have been"},{"line_number":153,"context_line":"upgraded to a version that can support the migration."}],"source_content_type":"text/x-rst","patch_set":8,"id":"3afc51ec_e6d3dd36","line":150,"range":{"start_line":150,"start_character":66,"end_line":150,"end_character":71},"updated":"2016-03-15 07:13:21.000000000","message":"remove \"be a\" ?","commit_id":"bac9edee47e14a765a5c619e1b8695c66eef8069"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"41fa766f6d57da23f0ac1ce43d2c7dcdee56316d","unresolved":false,"context_lines":[{"line_number":370,"context_line":"* Modify `nova.objects.ComputeNode` model to store **changed** inventory"},{"line_number":371,"context_line":"  information (total amount, min and max unit constraints, and allocation"},{"line_number":372,"context_line":"  ratio) to the `inventories` table instead of the `compute_nodes` table, and"},{"line_number":373,"context_line":"  read the inventory information from the `inventories` table instead of the"},{"line_number":374,"context_line":"  `compute_nodes` table"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":8,"id":"3afc51ec_f22d30a9","line":373,"range":{"start_line":373,"start_character":2,"end_line":373,"end_character":61},"updated":"2016-03-15 07:13:21.000000000","message":"Does resource tracker really need to read from `inventories` table?\n\nAccording to current implementation of RT, the inventory information is directly built from virt driver resources: `self.driver.get_available_resource()`[1]. Specifically, in `self._init_compute_node()`[2] that `self.compute_node` seems read from database periodically, the related inventory information(i.e. total amount, min and max unit) is refreshed each time by virt driver resources in `self._copy_resources(resources)`[3]. So it seems that RT only need to write/update inventory information to db periodically.\n\nI mean which part of inventory information is needed to read from database and overwrite the in-memory inventory object periodically?\n\n\n[1] https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L495\n\n[2] https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L537\n\n[3] https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L429","commit_id":"bac9edee47e14a765a5c619e1b8695c66eef8069"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"555e2b7b30f9b9336465b467f1e99d462bfb5f27","unresolved":false,"context_lines":[{"line_number":370,"context_line":"* Modify `nova.objects.ComputeNode` model to store **changed** inventory"},{"line_number":371,"context_line":"  information (total amount, min and max unit constraints, and allocation"},{"line_number":372,"context_line":"  ratio) to the `inventories` table instead of the `compute_nodes` table, and"},{"line_number":373,"context_line":"  read the inventory information from the `inventories` table instead of the"},{"line_number":374,"context_line":"  `compute_nodes` table"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":8,"id":"da0c15f0_4b4d586b","line":373,"range":{"start_line":373,"start_character":2,"end_line":373,"end_character":61},"in_reply_to":"3afc51ec_f22d30a9","updated":"2016-03-28 14:18:43.000000000","message":"All we are changing in this spec is where the inventory fields are stored.","commit_id":"bac9edee47e14a765a5c619e1b8695c66eef8069"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"51f2ee4c6e87df5eec38c813f1ae6ef3a1e8ed22","unresolved":false,"context_lines":[{"line_number":370,"context_line":"* Modify `nova.objects.ComputeNode` model to store **changed** inventory"},{"line_number":371,"context_line":"  information (total amount, min and max unit constraints, and allocation"},{"line_number":372,"context_line":"  ratio) to the `inventories` table instead of the `compute_nodes` table, and"},{"line_number":373,"context_line":"  read the inventory information from the `inventories` table instead of the"},{"line_number":374,"context_line":"  `compute_nodes` table"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ba0121b8_bf1ac915","line":373,"range":{"start_line":373,"start_character":2,"end_line":373,"end_character":61},"in_reply_to":"da0c15f0_4b4d586b","updated":"2016-03-29 01:57:36.000000000","message":"I see, little impact on the resource tracker in this bp, right? I was focusing on the changes in RT, seems irrelevant to this bp.","commit_id":"bac9edee47e14a765a5c619e1b8695c66eef8069"}]}
