~ubuntu-branches/ubuntu/raring/nova/raring-proposed

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu/fix-ec2-volume-id-mappings.patch

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandelman, Chuck Short
  • Date: 2012-11-23 09:04:58 UTC
  • mfrom: (1.1.66)
  • Revision ID: package-import@ubuntu.com-20121123090458-91565o7aev1i1h71
Tags: 2013.1~g1-0ubuntu1
[ Adam Gandelman ]
* debian/control: Ensure novaclient is upgraded with nova,
  require python-keystoneclient >= 1:2.9.0. (LP: #1073289)
* debian/patches/{ubuntu/*, rbd-security.patch}: Dropped, applied
  upstream.
* debian/control: Add python-testtools to Build-Depends.

[ Chuck Short ]
* New upstream version.
* Refreshed debian/patches/avoid_setuptools_git_dependency.patch.
* debian/rules: FTBFS if missing binaries.
* debian/nova-scheudler.install: Add missing rabbit-queues and
  nova-rpc-zmq-receiver.
* Remove nova-volume since it doesnt exist anymore, transition to cinder-*.
* debian/rules: install apport hook in the right place.
* debian/patches/ubuntu-show-tests.patch: Display test failures.
* debian/control: Add depends on genisoimage
* debian/control: Suggest guestmount.
* debian/control: Suggest websockify. (LP: #1076442)
* debian/nova.conf: Disable nova-volume service.
* debian/control: Depend on xen-system-* rather than the hypervisor.
* debian/control, debian/mans/nova-conductor.8, debian/nova-conductor.init,
  debian/nova-conductor.install, debian/nova-conductor.logrotate
  debian/nova-conductor.manpages, debian/nova-conductor.postrm
  debian/nova-conductor.upstart.in: Add nova-conductor service.
* debian/control: Add python-fixtures as a build deps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
commit 43bf8344488a6af1046344c255bdb2edd7450475
2
 
Author: Adam Gandelman <adam.gandelman@canonical.com>
3
 
Date:   Thu Oct 11 18:49:54 2012 -0700
4
 
 
5
 
    read_deleted snapshot and volume id mappings.
6
 
    
7
 
    Since the migration that creates the volume_id_mappings and
8
 
    snapshot_id_mappings tables does not populate the 'deleted' column,
9
 
    queries to this table should not limit results to 'deleted=0'.
10
 
    Limiting to non-deleted rows results in duplicate mappings being
11
 
    created for existing instance mappings after an upgrade, and
12
 
    throws off volume and snapshot ID to UUID mapping.
13
 
    
14
 
    This is a stop-gap measure to ensure avoid serious breakage during
15
 
    an upgrade.  The NULL columns in this table are actually unused
16
 
    currently and can be populated in later grizzly migrations, if they
17
 
    end up being used.
18
 
    
19
 
    Fixes bug 1065785.
20
 
    
21
 
    Change-Id: I893c994362a203288b9984f0ede24cbb274bfcc5
22
 
 
23
 
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
24
 
index dde41a6..0946d0b 100644
25
 
--- a/nova/db/sqlalchemy/api.py
26
 
+++ b/nova/db/sqlalchemy/api.py
27
 
@@ -2995,12 +2995,14 @@ def _volume_get_query(context, session=None, project_only=False):
28
 
 
29
 
 @require_context
30
 
 def _ec2_volume_get_query(context, session=None):
31
 
-    return model_query(context, models.VolumeIdMapping, session=session)
32
 
+    return model_query(context, models.VolumeIdMapping,
33
 
+                       session=session, read_deleted='yes')
34
 
 
35
 
 
36
 
 @require_context
37
 
 def _ec2_snapshot_get_query(context, session=None):
38
 
-    return model_query(context, models.SnapshotIdMapping, session=session)
39
 
+    return model_query(context, models.SnapshotIdMapping,
40
 
+                       session=session, read_deleted='yes')
41
 
 
42
 
 
43
 
 @require_context