Merge ~zioproto/ubuntu/+source/cinder:stable/liberty into ~ubuntu-server-dev/ubuntu/+source/cinder:stable/liberty

Proposed by Saverio Proto
Status: Merged
Merged at revision: d5da74baf84509ce8799b51c2906ca5d40edec59
Proposed branch: ~zioproto/ubuntu/+source/cinder:stable/liberty
Merge into: ~ubuntu-server-dev/ubuntu/+source/cinder:stable/liberty
Diff against target: 135 lines (+114/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/cinder-306610.patch (+106/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Corey Bryant Approve
Review via email: mp+304341@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Saverio Proto (zioproto) wrote :

I am building this package as follows:
sbuild-liberty -A -d trusty-amd64 ../build-area/cinder_7.0.2-0ubuntu2.dsc

The dsc file looks good.

I have no idea why in the final deb package, the 'Depends:' section of the package control file is broken. There are some packages that are mentioned with an extra dash (-), like for example 'python-novaclient-'. This makes the package impossible to install. I paste here the control file:

Package: python-cinder
Source: cinder
Version: 2:7.0.2-0ubuntu2
Architecture: all
Maintainer: Ubuntu Developers <email address hidden>
Installed-Size: 14524
Depends: python-anyjson (>= 0.3.3), python-babel (>= 1.3), python-barbicanclient (>= 3.3.0), python-crypto (>= 2.6), python-enum34, python-eventlet (>= 0.17.4), python-glanceclient (>= 1:0.18.0), python-greenlet (>= 0.3.2), python-iso8601 (>= 0.1.9), python-keystonemiddleware (>= 2.0.0), python-kombu (>= 3.0.7), python-lxml (>= 2.3), python-migrate (>= 0.9.6), python-netaddr (>= 0.7.12), python-novaclient (>= 1:2.28.1), python-os-brick (>= 0.4.0), python-oslo.concurrency (>= 2.3.0), python-oslo.config (>= 1:2.3.0), python-oslo.context (>= 0.2.0), python-oslo.db (>= 2.4.1), python-oslo.i18n (>= 1.5.0), python-oslo.log (>= 1.8.0), python-oslo.messaging (>= 1.16.0), python-oslo.middleware (>= 2.8.0), python-oslo.policy (>= 0.5.0), python-oslo.reports (>= 0.1.0), python-oslo.rootwrap (>= 2.0.0), python-oslo.serialization (>= 1.4.0), python-oslo.service (>= 0.7.0), python-oslo.utils (>= 2.0.0), python-oslo.versionedobjects (>= 0.9.0), python-oslo.vmware (>= 1.16.0), python-osprofiler (>= 0.3.0), python-paramiko (>= 1.13.0), python-paste, python-pastedeploy (>= 1.5.0), python-pbr (>= 1.8), python-pyparsing (>= 2.0.1), python-requests (>= 2.5.2), python-retrying (>= 1.2.3), python-routes (>= 1.12.3), python-six (>= 1.9.0), python-sqlalchemy (>= 1.0~), python-stevedore (>= 1.5.0), python-suds, python-swiftclient (>= 1:2.2.0), python-taskflow (>= 1.16.0), python-tz (>= 2013.6), python-webob (>= 1.2.3), python-retrying-, python:any (<< 2.8), python-oslo.middleware-, python-novaclient-, python-keystonemiddleware-, python-oslo.messaging-, python:any (>= 2.7.5-5~), python-netaddr-, python-oslo.utils-, python-requests-, python-sqlalchemy (<< 1.1), python-keystoneclient-
Suggests: python-ceph, python-hp3parclient, python-rtslib-fb
Section: python
Priority: extra
Homepage: http://launchpad.net/cinder
Description: Cinder Python libraries
 OpenStack is a reliable cloud infrastructure. Its mission is to produce
 the ubiquitous cloud computing platform that will meet the needs of public
 and private cloud providers regardless of size, by being simple to implement
 and massively scalable.
 .
 Cinder is the OpenStack Block storage service.
 .
 This package contains the Python library for Cinder.
Original-Maintainer: Chuck Short <email address hidden>

Revision history for this message
James Page (james-page) :
Revision history for this message
James Page (james-page) wrote :

Taking a look at your build failure now.

Revision history for this message
James Page (james-page) wrote :

Saverio

Could you confirm the version of cloud-archive-utils you are using - I think that the problem you are hitting is something that has been resolved in r48.

Revision history for this message
Saverio Proto (zioproto) wrote :

Here you go:

ubuntu@ubuntu-xenial:~/cleancinder/cinder$ apt-cache policy cloud-archive-utils
cloud-archive-utils:
  Installed: 0.1-0~50~ubuntu16.04.1
  Candidate: 0.1-0~50~ubuntu16.04.1
  Version table:
 *** 0.1-0~50~ubuntu16.04.1 500
        500 http://ppa.launchpad.net/ubuntu-cloud-archive/tools/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

I am able to reproduce the build problem even without my patch, here the steps

debcheckout --git-track='*' cinder
cd cinder/
git checkout stable/liberty
gbp buildpackage -S -us -uc
sbuild-liberty -A -d trusty-amd64 ../build-area/cinder_7.0.2-0ubuntu1.dsc

the resulting python-cinder_7.0.2-0ubuntu1_all.deb will have the extra '-' in the control file

Revision history for this message
Corey Bryant (corey.bryant) wrote :

LGTM, thanks for the patch!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 4955d12..444c35b 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+cinder (2:7.0.2-0ubuntu2) UNRELEASED; urgency=medium
7+
8+ * RBD: Delete snapshots if missing in the Ceph backend (LP: #1415905):
9+ - d/p/cinder-306610.patch: Apply patch from review 306610.
10+
11+ -- Saverio Proto <saverio.proto@switch.ch> Mon, 29 Aug 2016 20:42:39 +0000
12+
13 cinder (2:7.0.2-0ubuntu1) wily; urgency=medium
14
15 * New upstream point release for OpenStack Liberty (LP: #1569502).
16diff --git a/debian/patches/cinder-306610.patch b/debian/patches/cinder-306610.patch
17new file mode 100644
18index 0000000..7db701a
19--- /dev/null
20+++ b/debian/patches/cinder-306610.patch
21@@ -0,0 +1,106 @@
22+commit 0d526b167fc75f61ef398140ff27c022489c15c8
23+Author: Saverio Proto <saverio.proto@switch.ch>
24+Date: Fri Apr 1 13:50:16 2016 +0200
25+
26+ RBD: delete snapshots if missing in the backend
27+
28+ snapshot delete should be more robust to also handle backend errors.
29+ In case the backend does not have the image snapshot anymore,
30+ log an info message and succeed the operation.
31+ A first attempt to fix this problem was found on
32+ https://review.openstack.org/#/c/151257/
33+ This patch is already merged but it does not fix the problem
34+ completely.
35+
36+ Closes-Bug: #1415905
37+ (cherry picked from commit 677eb1c4160c08cfce2900495741f0ea15f566fa)
38+
39+ Change-Id: I51b0f5bb2bb60144dace79ebed06a66aaeb54574
40+
41+diff --git a/cinder/tests/unit/test_rbd.py b/cinder/tests/unit/test_rbd.py
42+index 604fc7b..81695f1 100644
43+--- a/cinder/tests/unit/test_rbd.py
44++++ b/cinder/tests/unit/test_rbd.py
45+@@ -83,6 +83,7 @@ def common_mocks(f):
46+ inst.mock_rbd.ImageBusy = MockImageBusyException
47+ inst.mock_rbd.ImageNotFound = MockImageNotFoundException
48+ inst.mock_rbd.ImageExists = MockImageExistsException
49++ inst.mock_rbd.InvalidArgument = MockImageNotFoundException
50+
51+ inst.driver.rbd = inst.mock_rbd
52+ inst.driver.rados = inst.mock_rados
53+@@ -402,6 +403,42 @@ class RBDTestCase(test.TestCase):
54+ self.assertFalse(proxy.remove_snap.called)
55+
56+ @common_mocks
57++ def test_delete_notfound_snapshot(self):
58++ proxy = self.mock_proxy.return_value
59++ proxy.__enter__.return_value = proxy
60++
61++ proxy.unprotect_snap.side_effect = (
62++ self.mock_rbd.ImageNotFound)
63++
64++ self.driver.delete_snapshot(self.snapshot)
65++
66++ proxy.remove_snap.assert_called_with(self.snapshot_name)
67++ proxy.unprotect_snap.assert_called_with(self.snapshot_name)
68++
69++ @common_mocks
70++ def test_delete_notfound_on_remove_snapshot(self):
71++ proxy = self.mock_proxy.return_value
72++ proxy.__enter__.return_value = proxy
73++
74++ proxy.remove_snap.side_effect = (
75++ self.mock_rbd.ImageNotFound)
76++
77++ self.driver.delete_snapshot(self.snapshot)
78++
79++ proxy.remove_snap.assert_called_with(self.snapshot_name)
80++ proxy.unprotect_snap.assert_called_with(self.snapshot_name)
81++
82++ @common_mocks
83++ def test_delete_unprotected_snapshot(self):
84++ proxy = self.mock_proxy.return_value
85++ proxy.__enter__.return_value = proxy
86++ proxy.unprotect_snap.side_effect = self.mock_rbd.InvalidArgument
87++
88++ self.driver.delete_snapshot(self.snapshot)
89++ self.assertTrue(proxy.unprotect_snap.called)
90++ self.assertTrue(proxy.remove_snap.called)
91++
92++ @common_mocks
93+ def test_get_children_info(self):
94+ volume = self.mock_proxy
95+ volume.set_snap = mock.Mock()
96+diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py
97+index d535cc6..f94675e 100644
98+--- a/cinder/volume/drivers/rbd.py
99++++ b/cinder/volume/drivers/rbd.py
100+@@ -753,6 +753,14 @@ class RBDDriver(driver.TransferVD, driver.ExtendVD,
101+ with RBDVolumeProxy(self, volume_name) as volume:
102+ try:
103+ volume.unprotect_snap(snap_name)
104++ except self.rbd.InvalidArgument:
105++ LOG.info(
106++ _LI("InvalidArgument: Unable to unprotect snapshot %s."),
107++ snap_name)
108++ except self.rbd.ImageNotFound:
109++ LOG.info(
110++ _LI("ImageNotFound: Unable to unprotect snapshot %s."),
111++ snap_name)
112+ except self.rbd.ImageBusy:
113+ children_list = self._get_children_info(volume, snap_name)
114+
115+@@ -765,7 +773,11 @@ class RBDDriver(driver.TransferVD, driver.ExtendVD,
116+ 'snap': snap_name})
117+
118+ raise exception.SnapshotIsBusy(snapshot_name=snap_name)
119+- volume.remove_snap(snap_name)
120++ try:
121++ volume.remove_snap(snap_name)
122++ except self.rbd.ImageNotFound:
123++ LOG.info(_LI("Snapshot %s does not exist in backend."),
124++ snap_name)
125+
126+ def retype(self, context, volume, new_type, diff, host):
127+ """Retypes a volume, allows QoS change only."""
128diff --git a/debian/patches/series b/debian/patches/series
129index 1f79a8e..6cac686 100644
130--- a/debian/patches/series
131+++ b/debian/patches/series
132@@ -1,2 +1,3 @@
133 fix-long-casting.patch
134 skip-failing-tests.patch
135+cinder-306610.patch

Subscribers

People subscribed via source and target branches