[openstack-tripleo-image-elements] Increase rabbitmq timeout
slagle
slagle at fedoraproject.org
Tue Oct 28 17:34:25 UTC 2014
commit 8afb76c07618a190267fd6e82daa283cd8e736cf
Author: James Slagle <jslagle at redhat.com>
Date: Tue Oct 28 13:34:27 2014 -0400
Increase rabbitmq timeout
Changelog:
- Increase rabbitmq timeout
- Copy static files for packaged installs
- Make 101-tuskar-ui re-runnable
0011-Make-101-tuskar-ui-re-runnable.patch | 106 ++++++++++++++++++++
0012-Copy-static-files-for-packaged-installs.patch | 27 +++++
0013-Increase-rabbitmq-timeout.patch | 27 +++++
openstack-tripleo-image-elements.spec | 13 ++-
4 files changed, 172 insertions(+), 1 deletions(-)
---
diff --git a/0011-Make-101-tuskar-ui-re-runnable.patch b/0011-Make-101-tuskar-ui-re-runnable.patch
new file mode 100644
index 0000000..a19e925
--- /dev/null
+++ b/0011-Make-101-tuskar-ui-re-runnable.patch
@@ -0,0 +1,106 @@
+From a034bf31d1d63e974d3a837b73b190fcaae66f3a Mon Sep 17 00:00:00 2001
+From: Tzu-Mainn Chen <tzumainn at redhat.com>
+Date: Fri, 24 Oct 2014 00:40:10 +0000
+Subject: [PATCH] Make 101-tuskar-ui re-runnable
+
+The checks that are added are:
+* if a Tuskar overcloud plan already exists, skip the tuskar API
+ calls
+* do not update the openstack_dashboard settings if the specified
+ settings are already present
+
+Change-Id: Idedfd2dea2a823245e749ae27e40ae4e29639726
+---
+ .../post-configure.d/101-tuskar-ui | 62 +++++++++++++---------
+ 1 file changed, 36 insertions(+), 26 deletions(-)
+
+diff --git a/elements/tuskar-ui/os-refresh-config/post-configure.d/101-tuskar-ui b/elements/tuskar-ui/os-refresh-config/post-configure.d/101-tuskar-ui
+index 375ea0b..933fe1a 100755
+--- a/elements/tuskar-ui/os-refresh-config/post-configure.d/101-tuskar-ui
++++ b/elements/tuskar-ui/os-refresh-config/post-configure.d/101-tuskar-ui
+@@ -12,42 +12,50 @@ else
+ export PYTHONPATH=/usr/share/openstack-dashboard
+ LOCAL_SETTINGS_FILE=/etc/horizon/local_settings.py
+ DJANGO_ADMIN=django-admin
++ cp $LOCAL_SETTINGS_FILE /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py
+ fi
+
+ source /root/stackrc
+
+-COMPUTE_IMAGE_ID=$( glance image-show overcloud-compute | grep id | awk '$2=="id" {print $4}' )
+-CONTROL_IMAGE_ID=$( glance image-show overcloud-control | grep id | awk '$2=="id" {print $4}' )
+-COMPUTE_ROLE_ID=$( tuskar --tuskar-api-version 2 role-list | awk '$4=="compute" {print $2}' )
+-CONTROL_ROLE_ID=$( tuskar --tuskar-api-version 2 role-list | awk '$4=="controller" {print $2}' )
++if [ -z "$(tuskar --tuskar-api-version 2 plan-list | grep overcloud)" ]; then
++ COMPUTE_IMAGE_ID=$( glance image-show overcloud-compute | grep id | awk '$2=="id" {print $4}' )
++ CONTROL_IMAGE_ID=$( glance image-show overcloud-control | grep id | awk '$2=="id" {print $4}' )
++ COMPUTE_ROLE_ID=$( tuskar --tuskar-api-version 2 role-list | awk '$4=="compute" {print $2}' )
++ CONTROL_ROLE_ID=$( tuskar --tuskar-api-version 2 role-list | awk '$4=="controller" {print $2}' )
+
+-PLAN_ID=$( tuskar --tuskar-api-version 2 plan-create overcloud | awk '$2=="uuid" {print $4}' )
++ PLAN_ID=$( tuskar --tuskar-api-version 2 plan-create overcloud | awk '$2=="uuid" {print $4}' )
+
+-tuskar --tuskar-api-version 2 plan-add-role -r $COMPUTE_ROLE_ID $PLAN_ID
+-tuskar --tuskar-api-version 2 plan-add-role -r $CONTROL_ROLE_ID $PLAN_ID
++ tuskar --tuskar-api-version 2 plan-add-role -r $COMPUTE_ROLE_ID $PLAN_ID
++ tuskar --tuskar-api-version 2 plan-add-role -r $CONTROL_ROLE_ID $PLAN_ID
+
+-if [ -n "$(tuskar --tuskar-api-version 2 role-list | grep cinder-storage)" ]; then
+- BLOCK_STORAGE_IMAGE_ID=$(glance image-show overcloud-cinder-volume | grep id | awk '$2=="id" {print $4}' )
+- BLOCK_STORAGE_ROLE_ID=$(tuskar --tuskar-api-version 2 role-list | awk '$4=="cinder-storage" {print $2}')
+- tuskar --tuskar-api-version 2 plan-add-role -r $BLOCK_STORAGE_ROLE_ID $PLAN_ID
+- tuskar --tuskar-api-version 2 plan-patch -A cinder-storage-1::Image=$BLOCK_STORAGE_IMAGE_ID $PLAN_ID
+-fi
+-
+-if [ -n "$(tuskar --tuskar-api-version 2 role-list | grep swift-storage)" ]; then
+- OBJECT_STORAGE_IMAGE_ID=$(glance image-show overcloud-swift-storage | grep id | awk '$2=="id" {print $4}' )
+- OBJECT_STORAGE_ROLE_ID=$(tuskar --tuskar-api-version 2 role-list | awk '$4=="swift-storage" {print $2}')
+- tuskar --tuskar-api-version 2 plan-add-role -r $OBJECT_STORAGE_ROLE_ID $PLAN_ID
+- tuskar --tuskar-api-version 2 plan-patch -A swift-storage-1::Image=$OBJECT_STORAGE_IMAGE_ID $PLAN_ID
+-fi
++ if [ -n "$(tuskar --tuskar-api-version 2 role-list | grep cinder-storage)" ]; then
++ BLOCK_STORAGE_IMAGE_ID=$(glance image-show overcloud-cinder-volume | grep id | awk '$2=="id" {print $4}' )
++ BLOCK_STORAGE_ROLE_ID=$(tuskar --tuskar-api-version 2 role-list | awk '$4=="cinder-storage" {print $2}')
++ tuskar --tuskar-api-version 2 plan-add-role -r $BLOCK_STORAGE_ROLE_ID $PLAN_ID
++ tuskar --tuskar-api-version 2 plan-patch -A cinder-storage-1::Image=$BLOCK_STORAGE_IMAGE_ID $PLAN_ID
++ fi
+
+-tuskar --tuskar-api-version 2 plan-patch -A compute-1::Image=$COMPUTE_IMAGE_ID $PLAN_ID
+-tuskar --tuskar-api-version 2 plan-patch -A controller-1::Image=$CONTROL_IMAGE_ID $PLAN_ID
++ if [ -n "$(tuskar --tuskar-api-version 2 role-list | grep swift-storage)" ]; then
++ OBJECT_STORAGE_IMAGE_ID=$(glance image-show overcloud-swift-storage | grep id | awk '$2=="id" {print $4}' )
++ OBJECT_STORAGE_ROLE_ID=$(tuskar --tuskar-api-version 2 role-list | awk '$4=="swift-storage" {print $2}')
++ tuskar --tuskar-api-version 2 plan-add-role -r $OBJECT_STORAGE_ROLE_ID $PLAN_ID
++ tuskar --tuskar-api-version 2 plan-patch -A swift-storage-1::Image=$OBJECT_STORAGE_IMAGE_ID $PLAN_ID
++ fi
+
+-echo "UNDERCLOUD_ADMIN_PASSWORD = \"${OS_PASSWORD}\"" >> $LOCAL_SETTINGS_FILE
+-echo "IRONIC_DISCOVERD_URL = \"http://127.0.0.1:5050\"" >> $LOCAL_SETTINGS_FILE
++ tuskar --tuskar-api-version 2 plan-patch -A compute-1::Image=$COMPUTE_IMAGE_ID $PLAN_ID
++ tuskar --tuskar-api-version 2 plan-patch -A controller-1::Image=$CONTROL_IMAGE_ID $PLAN_ID
++fi
+
+-DEPLOYMENT_MODE=$(os-apply-config --key deployment-mode --key-default=scale)
+-echo "DEPLOYMENT_MODE = \"${DEPLOYMENT_MODE}\"" >> $LOCAL_SETTINGS_FILE
++if [ -z "$(grep UNDERCLOUD_ADMIN_PASSWORD $LOCAL_SETTINGS_FILE)" ]; then
++ echo "UNDERCLOUD_ADMIN_PASSWORD = \"${OS_PASSWORD}\"" >> $LOCAL_SETTINGS_FILE
++fi
++if [ -z "$(grep IRONIC_DISCOVERD_URL $LOCAL_SETTINGS_FILE)" ]; then
++ echo "IRONIC_DISCOVERD_URL = \"http://127.0.0.1:5050\"" >> $LOCAL_SETTINGS_FILE
++fi
++if [ -z "$(grep DEPLOYMENT_MODE $LOCAL_SETTINGS_FILE)" ]; then
++ DEPLOYMENT_MODE=$(os-apply-config --key deployment-mode --key-default=scale)
++ echo "DEPLOYMENT_MODE = \"${DEPLOYMENT_MODE}\"" >> $LOCAL_SETTINGS_FILE
++fi
+
+ DJANGO_SETTINGS_MODULE=openstack_dashboard.settings $DJANGO_ADMIN collectstatic --noinput
+ DJANGO_SETTINGS_MODULE=openstack_dashboard.settings $DJANGO_ADMIN compress --force
+@@ -56,6 +64,8 @@ if [ -n "${HORIZON_VENV_DIR:-}" ]; then
+ set +u
+ deactivate
+ set -u
++else
++ cp $LOCAL_SETTINGS_FILE /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py
+ fi
+
+ os-svc-enable -n apache2
diff --git a/0012-Copy-static-files-for-packaged-installs.patch b/0012-Copy-static-files-for-packaged-installs.patch
new file mode 100644
index 0000000..125d5e2
--- /dev/null
+++ b/0012-Copy-static-files-for-packaged-installs.patch
@@ -0,0 +1,27 @@
+From c1a37414493971f4b99add1b33ea9a7138aa721e Mon Sep 17 00:00:00 2001
+From: Tzu-Mainn Chen <tzumainn at redhat.com>
+Date: Tue, 28 Oct 2014 14:27:39 +0000
+Subject: [PATCH] Copy static files for packaged installs
+
+Packaged installs result in tuskar-ui compressed static files being
+placed in /var/www/horizon/static/dashboard, alongside horizon static
+files. We need to copy them over to
+/usr/share/openstack-dashboard/static/dashboard
+
+Change-Id: I369cba710c01ee09584d6f3de1c9aa7195dfcb69
+---
+ elements/tuskar-ui/os-refresh-config/post-configure.d/101-tuskar-ui | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/elements/tuskar-ui/os-refresh-config/post-configure.d/101-tuskar-ui b/elements/tuskar-ui/os-refresh-config/post-configure.d/101-tuskar-ui
+index 933fe1a..dae696e 100755
+--- a/elements/tuskar-ui/os-refresh-config/post-configure.d/101-tuskar-ui
++++ b/elements/tuskar-ui/os-refresh-config/post-configure.d/101-tuskar-ui
+@@ -66,6 +66,7 @@ if [ -n "${HORIZON_VENV_DIR:-}" ]; then
+ set -u
+ else
+ cp $LOCAL_SETTINGS_FILE /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py
++ cp -r /var/www/horizon/static/dashboard/* /usr/share/openstack-dashboard/static/dashboard/
+ fi
+
+ os-svc-enable -n apache2
diff --git a/0013-Increase-rabbitmq-timeout.patch b/0013-Increase-rabbitmq-timeout.patch
new file mode 100644
index 0000000..7a879d9
--- /dev/null
+++ b/0013-Increase-rabbitmq-timeout.patch
@@ -0,0 +1,27 @@
+From fc6348d626abf0a47d62364368b3527745101c93 Mon Sep 17 00:00:00 2001
+From: James Slagle <jslagle at redhat.com>
+Date: Tue, 28 Oct 2014 13:31:43 -0400
+Subject: [PATCH] Increase rabbitmq timeout
+
+This change increases the timeout waiting for rabbitmq from 3 to 60
+seconds. I've observed some instances of it taking 20-30 seconds before,
+so I think we need to be more generous here.
+
+Change-Id: I908eb75790d8b90410ed1b3fa018aec9630633d3
+---
+ elements/rabbitmq-server/os-refresh-config/post-configure.d/40-rabbitmq | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/elements/rabbitmq-server/os-refresh-config/post-configure.d/40-rabbitmq b/elements/rabbitmq-server/os-refresh-config/post-configure.d/40-rabbitmq
+index 7ecfe85..0189a9a 100755
+--- a/elements/rabbitmq-server/os-refresh-config/post-configure.d/40-rabbitmq
++++ b/elements/rabbitmq-server/os-refresh-config/post-configure.d/40-rabbitmq
+@@ -93,7 +93,7 @@ if [ -n "$NODES" ];then
+ fi
+
+ # wait until rabbitmq node is up
+- timeout 3 rabbitmqctl wait /var/run/rabbitmq/pid
++ timeout 60 rabbitmqctl wait /var/run/rabbitmq/pid
+
+ # make sure that all queues (except those with auto-generated names) are
+ # mirrored across all nodes in running:
diff --git a/openstack-tripleo-image-elements.spec b/openstack-tripleo-image-elements.spec
index 692cc0d..2959fcd 100644
--- a/openstack-tripleo-image-elements.spec
+++ b/openstack-tripleo-image-elements.spec
@@ -4,7 +4,7 @@
Name: openstack-tripleo-image-elements
Summary: OpenStack TripleO Image Elements for diskimage-builder
Version: 0.8.10
-Release: 7%{?dist}
+Release: 8%{?dist}
License: ASL 2.0
Group: System Environment/Base
URL: https://wiki.openstack.org/wiki/TripleO
@@ -20,6 +20,9 @@ Patch0007: 0007-Make-rdo-release-install-safe.patch
Patch0008: 0008-Change-how-SELinux-policies-are-compiled.patch
Patch0009: 0009-Simplify-keepalived-custom-policy.patch
Patch0010: 0010-Combine-policy-installs-into-one-operation.patch
+Patch0011: 0011-Make-101-tuskar-ui-re-runnable.patch
+Patch0012: 0012-Copy-static-files-for-packaged-installs.patch
+Patch0013: 0013-Increase-rabbitmq-timeout.patch
BuildArch: noarch
BuildRequires: python
@@ -48,6 +51,9 @@ program.
%patch0008 -p1
%patch0009 -p1
%patch0010 -p1
+%patch0011 -p1
+%patch0012 -p1
+%patch0013 -p1
%build
%{__python} setup.py build
@@ -103,6 +109,11 @@ true
%{_datadir}/tripleo-image-elements
%changelog
+* Tue Oct 28 2014 James Slagle <jslagle at redhat.com> 0.8.10-8
+- Increase rabbitmq timeout
+- Copy static files for packaged installs
+- Make 101-tuskar-ui re-runnable
+
* Tue Oct 28 2014 James Slagle <jslagle at redhat.com> 0.8.10-7
- Add Requires on diskimage-builder so the %post script works
More information about the scm-commits
mailing list