<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/nova.git/nova/objects/instance_mapping.py, branch 23.2.2</title>
<subtitle>opendev.org: openstack/nova.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/'/>
<entry>
<title>Remove six.text_type (1/2)</title>
<updated>2020-12-13T11:25:31+00:00</updated>
<author>
<name>Takashi Natsume</name>
<email>takanattie@gmail.com</email>
</author>
<published>2020-05-14T14:35:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=383e2a8bdcc9210cbe9719d3470fe15b787d46b0'/>
<id>383e2a8bdcc9210cbe9719d3470fe15b787d46b0</id>
<content type='text'>
Replace six.text_type with str.
A subsequent patch will replace other six.text_type.

Change-Id: I23bb9e539d08f5c6202909054c2dd49b6c7a7a0e
Implements: blueprint six-removal
Signed-off-by: Takashi Natsume &lt;takanattie@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace six.text_type with str.
A subsequent patch will replace other six.text_type.

Change-Id: I23bb9e539d08f5c6202909054c2dd49b6c7a7a0e
Implements: blueprint six-removal
Signed-off-by: Takashi Natsume &lt;takanattie@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Raise InstanceMappingNotFound if StaleDataError is encountered</title>
<updated>2020-06-24T20:29:44+00:00</updated>
<author>
<name>melanie witt</name>
<email>melwittt@gmail.com</email>
</author>
<published>2020-06-09T00:27:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=16df22dcd57a73fe3be15c64c41b4081b4826ef2'/>
<id>16df22dcd57a73fe3be15c64c41b4081b4826ef2</id>
<content type='text'>
We have a race where if a user issues a delete request while an
instance is in the middle of booting, we could fail to update the
'queued_for_delete' field on the instance mapping with:

  sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table
  'instance_mappings' expected to update 1 row(s); 0 were matched.

This happens if we've retrieved the instance mapping record from the
database and then it gets deleted by nova-conductor before we attempt
to save() it.

This handles the situation by adding try-except around the update call
to catch StaleDataError and raise InstanceMappingNotFound instead,
which the caller does know how to handle.

Closes-Bug: #1882608

Change-Id: I2cdcad7226312ed81f4242c8d9ac919715524b48
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have a race where if a user issues a delete request while an
instance is in the middle of booting, we could fail to update the
'queued_for_delete' field on the instance mapping with:

  sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table
  'instance_mappings' expected to update 1 row(s); 0 were matched.

This happens if we've retrieved the instance mapping record from the
database and then it gets deleted by nova-conductor before we attempt
to save() it.

This handles the situation by adding try-except around the update call
to catch StaleDataError and raise InstanceMappingNotFound instead,
which the caller does know how to handle.

Closes-Bug: #1882608

Change-Id: I2cdcad7226312ed81f4242c8d9ac919715524b48
</pre>
</div>
</content>
</entry>
<entry>
<title>hacking: Resolve W503 (line break occurred before a binary operator)</title>
<updated>2019-06-24T19:24:06+00:00</updated>
<author>
<name>Stephen Finucane</name>
<email>sfinucan@redhat.com</email>
</author>
<published>2019-05-29T16:31:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=231908a7f42b8329a58e62c8a89204fdeaa16dca'/>
<id>231908a7f42b8329a58e62c8a89204fdeaa16dca</id>
<content type='text'>
Change-Id: I6381365ff882cf23808e8dabfce41143c5e35192
Signed-off-by: Stephen Finucane &lt;sfinucan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I6381365ff882cf23808e8dabfce41143c5e35192
Signed-off-by: Stephen Finucane &lt;sfinucan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Follow up for counting quota usage from placement</title>
<updated>2019-05-31T21:23:58+00:00</updated>
<author>
<name>melanie witt</name>
<email>melwittt@gmail.com</email>
</author>
<published>2019-05-29T17:46:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=5e749150649bd5eb9916f43c9121f9a1904f36e7'/>
<id>5e749150649bd5eb9916f43c9121f9a1904f36e7</id>
<content type='text'>
This addresses comments from the series:

  * Remove usage-specific info from docstring
  * Add note to nova-next job description "changelog"
  * Add info about data migration to config option help
  * Consolidate code under count_usage_from_placement conditional
  * Consolidate variables for checking data migration doneness
  * Remove hard-coded user_id and project_id from func test
  * Re-word code comment about checking data migration doneness

