)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This adds `nova-manage db ironic_flavor_migration` which allows"},{"line_number":10,"context_line":"pushing the migrations ahead of time, and without ironic or nova"},{"line_number":11,"context_line":"services running."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I459bce472227ee08230d3120d9e2eb1bde635218"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f2577a7_5fcdb25b","line":12,"updated":"2017-09-11 22:11:25.000000000","message":"Maybe explain why we are doing this as a separate command and not part of online_data_migrations. Related to the discussion in IRC, this commit message plus the docs for this (man page) are talking about running this \"offline\" and you and melwitt were saying, \"but we\u0027ve always had offline migrations with the online_data_migrations CLI\" which doesn\u0027t make sense to me as you can run that *online* plus our upgrade doc talks about running online_data_migrations *after* bringing the services up on the new code:\n\nhttps://docs.openstack.org/nova/latest/user/upgrade.html#rolling-upgrade-process\n\n\"Once all the services are running the latest version of the code, and all the services are aware they all have been upgraded, it is safe to transform the data in the database into its new format. While some of this work happens on demand when the system reads a database row that needs updating, we must get all the data transformed into the current version before the next upgrade. Additionally, some data may not be transformed automatically so performing the data migration is necessary to avoid performance degradation due to compatibility routines.\"","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"850318b53a9b03ce982802cabdc3c94bcbe26896","unresolved":false,"context_lines":[{"line_number":13,"context_line":"This is a similar operation to online_data_migrations, but there is"},{"line_number":14,"context_line":"a need to pass data that would normally be retrieved from ironic."},{"line_number":15,"context_line":"However, we want this to work offline and thus that data must be"},{"line_number":16,"context_line":"provided locally. When fast-forwarding through the pike release,"},{"line_number":17,"context_line":"ironic and nova-compute will never be started and thus we can\u0027t rely"},{"line_number":18,"context_line":"on the online nature of the migration integrated into the ironic"},{"line_number":19,"context_line":"driver."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5f2577a7_34955641","line":17,"range":{"start_line":16,"start_character":18,"end_line":17,"end_character":45},"updated":"2017-09-12 17:37:25.000000000","message":"Well, in the Red Hat flavor of doing skip level upgrades, but sure. In general I would like to avoid assumptions about how vendors are going to be doing skip level upgrades unless we actually have some documented guidelines upstream, which it sounds like might happen after the PTG, but it\u0027s docs and operators so who knows. Also, maybe that\u0027s just the definition of \"fast-forward\" through Pike, so OK.","commit_id":"610a52c4badd1415a830b34715d64622aa7e6453"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"94022237bbf10227f583952a8fc1cff1fdd04bd6","unresolved":false,"context_lines":[{"line_number":13,"context_line":"This is a similar operation to online_data_migrations, but there is"},{"line_number":14,"context_line":"a need to pass data that would normally be retrieved from ironic."},{"line_number":15,"context_line":"However, we want this to work offline and thus that data must be"},{"line_number":16,"context_line":"provided locally. When fast-forwarding through the pike release,"},{"line_number":17,"context_line":"ironic and nova-compute will never be started and thus we can\u0027t rely"},{"line_number":18,"context_line":"on the online nature of the migration integrated into the ironic"},{"line_number":19,"context_line":"driver."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5f2577a7_ceff9aff","line":17,"range":{"start_line":16,"start_character":18,"end_line":17,"end_character":45},"in_reply_to":"5f2577a7_34955641","updated":"2017-09-12 19:06:09.000000000","message":"Um, yeah, it was heavily discussed in the upgrades room for two days and we settled on the term \"fast-forward\" instead of \"skip-level\".","commit_id":"610a52c4badd1415a830b34715d64622aa7e6453"}],"doc/source/cli/nova-manage.rst":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"15781e623f1e998978306801cc7121068e9ca4f1","unresolved":false,"context_lines":[{"line_number":80,"context_line":" ``nova-manage db ironic_flavor_migration [--all] [--host] [--node] [--resource_class]``"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"   Perform the ironic flavor migration process against the database while"},{"line_number":83,"context_line":"   services are offline. This is `not recommended` for most people. The ironic"},{"line_number":84,"context_line":"   compute driver will do this online and as necessary if run normally. This routine"},{"line_number":85,"context_line":"   is provided only for advanced users that may be skipping the pike release, never"},{"line_number":86,"context_line":"   able to run services normally at the pike level. Since this utility is for use"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f287b81_22049a49","line":83,"updated":"2017-09-07 14:37:38.000000000","message":"nit: I think ** is a better way to highlight a warning","commit_id":"4715a4b844628b6b0eafb5db61d26acfbd58ab99"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"15781e623f1e998978306801cc7121068e9ca4f1","unresolved":false,"context_lines":[{"line_number":82,"context_line":"   Perform the ironic flavor migration process against the database while"},{"line_number":83,"context_line":"   services are offline. This is `not recommended` for most people. The ironic"},{"line_number":84,"context_line":"   compute driver will do this online and as necessary if run normally. This routine"},{"line_number":85,"context_line":"   is provided only for advanced users that may be skipping the pike release, never"},{"line_number":86,"context_line":"   able to run services normally at the pike level. Since this utility is for use"},{"line_number":87,"context_line":"   when all services (including ironic) are down, you must pass the resource class"},{"line_number":88,"context_line":"   set on your node(s) with the ``--resource_class`` parameter."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f287b81_02019e38","line":85,"updated":"2017-09-07 14:37:38.000000000","message":"aren\u0027t we upper-casing release code names (I really don\u0027t know)?","commit_id":"4715a4b844628b6b0eafb5db61d26acfbd58ab99"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"15781e623f1e998978306801cc7121068e9ca4f1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"   is provided only for advanced users that may be skipping the pike release, never"},{"line_number":86,"context_line":"   able to run services normally at the pike level. Since this utility is for use"},{"line_number":87,"context_line":"   when all services (including ironic) are down, you must pass the resource class"},{"line_number":88,"context_line":"   set on your node(s) with the ``--resource_class`` parameter."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"   To migrate a specific host and node, provide the hostname and node uuid with"},{"line_number":91,"context_line":"   ``--host $hostname --node $uuid``. To migrate all instances on nodes managed"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f287b81_e2f9f24d","line":88,"updated":"2017-09-07 14:37:38.000000000","message":"nit: --resource-class for similarity with ironic OSC plugin","commit_id":"4715a4b844628b6b0eafb5db61d26acfbd58ab99"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":77,"context_line":"   call. If not specified, migration will occur in batches of 50 until fully"},{"line_number":78,"context_line":"   complete."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":" ``nova-manage db ironic_flavor_migration [--all] [--host] [--node] [--resource_class]``"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"   Perform the ironic flavor migration process against the database while"},{"line_number":83,"context_line":"   services are offline. This is `not recommended` for most people. The ironic"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5f2577a7_e9f4ac5d","line":80,"range":{"start_line":80,"start_character":0,"end_line":80,"end_character":1},"updated":"2017-09-11 22:11:25.000000000","message":"You have to drop this whitespace otherwise it\u0027s nested:\n\nhttp://docs-draft.openstack.org/25/501025/5/check/gate-nova-docs-ubuntu-xenial/365dbb4//doc/build/html/cli/nova-manage.html#nova-database","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":82,"context_line":"   Perform the ironic flavor migration process against the database while"},{"line_number":83,"context_line":"   services are offline. This is `not recommended` for most people. The ironic"},{"line_number":84,"context_line":"   compute driver will do this online and as necessary if run normally. This routine"},{"line_number":85,"context_line":"   is provided only for advanced users that may be skipping the pike release, never"},{"line_number":86,"context_line":"   able to run services normally at the pike level. Since this utility is for use"},{"line_number":87,"context_line":"   when all services (including ironic) are down, you must pass the resource class"},{"line_number":88,"context_line":"   set on your node(s) with the ``--resource_class`` parameter."}],"source_content_type":"text/x-rst","patch_set":5,"id":"5f2577a7_8903e842","line":85,"range":{"start_line":85,"start_character":64,"end_line":85,"end_character":68},"updated":"2017-09-11 22:11:25.000000000","message":"nit: 16.0.0 Pike","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":83,"context_line":"   services are offline. This is `not recommended` for most people. The ironic"},{"line_number":84,"context_line":"   compute driver will do this online and as necessary if run normally. This routine"},{"line_number":85,"context_line":"   is provided only for advanced users that may be skipping the pike release, never"},{"line_number":86,"context_line":"   able to run services normally at the pike level. Since this utility is for use"},{"line_number":87,"context_line":"   when all services (including ironic) are down, you must pass the resource class"},{"line_number":88,"context_line":"   set on your node(s) with the ``--resource_class`` parameter."},{"line_number":89,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"5f2577a7_89b1a892","line":86,"range":{"start_line":86,"start_character":40,"end_line":86,"end_character":44},"updated":"2017-09-11 22:11:25.000000000","message":"Pike","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"850318b53a9b03ce982802cabdc3c94bcbe26896","unresolved":false,"context_lines":[{"line_number":101,"context_line":"   Note that this is not recommended unless you need to run this"},{"line_number":102,"context_line":"   specific data migration offline, and it should be used with care as"},{"line_number":103,"context_line":"   the work done is non-trivial. Running smaller and more targeted batches (such as"},{"line_number":104,"context_line":"   speific nodes) is recommended."},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"Nova API Database"},{"line_number":107,"context_line":"~~~~~~~~~~~~~~~~~"}],"source_content_type":"text/x-rst","patch_set":6,"id":"5f2577a7_74b2bee8","line":104,"range":{"start_line":104,"start_character":3,"end_line":104,"end_character":10},"updated":"2017-09-12 17:37:25.000000000","message":"specific","commit_id":"610a52c4badd1415a830b34715d64622aa7e6453"}],"nova/cmd/manage.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4b58c4325cfad11290eb8034d324e4edb8de7456","unresolved":false,"context_lines":[{"line_number":860,"context_line":"          help\u003d\u0027Compute service name to migrate nodes on\u0027)"},{"line_number":861,"context_line":"    @args(\u0027--node\u0027, metavar\u003d\u0027\u003cnode\u003e\u0027,"},{"line_number":862,"context_line":"          help\u003d\u0027Ironic node to migrate (all on the host if omitted)\u0027)"},{"line_number":863,"context_line":"    @args(\u0027--resource_class\u0027, metavar\u003d\u0027\u003cclass\u003e\u0027,"},{"line_number":864,"context_line":"          help\u003d\u0027Ironic node class to set on instances\u0027)"},{"line_number":865,"context_line":"    @args(\u0027--all\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":866,"context_line":"          help\u003d\u0027Run migrations for all ironic hosts and nodes\u0027)"},{"line_number":867,"context_line":"    def ironic_flavor_migration(self, host, node, resource_class, all_hosts):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_13a6b954","line":864,"range":{"start_line":863,"start_character":0,"end_line":864,"end_character":55},"updated":"2017-09-06 15:17:17.000000000","message":"Shouldn\u0027t we ensure this is set before we start with the migration or is None valid somehow?","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a1670915f0f83ecc92c4e90bca0776a7327214a7","unresolved":false,"context_lines":[{"line_number":860,"context_line":"          help\u003d\u0027Compute service name to migrate nodes on\u0027)"},{"line_number":861,"context_line":"    @args(\u0027--node\u0027, metavar\u003d\u0027\u003cnode\u003e\u0027,"},{"line_number":862,"context_line":"          help\u003d\u0027Ironic node to migrate (all on the host if omitted)\u0027)"},{"line_number":863,"context_line":"    @args(\u0027--resource_class\u0027, metavar\u003d\u0027\u003cclass\u003e\u0027,"},{"line_number":864,"context_line":"          help\u003d\u0027Ironic node class to set on instances\u0027)"},{"line_number":865,"context_line":"    @args(\u0027--all\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":866,"context_line":"          help\u003d\u0027Run migrations for all ironic hosts and nodes\u0027)"},{"line_number":867,"context_line":"    def ironic_flavor_migration(self, host, node, resource_class, all_hosts):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_2eab8a1d","line":864,"range":{"start_line":863,"start_character":0,"end_line":864,"end_character":55},"in_reply_to":"7f287b81_13a6b954","updated":"2017-09-06 15:54:36.000000000","message":"Yep.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf7597c5a0e9acf438f41520b865a96858e944e7","unresolved":false,"context_lines":[{"line_number":890,"context_line":"        \"\"\""},{"line_number":891,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if all_hosts:"},{"line_number":894,"context_line":"            cns \u003d objects.ComputeNodeList.get_by_hypervisor(ctx, \u0027ironic\u0027)"},{"line_number":895,"context_line":"            if host or node:"},{"line_number":896,"context_line":"                print(_(\u0027--all with --host and/or --node does not make sense\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_e9045cc8","line":893,"range":{"start_line":893,"start_character":11,"end_line":893,"end_character":20},"updated":"2017-09-06 16:04:34.000000000","message":"You don\u0027t have a test where this is True and host/node are None.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3f1db9e4e804273caf52801bd844dd9c66615956","unresolved":false,"context_lines":[{"line_number":890,"context_line":"        \"\"\""},{"line_number":891,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if all_hosts:"},{"line_number":894,"context_line":"            cns \u003d objects.ComputeNodeList.get_by_hypervisor(ctx, \u0027ironic\u0027)"},{"line_number":895,"context_line":"            if host or node:"},{"line_number":896,"context_line":"                print(_(\u0027--all with --host and/or --node does not make sense\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_299ee462","line":893,"range":{"start_line":893,"start_character":11,"end_line":893,"end_character":20},"in_reply_to":"7f287b81_e9045cc8","updated":"2017-09-06 16:09:41.000000000","message":"Right, because I hadn\u0027t gone bck to implement the by-hypervisor-type function, so I couldn\u0027t test this case.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fcf9c38501a5968cbc504abc2d917eb8eff5c7e5","unresolved":false,"context_lines":[{"line_number":891,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if all_hosts:"},{"line_number":894,"context_line":"            cns \u003d objects.ComputeNodeList.get_by_hypervisor(ctx, \u0027ironic\u0027)"},{"line_number":895,"context_line":"            if host or node:"},{"line_number":896,"context_line":"                print(_(\u0027--all with --host and/or --node does not make sense\u0027))"},{"line_number":897,"context_line":"                return 3"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_eec6a216","line":894,"updated":"2017-09-06 15:53:28.000000000","message":"Doesn\u0027t this lookup need to be cell aware?","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fcf9c38501a5968cbc504abc2d917eb8eff5c7e5","unresolved":false,"context_lines":[{"line_number":891,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if all_hosts:"},{"line_number":894,"context_line":"            cns \u003d objects.ComputeNodeList.get_by_hypervisor(ctx, \u0027ironic\u0027)"},{"line_number":895,"context_line":"            if host or node:"},{"line_number":896,"context_line":"                print(_(\u0027--all with --host and/or --node does not make sense\u0027))"},{"line_number":897,"context_line":"                return 3"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_eeefc284","line":894,"range":{"start_line":894,"start_character":42,"end_line":894,"end_character":59},"updated":"2017-09-06 15:53:28.000000000","message":"This is not the right method, this is a regex match on the hostname, which is not what you want. You need to get all compute nodes and then filter them in code by the hypervisor_type.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"83555008f65855efc97c9d348d6da5328581e643","unresolved":false,"context_lines":[{"line_number":891,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if all_hosts:"},{"line_number":894,"context_line":"            cns \u003d objects.ComputeNodeList.get_by_hypervisor(ctx, \u0027ironic\u0027)"},{"line_number":895,"context_line":"            if host or node:"},{"line_number":896,"context_line":"                print(_(\u0027--all with --host and/or --node does not make sense\u0027))"},{"line_number":897,"context_line":"                return 3"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_e9369cb4","line":894,"range":{"start_line":894,"start_character":42,"end_line":894,"end_character":59},"in_reply_to":"7f287b81_890b9822","updated":"2017-09-06 16:03:20.000000000","message":"Correction, it\u0027s a regex match on the node name, not the \u0027host\u0027:\n\nhttps://github.com/openstack/nova/blob/7615b52dac29b666c1951aaad0e601383b7bd42c/nova/db/sqlalchemy/api.py#L734\n\nSo that\u0027s even worse for ironic since you\u0027d be regex matching on a UUID...for everything else it\u0027s 1:1 with host so it works.\n\nNote this is from our shitty REST API:\n\nhttps://developer.openstack.org/api-ref/compute/#search-hypervisor","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3f1db9e4e804273caf52801bd844dd9c66615956","unresolved":false,"context_lines":[{"line_number":891,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if all_hosts:"},{"line_number":894,"context_line":"            cns \u003d objects.ComputeNodeList.get_by_hypervisor(ctx, \u0027ironic\u0027)"},{"line_number":895,"context_line":"            if host or node:"},{"line_number":896,"context_line":"                print(_(\u0027--all with --host and/or --node does not make sense\u0027))"},{"line_number":897,"context_line":"                return 3"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_29aca48a","line":894,"range":{"start_line":894,"start_character":42,"end_line":894,"end_character":59},"in_reply_to":"7f287b81_e9369cb4","updated":"2017-09-06 16:09:41.000000000","message":"Again, I meant to go back and change this and forgot. I mentioned in IRC yesterday I\u0027d have to create a new query method but that I would make it not remotable to avoid the rpc change for the backport. And then...forgot to come back to this.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a1670915f0f83ecc92c4e90bca0776a7327214a7","unresolved":false,"context_lines":[{"line_number":891,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if all_hosts:"},{"line_number":894,"context_line":"            cns \u003d objects.ComputeNodeList.get_by_hypervisor(ctx, \u0027ironic\u0027)"},{"line_number":895,"context_line":"            if host or node:"},{"line_number":896,"context_line":"                print(_(\u0027--all with --host and/or --node does not make sense\u0027))"},{"line_number":897,"context_line":"                return 3"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_890b9822","line":894,"range":{"start_line":894,"start_character":42,"end_line":894,"end_character":59},"in_reply_to":"7f287b81_eeefc284","updated":"2017-09-06 15:54:36.000000000","message":"Gah, right, I meant to leave myself a todo here before writing the tests and then forgot.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4b58c4325cfad11290eb8034d324e4edb8de7456","unresolved":false,"context_lines":[{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if all_hosts:"},{"line_number":894,"context_line":"            cns \u003d objects.ComputeNodeList.get_by_hypervisor(ctx, \u0027ironic\u0027)"},{"line_number":895,"context_line":"            if host or node:"},{"line_number":896,"context_line":"                print(_(\u0027--all with --host and/or --node does not make sense\u0027))"},{"line_number":897,"context_line":"                return 3"},{"line_number":898,"context_line":"        elif host and node:"},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                cn \u003d objects.ComputeNode.get_by_host_and_nodename(ctx, host,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_93806948","line":897,"range":{"start_line":895,"start_character":0,"end_line":897,"end_character":24},"updated":"2017-09-06 15:17:17.000000000","message":"nit - Should we do this before grab everything from the DB?","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a1670915f0f83ecc92c4e90bca0776a7327214a7","unresolved":false,"context_lines":[{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if all_hosts:"},{"line_number":894,"context_line":"            cns \u003d objects.ComputeNodeList.get_by_hypervisor(ctx, \u0027ironic\u0027)"},{"line_number":895,"context_line":"            if host or node:"},{"line_number":896,"context_line":"                print(_(\u0027--all with --host and/or --node does not make sense\u0027))"},{"line_number":897,"context_line":"                return 3"},{"line_number":898,"context_line":"        elif host and node:"},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                cn \u003d objects.ComputeNode.get_by_host_and_nodename(ctx, host,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_8eba7e6b","line":897,"range":{"start_line":895,"start_character":0,"end_line":897,"end_character":24},"in_reply_to":"7f287b81_93806948","updated":"2017-09-06 15:54:36.000000000","message":"Yep, meant to.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fcf9c38501a5968cbc504abc2d917eb8eff5c7e5","unresolved":false,"context_lines":[{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if all_hosts:"},{"line_number":894,"context_line":"            cns \u003d objects.ComputeNodeList.get_by_hypervisor(ctx, \u0027ironic\u0027)"},{"line_number":895,"context_line":"            if host or node:"},{"line_number":896,"context_line":"                print(_(\u0027--all with --host and/or --node does not make sense\u0027))"},{"line_number":897,"context_line":"                return 3"},{"line_number":898,"context_line":"        elif host and node:"},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                cn \u003d objects.ComputeNode.get_by_host_and_nodename(ctx, host,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_6e03d243","line":897,"range":{"start_line":895,"start_character":0,"end_line":897,"end_character":24},"in_reply_to":"7f287b81_93806948","updated":"2017-09-06 15:53:28.000000000","message":"Yes.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4b58c4325cfad11290eb8034d324e4edb8de7456","unresolved":false,"context_lines":[{"line_number":922,"context_line":"            return 1"},{"line_number":923,"context_line":""},{"line_number":924,"context_line":"        for cn in cns:"},{"line_number":925,"context_line":"            inst \u003d objects.InstanceList.get_by_filters("},{"line_number":926,"context_line":"                ctx, {\u0027node\u0027: cn.hypervisor_hostname})"},{"line_number":927,"context_line":"            if len(inst) \u003e 1:"},{"line_number":928,"context_line":"                print(_(\u0027Ironic node has two instances? Something is wrong.\u0027))"},{"line_number":929,"context_line":"                return 2"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"            ironic.IronicDriver._pike_flavor_migration_for_node(ctx,"},{"line_number":932,"context_line":"                                                                resource_class,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_53ca016e","line":929,"range":{"start_line":925,"start_character":0,"end_line":929,"end_character":24},"updated":"2017-09-06 15:17:17.000000000","message":"nit - so cn.hypervisor_hostname is the ironic node UUID here, that\u0027s why it should map to a single instance. A comment highlighting that would be useful *if* you respin.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a1670915f0f83ecc92c4e90bca0776a7327214a7","unresolved":false,"context_lines":[{"line_number":922,"context_line":"            return 1"},{"line_number":923,"context_line":""},{"line_number":924,"context_line":"        for cn in cns:"},{"line_number":925,"context_line":"            inst \u003d objects.InstanceList.get_by_filters("},{"line_number":926,"context_line":"                ctx, {\u0027node\u0027: cn.hypervisor_hostname})"},{"line_number":927,"context_line":"            if len(inst) \u003e 1:"},{"line_number":928,"context_line":"                print(_(\u0027Ironic node has two instances? Something is wrong.\u0027))"},{"line_number":929,"context_line":"                return 2"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"            ironic.IronicDriver._pike_flavor_migration_for_node(ctx,"},{"line_number":932,"context_line":"                                                                resource_class,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_ae6c1a08","line":929,"range":{"start_line":925,"start_character":0,"end_line":929,"end_character":24},"in_reply_to":"7f287b81_53ca016e","updated":"2017-09-06 15:54:36.000000000","message":"Okay I\u0027m not sure why that (node \u003d\u003d uuid) matters here but if you think it will help for some reason, that\u0027s fine.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fcf9c38501a5968cbc504abc2d917eb8eff5c7e5","unresolved":false,"context_lines":[{"line_number":928,"context_line":"                print(_(\u0027Ironic node has two instances? Something is wrong.\u0027))"},{"line_number":929,"context_line":"                return 2"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"            ironic.IronicDriver._pike_flavor_migration_for_node(ctx,"},{"line_number":932,"context_line":"                                                                resource_class,"},{"line_number":933,"context_line":"                                                                inst[0].uuid)"},{"line_number":934,"context_line":"        return 0"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_4e7136de","line":931,"range":{"start_line":931,"start_character":32,"end_line":931,"end_character":63},"updated":"2017-09-06 15:53:28.000000000","message":"This method doesn\u0027t exist. Did you mean _pike_flavor_migration?","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8a32e15354b9137a9391a37a3986054053a2b64b","unresolved":false,"context_lines":[{"line_number":928,"context_line":"                print(_(\u0027Ironic node has two instances? Something is wrong.\u0027))"},{"line_number":929,"context_line":"                return 2"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"            ironic.IronicDriver._pike_flavor_migration_for_node(ctx,"},{"line_number":932,"context_line":"                                                                resource_class,"},{"line_number":933,"context_line":"                                                                inst[0].uuid)"},{"line_number":934,"context_line":"        return 0"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_e94c5c77","line":931,"range":{"start_line":931,"start_character":32,"end_line":931,"end_character":63},"in_reply_to":"7f287b81_4e7136de","updated":"2017-09-06 15:55:29.000000000","message":"See the change before this one.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5f611161b690ceae22055cfad65a6cae7ecab8fe","unresolved":false,"context_lines":[{"line_number":928,"context_line":"                print(_(\u0027Ironic node has two instances? Something is wrong.\u0027))"},{"line_number":929,"context_line":"                return 2"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"            ironic.IronicDriver._pike_flavor_migration_for_node(ctx,"},{"line_number":932,"context_line":"                                                                resource_class,"},{"line_number":933,"context_line":"                                                                inst[0].uuid)"},{"line_number":934,"context_line":"        return 0"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_c99d20bc","line":931,"range":{"start_line":931,"start_character":32,"end_line":931,"end_character":63},"in_reply_to":"7f287b81_e94c5c77","updated":"2017-09-06 15:58:14.000000000","message":"I refuse to see it.","commit_id":"c6469a96f1b7ae3715f06856975b416419b6cd9e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"15781e623f1e998978306801cc7121068e9ca4f1","unresolved":false,"context_lines":[{"line_number":892,"context_line":"        3: Invalid combination of required arguments"},{"line_number":893,"context_line":"        \"\"\""},{"line_number":894,"context_line":"        if not resource_class:"},{"line_number":895,"context_line":"            print(_(\u0027A resource_class is required for all modes of operation\u0027))"},{"line_number":896,"context_line":"            return 3"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_c2f6f65d","line":895,"updated":"2017-09-07 14:37:38.000000000","message":"nit: file\u003dsys.stderr here and below (not sure how you usually do it here)","commit_id":"4715a4b844628b6b0eafb5db61d26acfbd58ab99"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":900,"context_line":"    @args(\u0027--host\u0027, metavar\u003d\u0027\u003chost\u003e\u0027,"},{"line_number":901,"context_line":"          help\u003d\u0027Compute service name to migrate nodes on\u0027)"},{"line_number":902,"context_line":"    @args(\u0027--node\u0027, metavar\u003d\u0027\u003cnode\u003e\u0027,"},{"line_number":903,"context_line":"          help\u003d\u0027Ironic node to migrate (all on the host if omitted)\u0027)"},{"line_number":904,"context_line":"    @args(\u0027--resource_class\u0027, metavar\u003d\u0027\u003cclass\u003e\u0027,"},{"line_number":905,"context_line":"          help\u003d\u0027Ironic node class to set on instances\u0027)"},{"line_number":906,"context_line":"    @args(\u0027--all\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_441cc769","line":903,"range":{"start_line":903,"start_character":16,"end_line":903,"end_character":38},"updated":"2017-09-11 22:11:25.000000000","message":"nit: could mention this is the node uuid","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":901,"context_line":"          help\u003d\u0027Compute service name to migrate nodes on\u0027)"},{"line_number":902,"context_line":"    @args(\u0027--node\u0027, metavar\u003d\u0027\u003cnode\u003e\u0027,"},{"line_number":903,"context_line":"          help\u003d\u0027Ironic node to migrate (all on the host if omitted)\u0027)"},{"line_number":904,"context_line":"    @args(\u0027--resource_class\u0027, metavar\u003d\u0027\u003cclass\u003e\u0027,"},{"line_number":905,"context_line":"          help\u003d\u0027Ironic node class to set on instances\u0027)"},{"line_number":906,"context_line":"    @args(\u0027--all\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":907,"context_line":"          help\u003d\u0027Run migrations for all ironic hosts and nodes\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_444847cb","line":904,"updated":"2017-09-11 22:11:25.000000000","message":"If resource class is required, can we make it not be an option and make it an argument instead? I\u0027m not actually sure how we did that with nova-manage though since it\u0027s not like argparse.","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":914,"context_line":"        However, if you need to push the migration manually, then use"},{"line_number":915,"context_line":"        this."},{"line_number":916,"context_line":""},{"line_number":917,"context_line":"        This is idempotent, but not trivial to start/stop/resume. It is"},{"line_number":918,"context_line":"        recommended that you do this with care and not from a script"},{"line_number":919,"context_line":"        assuming it is trivial."},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"        Running with --all may generate a large amount of DB traffic"},{"line_number":922,"context_line":"        all at once. Running at least one host at a time is recommended"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_84dcef74","line":919,"range":{"start_line":917,"start_character":66,"end_line":919,"end_character":31},"updated":"2017-09-11 22:11:25.000000000","message":"seems like we\u0027d want this warning in the man page","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":924,"context_line":""},{"line_number":925,"context_line":"        Return values:"},{"line_number":926,"context_line":""},{"line_number":927,"context_line":"        0: All work is completed (or none is needed)"},{"line_number":928,"context_line":"        1: Specified host and/or node is not found, or no ironic nodes present"},{"line_number":929,"context_line":"        2: Internal accounting error shows more than one instance per node"},{"line_number":930,"context_line":"        3: Invalid combination of required arguments"},{"line_number":931,"context_line":"        \"\"\""},{"line_number":932,"context_line":"        if not resource_class:"},{"line_number":933,"context_line":"            print(_(\u0027A resource_class is required for all modes of operation\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_a4a92be0","line":930,"range":{"start_line":927,"start_character":8,"end_line":930,"end_character":52},"updated":"2017-09-11 22:11:25.000000000","message":"nit: could mention these in the man page, although people like return codes for scripting and you said to not script this...","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":971,"context_line":"            # ComputeNode.hypervisor_hostname, which in the case of ironic is"},{"line_number":972,"context_line":"            # the node uuid. Since only one instance can be on a node in"},{"line_number":973,"context_line":"            # ironic, do another sanity check here to make sure we look legit."},{"line_number":974,"context_line":"            inst \u003d objects.InstanceList.get_by_filters("},{"line_number":975,"context_line":"                ctx, {\u0027node\u0027: cn.hypervisor_hostname})"},{"line_number":976,"context_line":"            if len(inst) \u003e 1:"},{"line_number":977,"context_line":"                print(_(\u0027Ironic node has two instances? Something is wrong.\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_5f001235","line":974,"range":{"start_line":974,"start_character":40,"end_line":974,"end_character":54},"updated":"2017-09-11 22:11:25.000000000","message":"Does this exclude (soft) deleted instances? Looks like yes, from the docstring on the DB API method:\n\n\"Deleted instances will be returned by default, unless there\u0027s a filter that says otherwise.\"\n\nDo we want to migrate deleted instances? I would think not, as I\u0027d expect to hit an InstanceNotFound at some point loading things like flavors.","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0ceb4caa4957ffafb3102eee16639d0febc17aeb","unresolved":false,"context_lines":[{"line_number":971,"context_line":"            # ComputeNode.hypervisor_hostname, which in the case of ironic is"},{"line_number":972,"context_line":"            # the node uuid. Since only one instance can be on a node in"},{"line_number":973,"context_line":"            # ironic, do another sanity check here to make sure we look legit."},{"line_number":974,"context_line":"            inst \u003d objects.InstanceList.get_by_filters("},{"line_number":975,"context_line":"                ctx, {\u0027node\u0027: cn.hypervisor_hostname})"},{"line_number":976,"context_line":"            if len(inst) \u003e 1:"},{"line_number":977,"context_line":"                print(_(\u0027Ironic node has two instances? Something is wrong.\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_54034274","line":974,"range":{"start_line":974,"start_character":40,"end_line":974,"end_character":54},"in_reply_to":"5f2577a7_5f001235","updated":"2017-09-12 17:38:21.000000000","message":"s/exclude/include/\n\noops - kind of important difference","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":974,"context_line":"            inst \u003d objects.InstanceList.get_by_filters("},{"line_number":975,"context_line":"                ctx, {\u0027node\u0027: cn.hypervisor_hostname})"},{"line_number":976,"context_line":"            if len(inst) \u003e 1:"},{"line_number":977,"context_line":"                print(_(\u0027Ironic node has two instances? Something is wrong.\u0027))"},{"line_number":978,"context_line":"                return 2"},{"line_number":979,"context_line":""},{"line_number":980,"context_line":"            ironic.IronicDriver._pike_flavor_migration_for_node(ctx,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_ff5e9de4","line":977,"range":{"start_line":977,"start_character":25,"end_line":977,"end_character":74},"updated":"2017-09-11 22:11:25.000000000","message":"We\u0027re in a loop so you\u0027re going to want the host/node in this error message since we might have migrated some things for earlier nodes but then failed on this one for whatever weird reason.\n\n--\n\ns/two instances/multiple instances/","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":977,"context_line":"                print(_(\u0027Ironic node has two instances? Something is wrong.\u0027))"},{"line_number":978,"context_line":"                return 2"},{"line_number":979,"context_line":""},{"line_number":980,"context_line":"            ironic.IronicDriver._pike_flavor_migration_for_node(ctx,"},{"line_number":981,"context_line":"                                                                resource_class,"},{"line_number":982,"context_line":"                                                                inst[0].uuid)"},{"line_number":983,"context_line":"        return 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_dff881c5","line":980,"range":{"start_line":980,"start_character":32,"end_line":980,"end_character":63},"updated":"2017-09-11 22:11:25.000000000","message":"The _pike_flavor_migration_for_node method has a boolean return value, did you intend on using that anywhere?","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":977,"context_line":"                print(_(\u0027Ironic node has two instances? Something is wrong.\u0027))"},{"line_number":978,"context_line":"                return 2"},{"line_number":979,"context_line":""},{"line_number":980,"context_line":"            ironic.IronicDriver._pike_flavor_migration_for_node(ctx,"},{"line_number":981,"context_line":"                                                                resource_class,"},{"line_number":982,"context_line":"                                                                inst[0].uuid)"},{"line_number":983,"context_line":"        return 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_1f0f29e2","line":980,"updated":"2017-09-11 22:11:25.000000000","message":"nit: If you have specified --all or just --host I could see value in providing a --verbose option which prints a message once we\u0027ve migrated the instance for a given node.","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"850318b53a9b03ce982802cabdc3c94bcbe26896","unresolved":false,"context_lines":[{"line_number":985,"context_line":"            result \u003d ironic.IronicDriver._pike_flavor_migration_for_node("},{"line_number":986,"context_line":"                ctx,"},{"line_number":987,"context_line":"                resource_class,"},{"line_number":988,"context_line":"                inst[0].uuid)"},{"line_number":989,"context_line":"            if result:"},{"line_number":990,"context_line":"                print(_(\u0027Migrated instance %(uuid)s on node %(node)s\u0027) % {"},{"line_number":991,"context_line":"                    \u0027uuid\u0027: inst[0].uuid,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f2577a7_b414a6a1","line":988,"range":{"start_line":988,"start_character":16,"end_line":988,"end_character":23},"updated":"2017-09-12 17:37:25.000000000","message":"Umm, IndexError here if inst is an empty list?","commit_id":"610a52c4badd1415a830b34715d64622aa7e6453"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"94022237bbf10227f583952a8fc1cff1fdd04bd6","unresolved":false,"context_lines":[{"line_number":985,"context_line":"            result \u003d ironic.IronicDriver._pike_flavor_migration_for_node("},{"line_number":986,"context_line":"                ctx,"},{"line_number":987,"context_line":"                resource_class,"},{"line_number":988,"context_line":"                inst[0].uuid)"},{"line_number":989,"context_line":"            if result:"},{"line_number":990,"context_line":"                print(_(\u0027Migrated instance %(uuid)s on node %(node)s\u0027) % {"},{"line_number":991,"context_line":"                    \u0027uuid\u0027: inst[0].uuid,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f2577a7_4e3ccac7","line":988,"range":{"start_line":988,"start_character":16,"end_line":988,"end_character":23},"in_reply_to":"5f2577a7_b414a6a1","updated":"2017-09-12 19:06:09.000000000","message":"Erm, yeah I thought I had already checked that before calling the migration but I clearly haven\u0027t. So, yeah.","commit_id":"610a52c4badd1415a830b34715d64622aa7e6453"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"19b3fb2ed9ad70fe2e2d4558ca3c8b04dd3616ab","unresolved":false,"context_lines":[{"line_number":903,"context_line":"          help\u003d\u0027Ironic node UUID to migrate (all on the host if omitted)\u0027)"},{"line_number":904,"context_line":"    @args(\u0027--resource_class\u0027, metavar\u003d\u0027\u003cclass\u003e\u0027,"},{"line_number":905,"context_line":"          help\u003d\u0027Ironic node class to set on instances\u0027)"},{"line_number":906,"context_line":"    @args(\u0027--all\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":907,"context_line":"          help\u003d\u0027Run migrations for all ironic hosts and nodes\u0027)"},{"line_number":908,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":909,"context_line":"          help\u003d\u0027Print information about migrations being performed\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_c74c1da0","line":906,"updated":"2017-09-12 20:45:22.000000000","message":"You need to set a metavar for this.","commit_id":"e214c902cd1d4b86aed382e3c44cab7588ed70b0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7911d0b6a377522bd6a5b6ba7dabf2fd7ddb8231","unresolved":false,"context_lines":[{"line_number":903,"context_line":"          help\u003d\u0027Ironic node UUID to migrate (all on the host if omitted)\u0027)"},{"line_number":904,"context_line":"    @args(\u0027--resource_class\u0027, metavar\u003d\u0027\u003cclass\u003e\u0027,"},{"line_number":905,"context_line":"          help\u003d\u0027Ironic node class to set on instances\u0027)"},{"line_number":906,"context_line":"    @args(\u0027--all\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":907,"context_line":"          help\u003d\u0027Run migrations for all ironic hosts and nodes\u0027)"},{"line_number":908,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":909,"context_line":"          help\u003d\u0027Print information about migrations being performed\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_a257bf02","line":906,"in_reply_to":"5f2577a7_c74c1da0","updated":"2017-09-12 21:24:04.000000000","message":"Why? it doesn\u0027t take an argument so there\u0027s nothing to show right?","commit_id":"e214c902cd1d4b86aed382e3c44cab7588ed70b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"19b3fb2ed9ad70fe2e2d4558ca3c8b04dd3616ab","unresolved":false,"context_lines":[{"line_number":907,"context_line":"          help\u003d\u0027Run migrations for all ironic hosts and nodes\u0027)"},{"line_number":908,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":909,"context_line":"          help\u003d\u0027Print information about migrations being performed\u0027)"},{"line_number":910,"context_line":"    def ironic_flavor_migration(self, host, node, resource_class, all_hosts,"},{"line_number":911,"context_line":"                                verbose):"},{"line_number":912,"context_line":"        \"\"\"Migrate flavor information for ironic instances."},{"line_number":913,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_47770dd6","line":910,"updated":"2017-09-12 20:45:22.000000000","message":"You have to set defaults for node. all_hosts and verbose. I tried running this with just --all and it blows up, which isn\u0027t caught in tests since you\u0027re calling it directly rather than via CLI:\n\nAn error has occurred:\nTraceback (most recent call last):\n  File \"/opt/stack/nova/nova/cmd/manage.py\", line 1862, in main\n    fn, fn_args, fn_kwargs \u003d cmd_common.get_action_fn()\n  File \"/opt/stack/nova/nova/cmd/common.py\", line 195, in get_action_fn\n    _(\"Missing arguments: %s\") % \", \".join(missing))\nInvalid: Missing arguments: host, node, resource_class, all_hosts\n\nstack@devstack-queens:~/nova$ nova-manage db ironic_flavor_migration --all","commit_id":"e214c902cd1d4b86aed382e3c44cab7588ed70b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3b8c0baa1c30447dbd8564f78f96f1683178b549","unresolved":false,"context_lines":[{"line_number":981,"context_line":"                print(_(\u0027Ironic node %s has multiple instances? \u0027"},{"line_number":982,"context_line":"                        \u0027Something is wrong.\u0027) % cn.hypervisor_hostname)"},{"line_number":983,"context_line":"                return 2"},{"line_number":984,"context_line":"            elif len(inst) \u003d\u003d 1:"},{"line_number":985,"context_line":"                result \u003d ironic.IronicDriver._pike_flavor_migration_for_node("},{"line_number":986,"context_line":"                    ctx, resource_class, inst[0].uuid)"},{"line_number":987,"context_line":"                if result:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_47af0de3","line":984,"range":{"start_line":984,"start_character":12,"end_line":984,"end_character":32},"updated":"2017-09-12 20:19:34.000000000","message":"Sorry but given the IndexError in earlier patches was missed, we should have one of the ironic compute nodes in the functional test to not have any instances on it to make sure nothing blows up for one of those.","commit_id":"e214c902cd1d4b86aed382e3c44cab7588ed70b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a026dfb0969fe99da67f3a2f2588d28775641b95","unresolved":false,"context_lines":[{"line_number":903,"context_line":"          help\u003d\u0027Ironic node UUID to migrate (all on the host if omitted)\u0027)"},{"line_number":904,"context_line":"    @args(\u0027--resource_class\u0027, metavar\u003d\u0027\u003cclass\u003e\u0027, default\u003dNone,"},{"line_number":905,"context_line":"          help\u003d\u0027Ironic node class to set on instances\u0027)"},{"line_number":906,"context_line":"    @args(\u0027--all\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":907,"context_line":"          help\u003d\u0027Run migrations for all ironic hosts and nodes\u0027)"},{"line_number":908,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":909,"context_line":"          help\u003d\u0027Print information about migrations being performed\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_5d7ebe19","line":906,"updated":"2017-09-12 21:33:10.000000000","message":"Needs dest\u003d\u0027all_hosts\u0027.","commit_id":"8b6bb8fcd217efcf53997242d916c8e48522e23a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"22b7696d31cb2561fdeade71269a7656a58d69f2","unresolved":false,"context_lines":[{"line_number":908,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":909,"context_line":"          help\u003d\u0027Print information about migrations being performed\u0027)"},{"line_number":910,"context_line":"    def ironic_flavor_migration(self, host, node, resource_class, all_hosts,"},{"line_number":911,"context_line":"                                verbose):"},{"line_number":912,"context_line":"        \"\"\"Migrate flavor information for ironic instances."},{"line_number":913,"context_line":""},{"line_number":914,"context_line":"        This will manually push the instance flavor migration required"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_fdc44a61","line":911,"range":{"start_line":911,"start_character":32,"end_line":911,"end_character":39},"updated":"2017-09-12 21:32:01.000000000","message":"This isn\u0027t used.","commit_id":"8b6bb8fcd217efcf53997242d916c8e48522e23a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0f6365ae0f3b32260493a804cb2a8e27a33ce5d0","unresolved":false,"context_lines":[{"line_number":930,"context_line":"        0: All work is completed (or none is needed)"},{"line_number":931,"context_line":"        1: Specified host and/or node is not found, or no ironic nodes present"},{"line_number":932,"context_line":"        2: Internal accounting error shows more than one instance per node"},{"line_number":933,"context_line":"        3: Invalid combination of required arguments"},{"line_number":934,"context_line":"        \"\"\""},{"line_number":935,"context_line":"        if not resource_class:"},{"line_number":936,"context_line":"            print(_(\u0027A resource_class is required for all modes of operation\u0027))"},{"line_number":937,"context_line":"            return 3"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f2577a7_53790e91","line":937,"range":{"start_line":933,"start_character":8,"end_line":937,"end_character":20},"updated":"2017-09-12 22:02:35.000000000","message":"Well, this isn\u0027t really true anymore now that we\u0027re using required\u003dTrue in the args thing above...","commit_id":"7d2dd719775ece9b5a31ed6c75f614abf036c8eb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd47cdba90f823e7cca8be4fe3f6e13e9ce7df0e","unresolved":false,"context_lines":[{"line_number":930,"context_line":"        0: All work is completed (or none is needed)"},{"line_number":931,"context_line":"        1: Specified host and/or node is not found, or no ironic nodes present"},{"line_number":932,"context_line":"        2: Internal accounting error shows more than one instance per node"},{"line_number":933,"context_line":"        3: Invalid combination of required arguments"},{"line_number":934,"context_line":"        \"\"\""},{"line_number":935,"context_line":"        if not resource_class:"},{"line_number":936,"context_line":"            print(_(\u0027A resource_class is required for all modes of operation\u0027))"},{"line_number":937,"context_line":"            return 3"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f2577a7_b3bf12fa","line":937,"range":{"start_line":933,"start_character":8,"end_line":937,"end_character":20},"in_reply_to":"5f2577a7_53790e91","updated":"2017-09-12 22:04:01.000000000","message":"stack@devstack-queens:~/nova$ nova-manage db ironic_flavor_migration --all\nusage: nova-manage db ironic_flavor_migration [-h] --resource_class \u003cclass\u003e\n                                              [--host \u003chost\u003e] [--node \u003cnode\u003e]\n                                              [--all] [--verbose]\nnova-manage db ironic_flavor_migration: error: argument --resource_class is required\nstack@devstack-queens:~/nova$ echo $?\n2","commit_id":"7d2dd719775ece9b5a31ed6c75f614abf036c8eb"}],"nova/tests/functional/test_nova_manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        self.cn4.create()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        self.insts \u003d []"},{"line_number":119,"context_line":"        for cn in (self.cn1, self.cn2, self.cn3, self.cn4, self.cn4):"},{"line_number":120,"context_line":"            flavor \u003d objects.Flavor(extra_specs\u003d{})"},{"line_number":121,"context_line":"            inst \u003d objects.Instance(context\u003dself.context,"},{"line_number":122,"context_line":"                                    user_id\u003dself.context.user_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_3f942537","line":119,"range":{"start_line":119,"start_character":49,"end_line":119,"end_character":67},"updated":"2017-09-11 22:11:25.000000000","message":"I had a hard time figuring out how the last test worked to get \u003e1 instance on the fake-host3 and it\u0027s because of this, so you should throw a comment on this.","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            inst.refresh()"},{"line_number":197,"context_line":"            self.assertNotIn(k, inst.flavor.extra_specs)"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def test_ironic_flavor_migration_invalid(self):"},{"line_number":200,"context_line":"        ret \u003d self.commands.ironic_flavor_migration(None, None,"},{"line_number":201,"context_line":"                                                    \u0027test\u0027, False)"},{"line_number":202,"context_line":"        self.assertEqual(3, ret)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_dfcf617d","line":199,"updated":"2017-09-11 22:11:25.000000000","message":"nit: if you\u0027re going to put multiple invalid scenarios into a single test, add a comment for each one about why it\u0027s invalid.","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        self.cn4.hypervisor_type \u003d \u0027ironic\u0027"},{"line_number":239,"context_line":"        self.cn4.save()"},{"line_number":240,"context_line":"        ret \u003d self.commands.ironic_flavor_migration(\u0027fake-host3\u0027, None,"},{"line_number":241,"context_line":"                                                    \u0027fake-note4\u0027, False)"},{"line_number":242,"context_line":"        self.assertEqual(2, ret)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_df940147","line":241,"range":{"start_line":241,"start_character":58,"end_line":241,"end_character":63},"updated":"2017-09-11 22:11:25.000000000","message":"fake-node4? Also, this is the resource class field, not the node field, is that what you intended here? Doesn\u0027t seem to matter, but it looks weird.","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0c49811a78d12be3a6345a19386f7000d326fe71","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                                                    \u0027fake-node\u0027, True, False)"},{"line_number":238,"context_line":"        self.assertEqual(3, ret)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        # Did not provide a resource_class"},{"line_number":241,"context_line":"        ret \u003d self.commands.ironic_flavor_migration(None, \u0027fake-host\u0027,"},{"line_number":242,"context_line":"                                                    \u0027fake-node\u0027, False, False)"},{"line_number":243,"context_line":"        self.assertEqual(3, ret)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf57530f_87976491","line":240,"updated":"2017-09-20 17:27:35.000000000","message":"Nit: having this text in the assertEqual call might render better, but the line number kinda means that is a waste of time anyway.","commit_id":"8f8982d8ef381729ef12a14f37486335f31c4fd3"}],"releasenotes/notes/ironic_offline_flavor_migration-4845307799f0e24e.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3a62a4d93e73e3af68fd13b19e4d4790c6b5e144","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The ironic driver will automatically migrate instance flavors for resource classes"},{"line_number":5,"context_line":"    at runtime. If you are not able to run the compute and ironic services at pike because"},{"line_number":6,"context_line":"    you are automating an upgrade past this release, you can use the"},{"line_number":7,"context_line":"    ``nova-manage db ironic_flavor_migration`` to push the migration manually. This is only"},{"line_number":8,"context_line":"    for advanced users taking on the risk of automating the process of upgrading through"},{"line_number":9,"context_line":"    pike and is not recommended for normal users."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f2577a7_dfa2c19a","line":6,"range":{"start_line":6,"start_character":65,"end_line":6,"end_character":68},"updated":"2017-09-11 22:11:25.000000000","message":"nit: either \"use the ... command\" or drop \u0027the\u0027.","commit_id":"c9afd9df6e16b64e3d05f244cecb6e9eccad42de"}]}
