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

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu/ubuntu-fix-32-64-bit-iss.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
 
From 9e2073580b0080613f7860aee56d6399d463ad30 Mon Sep 17 00:00:00 2001
2
 
From: Ben Swartzlander <bswartz@netapp.com>
3
 
Date: Wed, 19 Sep 2012 17:30:22 -0400
4
 
Subject: [PATCH 39/39] Replace builtin hash with MD5 to solve 32/64-bit
5
 
 issues.
6
 
 
7
 
It seems that Python's builtin hash returns different
8
 
values on 32-bit and 64-bit architectures, so it's
9
 
safer to use a well-defined hash like MD5.
10
 
 
11
 
bug 1050359
12
 
 
13
 
Change-Id: Ibb49f7b9028085d2aedaf05b94e1e1dcdf5e4cb4
14
 
---
15
 
 nova/tests/test_nfs.py |    9 +++++----
16
 
 nova/volume/nfs.py     |    4 ++--
17
 
 2 files changed, 7 insertions(+), 6 deletions(-)
18
 
 
19
 
diff --git a/nova/tests/test_nfs.py b/nova/tests/test_nfs.py
20
 
index 8a931b0..4c97f12 100644
21
 
--- a/nova/tests/test_nfs.py
22
 
+++ b/nova/tests/test_nfs.py
23
 
@@ -109,8 +109,9 @@ class NfsDriverTestCase(test.TestCase):
24
 
         volume['provider_location'] = self.TEST_NFS_EXPORT1
25
 
         volume['name'] = 'volume-123'
26
 
 
27
 
-        self.assertEqual('/mnt/test/12118957640568004265/volume-123',
28
 
-                         drv.local_path(volume))
29
 
+        self.assertEqual(
30
 
+            '/mnt/test/2f4f60214cf43c595666dd815f0360a4/volume-123',
31
 
+            drv.local_path(volume))
32
 
 
33
 
     def test_mount_nfs_should_mount_correctly(self):
34
 
         """_mount_nfs common case usage"""
35
 
@@ -212,7 +213,7 @@ class NfsDriverTestCase(test.TestCase):
36
 
         """_get_hash_str should calculation correct value"""
37
 
         drv = self._driver
38
 
 
39
 
-        self.assertEqual('12118957640568004265',
40
 
+        self.assertEqual('2f4f60214cf43c595666dd815f0360a4',
41
 
                          drv._get_hash_str(self.TEST_NFS_EXPORT1))
42
 
 
43
 
     def test_get_mount_point_for_share(self):
44
 
@@ -221,7 +222,7 @@ class NfsDriverTestCase(test.TestCase):
45
 
 
46
 
         nfs.FLAGS.nfs_mount_point_base = self.TEST_MNT_POINT_BASE
47
 
 
48
 
-        self.assertEqual('/mnt/test/12118957640568004265',
49
 
+        self.assertEqual('/mnt/test/2f4f60214cf43c595666dd815f0360a4',
50
 
                          drv._get_mount_point_for_share(self.TEST_NFS_EXPORT1))
51
 
 
52
 
     def test_get_available_capacity_with_df(self):
53
 
diff --git a/nova/volume/nfs.py b/nova/volume/nfs.py
54
 
index f91b520..7a6ca83 100644
55
 
--- a/nova/volume/nfs.py
56
 
+++ b/nova/volume/nfs.py
57
 
@@ -15,8 +15,8 @@
58
 
 #    License for the specific language governing permissions and limitations
59
 
 #    under the License.
60
 
 
61
 
-import ctypes
62
 
 import errno
63
 
+import hashlib
64
 
 import os
65
 
 
66
 
 from nova import exception
67
 
@@ -290,4 +290,4 @@ class NfsDriver(driver.VolumeDriver):
68
 
 
69
 
     def _get_hash_str(self, base_str):
70
 
         """returns string that represents hash of base_str (in a hex format)"""
71
 
-        return str(ctypes.c_uint64(hash(base_str)).value)
72
 
+        return hashlib.md5(base_str).hexdigest()
73
 
1.7.10.4
74