Related to blueprint count-quota-usage-from-placement

Change-Id: Ida2de9256fcc9e092fb9977b8ac067fc1472c316
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This addresses comments from the series:

  * Remove usage-specific info from docstring
  * Add note to nova-next job description "changelog"
  * Add info about data migration to config option help
  * Consolidate code under count_usage_from_placement conditional
  * Consolidate variables for checking data migration doneness
  * Remove hard-coded user_id and project_id from func test
  * Re-word code comment about checking data migration doneness

Related to blueprint count-quota-usage-from-placement

Change-Id: Ida2de9256fcc9e092fb9977b8ac067fc1472c316
</pre>
</div>
</content>
</entry>
<entry>
<title>Use instance mappings to count server group members</title>
<updated>2019-05-31T18:08:39+00:00</updated>
<author>
<name>melanie witt</name>
<email>melwittt@gmail.com</email>
</author>
<published>2019-02-21T02:18:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=799c0e4b952d800c694b5a2487fa596232dd7fac'/>
<id>799c0e4b952d800c694b5a2487fa596232dd7fac</id>
<content type='text'>
This adds a get_count_by_uuids_and_user() method to the InstanceMapping
object and uses it to count instance mappings for the purpose of
counting quota usage for server group members. By counting server group
members via instance mappings, the count is resilient to down cells in
a multi-cell environment.

Part of blueprint count-quota-usage-from-placement

Change-Id: I3ff39d5ed99a68ad8678e5ff62b343f3018b4768
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a get_count_by_uuids_and_user() method to the InstanceMapping
object and uses it to count instance mappings for the purpose of
counting quota usage for server group members. By counting server group
members via instance mappings, the count is resilient to down cells in
a multi-cell environment.

Part of blueprint count-quota-usage-from-placement

Change-Id: I3ff39d5ed99a68ad8678e5ff62b343f3018b4768
</pre>
</div>
</content>
</entry>
<entry>
<title>Add get_counts() to InstanceMappingList</title>
<updated>2019-04-10T22:15:16+00:00</updated>
<author>
<name>melanie witt</name>
<email>melwittt@gmail.com</email>
</author>
<published>2019-02-20T03:16:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=85e287d3ef698548c03c635a81d3b60b6ebe9ba8'/>
<id>85e287d3ef698548c03c635a81d3b60b6ebe9ba8</id>
<content type='text'>
This counts instance mappings for the purpopse of counting quota
usage for instances. By counting instances via instance mappings, the
count is resilient to down cells in a multi-cell environment.

Part of blueprint count-quota-usage-from-placement

Change-Id: I7c1ae466a6a6b6d82548396e0c94b1cdab600b5c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This counts instance mappings for the purpopse of counting quota
usage for instances. By counting instances via instance mappings, the
count is resilient to down cells in a multi-cell environment.

Part of blueprint count-quota-usage-from-placement

Change-Id: I7c1ae466a6a6b6d82548396e0c94b1cdab600b5c
</pre>
</div>
</content>
</entry>
<entry>
<title>Add online data migration for populating user_id</title>
<updated>2019-03-09T00:01:41+00:00</updated>
<author>
<name>melanie witt</name>
<email>melwittt@gmail.com</email>
</author>
<published>2019-01-26T09:11:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=a6bc544aae0775c408640e53ea81c09b4a876c15'/>
<id>a6bc544aae0775c408640e53ea81c09b4a876c15</id>
<content type='text'>
This adds an online data migration for the user_id field on
InstanceMapping. It does this by processing instance mappings that do
not have a value set for the field (i.e. are NULL in the database) and
queries instances in each cell that need to be updated.

Part of blueprint count-quota-usage-from-placement

Change-Id: I8cc873ba63db7b806ab1de0a88fe8a87d4baeea9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds an online data migration for the user_id field on
InstanceMapping. It does this by processing instance mappings that do
not have a value set for the field (i.e. are NULL in the database) and
queries instances in each cell that need to be updated.

