[openstack-heat] Rebase to havana-1

Jeff Peeler jpeeler at fedoraproject.org
Tue Jun 4 20:42:54 UTC 2013


commit a6e033c79a28264cb0a2c3290a7ca315df6d1677
Author: Jeff Peeler <jpeeler at redhat.com>
Date:   Tue Jun 4 16:05:11 2013 -0400

    Rebase to havana-1

 bug1186389.patch               |   56 ++++++++++++++++++++++++++++++++++++++++
 openstack-heat.spec            |   47 ++++++++++++++++++++-------------
 switch-to-using-m2crypto.patch |   20 +++++--------
 3 files changed, 93 insertions(+), 30 deletions(-)
---
diff --git a/bug1186389.patch b/bug1186389.patch
new file mode 100644
index 0000000..e14ce1d
--- /dev/null
+++ b/bug1186389.patch
@@ -0,0 +1,56 @@
+commit 027e91c980eb581ca91cc1366390f68a9527f5eb
+Author: Zane Bitter <zbitter at redhat.com>
+Date:   Fri May 31 21:34:36 2013 +0200
+
+    scheduler: Fix inifinite loop for no-wait tasks
+    
+    When a task run by a DependencyTaskGroup completed immediately (i.e. it
+    was marked as done right after calling start()), the corresponding entry in
+    the dependency graph was never removed. As a result the DependencyTaskGroup
+    would continue running forever (or until it timed out).
+    
+    Fixes bug #1186389
+    
+    Change-Id: I9715b54a61d1c3adc22403bc39f8673306bffead
+
+diff --git a/heat/engine/scheduler.py b/heat/engine/scheduler.py
+index a553c8e..7ad19a6 100644
+--- a/heat/engine/scheduler.py
++++ b/heat/engine/scheduler.py
+@@ -301,8 +301,8 @@ class DependencyTaskGroup(object):
+         Iterate over all subtasks that are currently running - i.e. they have
+         been started but have not yet completed.
+         """
+-        return itertools.ifilter(lambda (k, r): r and r.started(),
+-                                 self._runners.iteritems())
++        running = lambda (k, r): k in self._graph and r.started()
++        return itertools.ifilter(running, self._runners.iteritems())
+ 
+ 
+ class PollingTaskGroup(object):
+diff --git a/heat/tests/test_scheduler.py b/heat/tests/test_scheduler.py
+index 6f82939..f331085 100644
+--- a/heat/tests/test_scheduler.py
++++ b/heat/tests/test_scheduler.py
+@@ -164,7 +164,7 @@ class DependencyTaskGroupTest(mox.MoxTestBase):
+ 
+     @contextlib.contextmanager
+     def _dep_test(self, *edges):
+-        dummy = DummyTask()
++        dummy = DummyTask(getattr(self, 'steps', 3))
+ 
+         class TaskMaker(object):
+             def __init__(self, name):
+@@ -188,6 +188,12 @@ class DependencyTaskGroupTest(mox.MoxTestBase):
+         scheduler.TaskRunner(tg)(wait_time=None)
+         self.mox.VerifyAll()
+ 
++    def test_no_steps(self):
++        self.steps = 0
++        self.mox.StubOutWithMock(scheduler.TaskRunner, '_sleep')
++        with self._dep_test(('second', 'first')) as dummy:
++            scheduler.TaskRunner._sleep(None).AndReturn(None)
++
+     def test_single_node(self):
+         with self._dep_test(('only', None)) as dummy:
+             dummy.do_step(1, 'only').AndReturn(None)
diff --git a/openstack-heat.spec b/openstack-heat.spec
index 3258fed..cf8e099 100644
--- a/openstack-heat.spec
+++ b/openstack-heat.spec
@@ -1,15 +1,18 @@
-%global release_name grizzly
+%global release_name havana
+%global release_letter b
+%global milestone 1
+%global full_release heat-%{version}.%{release_letter}%{milestone}
 
 %global with_doc %{!?_without_doc:1}%{?_without_doc:0}
 
 Name:		openstack-heat
 Summary:	OpenStack Orchestration (heat)
-Version:	2013.1
-Release:	1.4%{?dist}
+Version:	2013.2
+Release:	0.1.%{release_letter}%{milestone}%{?dist}
 License:	ASL 2.0
 Group:		System Environment/Base
 URL:		http://www.openstack.org
-Source0:	https://launchpad.net/heat/%{release_name}/%{version}/+download/heat-%{version}.tar.gz
+Source0:	https://launchpad.net/heat/%{release_name}/%{release_name}-%{milestone}/+download/%{full_release}.tar.gz
 Obsoletes:	heat < 7-9
 Provides:	heat
 
@@ -20,11 +23,15 @@ Source4:	openstack-heat-engine.service
 Source5:	openstack-heat-api-cloudwatch.service
 
 Patch0: switch-to-using-m2crypto.patch
+# bug fix already committed upstream, fixes autoscaling
+Patch1: bug1186389.patch
 
 BuildArch: noarch
 BuildRequires: python2-devel
 BuildRequires: python-setuptools
 BuildRequires: python-sphinx
+BuildRequires: python-pbr
+BuildRequires: python-d2to1
 BuildRequires: systemd-units
 
 Requires: %{name}-common = %{version}-%{release}
@@ -35,8 +42,9 @@ Requires: %{name}-api-cloudwatch = %{version}-%{release}
 Requires: %{name}-cli = %{version}-%{release}
 
 %prep
-%setup -q -n heat-%{version}
+%setup -q -n %{full_release}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__python} setup.py build
@@ -45,7 +53,6 @@ Requires: %{name}-cli = %{version}-%{release}
 %{__python} setup.py install -O1 --skip-build --root=%{buildroot}
 sed -i -e '/^#!/,1 d' %{buildroot}/%{python_sitelib}/heat/db/sqlalchemy/manage.py
 sed -i -e '/^#!/,1 d' %{buildroot}/%{python_sitelib}/heat/db/sqlalchemy/migrate_repo/manage.py
-sed -i -e '/^#!/,1 d' %{buildroot}/%{python_sitelib}/heat/testing/runner.py
 mkdir -p %{buildroot}/var/log/heat/
 install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/heat
 
@@ -70,15 +77,13 @@ popd
 rm -rf %{buildroot}/var/lib/heat/.dummy
 rm -f %{buildroot}/usr/bin/cinder-keystone-setup
 
-install -p -D -m 640 %{_builddir}/heat-%{version}/etc/heat/heat-api.conf %{buildroot}/%{_sysconfdir}/heat
-install -p -D -m 640 %{_builddir}/heat-%{version}/etc/heat/heat-api-paste.ini %{buildroot}/%{_sysconfdir}/heat
-install -p -D -m 640 %{_builddir}/heat-%{version}/etc/heat/heat-api-cfn.conf %{buildroot}/%{_sysconfdir}/heat
-install -p -D -m 640 %{_builddir}/heat-%{version}/etc/heat/heat-api-cfn-paste.ini %{buildroot}/%{_sysconfdir}/heat
-install -p -D -m 640 %{_builddir}/heat-%{version}/etc/heat/heat-api-cloudwatch.conf %{buildroot}/%{_sysconfdir}/heat
-install -p -D -m 640 %{_builddir}/heat-%{version}/etc/heat/heat-api-cloudwatch-paste.ini %{buildroot}/%{_sysconfdir}/heat
-install -p -D -m 640 %{_builddir}/heat-%{version}/etc/heat/heat-engine.conf %{buildroot}/%{_sysconfdir}/heat
-install -p -D -m 640 %{_builddir}/heat-%{version}/etc/boto.cfg %{buildroot}/%{_sysconfdir}/heat
-install -p -D -m 644 %{_builddir}/heat-%{version}/etc/bash_completion.d/heat-cfn %{buildroot}/%{_sysconfdir}/bash_completion.d/heat-cfn
+install -p -D -m 640 %{_builddir}/%{full_release}/etc/heat/heat-api.conf %{buildroot}/%{_sysconfdir}/heat
+install -p -D -m 640 %{_builddir}/%{full_release}/etc/heat/api-paste.ini %{buildroot}/%{_sysconfdir}/heat
+install -p -D -m 640 %{_builddir}/%{full_release}/etc/heat/heat-api-cfn.conf %{buildroot}/%{_sysconfdir}/heat
+install -p -D -m 640 %{_builddir}/%{full_release}/etc/heat/heat-api-cloudwatch.conf %{buildroot}/%{_sysconfdir}/heat
+install -p -D -m 640 %{_builddir}/%{full_release}/etc/heat/heat-engine.conf %{buildroot}/%{_sysconfdir}/heat
+install -p -D -m 640 %{_builddir}/%{full_release}/etc/boto.cfg %{buildroot}/%{_sysconfdir}/heat
+install -p -D -m 644 %{_builddir}/%{full_release}/etc/bash_completion.d/heat-cfn %{buildroot}/%{_sysconfdir}/bash_completion.d/heat-cfn
 install -p -D -m 640 etc/heat/policy.json %{buildroot}/%{_sysconfdir}/heat
 
 %description
@@ -128,6 +133,7 @@ Components common to all OpenStack Heat services
 %dir %attr(0755,heat,root) %{_sysconfdir}/heat
 %config(noreplace) %{_sysconfdir}/logrotate.d/heat
 %config(noreplace) %attr(-, root, heat) %{_sysconfdir}/heat/policy.json
+%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/api-paste.ini
 %{_mandir}/man1/heat-db-setup.1.gz
 %{_mandir}/man1/heat-keystone-setup.1.gz
 
@@ -186,7 +192,6 @@ OpenStack-native ReST API to the Heat Engine
 %doc README.rst LICENSE doc/build/html/man/heat-api.html
 %{_bindir}/heat-api
 %config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api.conf
-%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api-paste.ini
 %{_unitdir}/openstack-heat-api.service
 %{_mandir}/man1/heat-api.1.gz
 
@@ -217,7 +222,6 @@ AWS CloudFormation-compatible API to the Heat Engine
 %doc README.rst LICENSE doc/build/html/man/heat-api-cfn.html
 %{_bindir}/heat-api-cfn
 %config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api-cfn.conf
-%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api-cfn-paste.ini
 %{_unitdir}/openstack-heat-api-cfn.service
 %{_mandir}/man1/heat-api-cfn.1.gz
 
@@ -248,7 +252,6 @@ AWS CloudWatch-compatible API to the Heat Engine
 %doc README.rst LICENSE doc/build/html/man/heat-api-cloudwatch.html
 %{_bindir}/heat-api-cloudwatch
 %config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api-cloudwatch.conf
-%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api-cloudwatch-paste.ini
 %{_unitdir}/openstack-heat-api-cloudwatch.service
 %{_mandir}/man1/heat-api-cloudwatch.1.gz
 
@@ -276,6 +279,7 @@ Heat client tools accessible from the CLI
 %{_bindir}/heat-boto
 %{_bindir}/heat-cfn
 %{_bindir}/heat-watch
+%{_bindir}/heat-manage
 %config(noreplace) %{_sysconfdir}/bash_completion.d/heat-cfn
 %config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/boto.cfg
 %{_mandir}/man1/heat-cfn.1.gz
@@ -283,6 +287,13 @@ Heat client tools accessible from the CLI
 %{_mandir}/man1/heat-watch.1.gz
 
 %changelog
+* Tue Jun  4 2013 Jeff Peeler <jpeeler at redhat.com> 2013.2-0.1.b1
+- rebase to havana-1
+- consolidate api-paste files into one file in common
+- removed runner.py as it is no longer present
+- added heat-manage
+- added new buildrequires pbr and d2to1
+
 * Tue May 28 2013 Jeff Peeler <jpeeler at redhat.com> 2013.1-1.4
 - bumped obsoletes for f18 rebuilds of the old heat package
 - added missing policy.json file (rhbz#965549)
diff --git a/switch-to-using-m2crypto.patch b/switch-to-using-m2crypto.patch
index bb84c41..effc32d 100644
--- a/switch-to-using-m2crypto.patch
+++ b/switch-to-using-m2crypto.patch
@@ -8,28 +8,24 @@ and decryption of user authentication information.
 
 ---
 diff --git a/heat/common/crypt.py b/heat/common/crypt.py
-index 28c11f5..2fb0c98 100644
+index 81b4c92..9c67dc1 100644
 --- a/heat/common/crypt.py
 +++ b/heat/common/crypt.py
-@@ -14,8 +14,8 @@
+@@ -14,7 +14,7 @@
  #    under the License.
  
  import base64
 -from Crypto.Cipher import AES
--from Crypto import Random
 +import M2Crypto
-+from os import urandom
+ from os import urandom
  
  from oslo.config import cfg
- 
-@@ -36,9 +36,11 @@ logger = logging.getLogger(__name__)
- def encrypt(auth_info):
+@@ -37,8 +37,10 @@ def encrypt(auth_info):
      if auth_info is None:
          return None
--    iv = Random.new().read(AES.block_size)
+     iv = urandom(AES.block_size)
 -    cipher = AES.new(cfg.CONF.auth_encryption_key[:32], AES.MODE_CFB, iv)
 -    res = base64.b64encode(iv + cipher.encrypt(auth_info))
-+    iv = urandom(16)
 +    cipher = M2Crypto.EVP.Cipher(alg='aes_128_cbc',
 +                                 key=cfg.CONF.auth_encryption_key[:32], iv=iv,
 +                                 op=1) # 1 is encode
@@ -52,9 +48,9 @@ index 28c11f5..2fb0c98 100644
      return res
 diff --git a/tools/pip-requires b/tools/pip-requires
 index 06795f9..091168c 100644
---- a/tools/pip-requires
-+++ b/tools/pip-requires
-@@ -9,7 +9,7 @@
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -12,7 +12,7 @@
  # installed using pip, therefore you will need to install the
  # libxml2-dev(el) and libxslt-dev(el) packages.
  


More information about the scm-commits mailing list