Part of blueprint count-quota-usage-from-placement

Change-Id: I8cc873ba63db7b806ab1de0a88fe8a87d4baeea9
</pre>
</div>
</content>
</entry>
<entry>
<title>Add user_id field to InstanceMapping</title>
<updated>2019-03-09T00:01:16+00:00</updated>
<author>
<name>melanie witt</name>
<email>melwittt@gmail.com</email>
</author>
<published>2019-01-26T07:10:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=7475e850174e3255696fad3f462558421d05d2fa'/>
<id>7475e850174e3255696fad3f462558421d05d2fa</id>
<content type='text'>
This adds the new user_id column from the instance_mappings table as
a field in the InstanceMapping object. There is already a project_id
field containing the project_id for the instance. The user_id field
will contain the corresponding user_id for the instance.

Part of blueprint count-quota-usage-from-placement

Change-Id: I0f523b2a2e09e1ece9e1911325e55cffd183a9d5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the new user_id column from the instance_mappings table as
a field in the InstanceMapping object. There is already a project_id
field containing the project_id for the instance. The user_id field
will contain the corresponding user_id for the instance.

Part of blueprint count-quota-usage-from-placement

Change-Id: I0f523b2a2e09e1ece9e1911325e55cffd183a9d5
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize populate_queued_for_delete online data migration</title>
<updated>2019-02-27T21:28:03+00:00</updated>
<author>
<name>Matt Riedemann</name>
<email>mriedem.os@gmail.com</email>
</author>
<published>2019-02-27T21:24:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=47061e699b9dbf6fdeea572a5abeaa72e499ec87'/>
<id>47061e699b9dbf6fdeea572a5abeaa72e499ec87</id>
<content type='text'>
The data migration was needlessly querying the cell database
for instances even if there were no instance mappings in that
database that needed to be migrated. This simply continues to
the next cell if the instance mappings in the current cell are
migrated.

While we're in here, the joinedload on 'cell_mapping' can be
removed since it's not used.

Closes-Bug: #1817961

Change-Id: Idf35ed9d57945bc80fbd47393b7de076330160e6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The data migration was needlessly querying the cell database
for instances even if there were no instance mappings in that
database that needed to be migrated. This simply continues to
the next cell if the instance mappings in the current cell are
migrated.

While we're in here, the joinedload on 'cell_mapping' can be
removed since it's not used.

Closes-Bug: #1817961

Change-Id: Idf35ed9d57945bc80fbd47393b7de076330160e6
</pre>
</div>
</content>
</entry>
<entry>
<title>Modify InstanceMappingList.get_not_deleted_by_cell_and_project()</title>
<updated>2019-02-08T21:28:28+00:00</updated>
<author>
<name>Surya Seetharaman</name>
<email>suryaseetharaman.9@gmail.com</email>
</author>
<published>2019-02-06T09:30:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/nova.git/commit/?id=5c6c816d8c83e892c6dba4b5edb318d6c288ec7a'/>
<id>5c6c816d8c83e892c6dba4b5edb318d6c288ec7a</id>
<content type='text'>
1) Change it to accommodate querying it for 'None' project_ids
   in the "--all-tenats" case.
2) If the online data migration for populating queued_for_delete
   has not been run for some reason, the the values could be NULL
   in the database for instance_mapping.queued_for_delete. Under
   such circumstances, we assume that such mappings with NULL
   queued_for_delete have *not* being queued_for_deletion.

Related to blueprint handling-down-cell

Change-Id: I80a65bc026e26a272a9dc041b27f9839511db765
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1) Change it to accommodate querying it for 'None' project_ids
   in the "--all-tenats" case.
2) If the online data migration for populating queued_for_delete
   has not been run for some reason, the the values could be NULL
   in the database for instance_mapping.queued_for_delete. Under
   such circumstances, we assume that such mappings with NULL
   queued_for_delete have *not* being queued_for_deletion.

Related to blueprint handling-down-cell

Change-Id: I80a65bc026e26a272a9dc041b27f9839511db765
</pre>
</div>
</content>
</entry>
</feed>
