commit openstack-utils for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package openstack-utils for openSUSE:Factory checked in at 2013-10-30 15:48:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openstack-utils (Old)
and /work/SRC/openSUSE:Factory/.openstack-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openstack-utils"
Changes:
--------
--- /work/SRC/openSUSE:Factory/openstack-utils/openstack-utils.changes 2013-10-18 11:41:05.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.openstack-utils.new/openstack-utils.changes 2013-10-30 15:48:13.000000000 +0100
@@ -1,0 +2,43 @@
+Wed Oct 30 08:37:55 UTC 2013 - aj@suse.com
+
+- Apply patch properly to fix build.
+
+-------------------------------------------------------------------
+Tue Oct 29 10:37:27 UTC 2013 - aj@suse.com
+
+- Fix syntax error in openstack-db (reported at
+ https://bugs.launchpad.net/openstack-manuals/+bug/1245778)
+ (updated patch fix-db.patch)
+
+-------------------------------------------------------------------
+Mon Oct 28 15:39:11 UTC 2013 - speilicke@suse.com
+
+- Update to version 2013.2.1+git.1382396927.b17bebe:
+ + openstack-db: ask the user if changing the DB to mysqlbump release number
+ + openstack-status: print ceilometer alarm services status
+ + openstack-status: widen display to cater for wider service names
+ + initial import
+ + comments and copyright
+ + use systemctl instead of ls to generate service list
+ + added note about support distributions
+ + renamed osctl to openstack-service
+ + removed erroneous use of "sh"
+ + added qpid to list of openstack services
+ + Revert "added qpid to list of openstack services"
+ + maint: whitespace tweaks to align with openstack-utils
+ + require an action, and add --help
+ + provide service listing support on older Fedora
+ + openstack-db: add the --update option to sync the DB
+ + added Makefile
+ + openstack-service: mv osctl originated cmd into utils/
+ + openstack-service: mention the new utility in NEWS
+ + openstack-service: add a man page
+ + doc: mention that openstack-db can update a db
+- Refreshed fix-db.patch
+
+-------------------------------------------------------------------
+Thu Oct 17 19:54:20 UTC 2013 - aj@suse.com
+
+- Fix openstack-db for SLES11 (update patch fix-db.patch)
+
+-------------------------------------------------------------------
Old:
----
openstack-utils-2013.2.1+git.1379433390.6ec0116.tar.gz
New:
----
openstack-utils-2013.2.1+git.1382396927.b17bebe.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openstack-utils.spec ++++++
--- /var/tmp/diff_new_pack.rGQqQg/_old 2013-10-30 15:48:14.000000000 +0100
+++ /var/tmp/diff_new_pack.rGQqQg/_new 2013-10-30 15:48:14.000000000 +0100
@@ -17,7 +17,7 @@
Name: openstack-utils
-Version: 2013.2.1+git.1379433390.6ec0116
+Version: 2013.2.1+git.1382396927.b17bebe
Release: 0
Summary: Helper utilities for OpenStack service
License: Apache-2.0
@@ -55,10 +55,12 @@
%{_bindir}/openstack-config
%{_bindir}/openstack-db
%{_bindir}/openstack-demo-install
+%{_bindir}/openstack-service
%{_bindir}/openstack-status
%{_mandir}/man1/openstack-config.1%{?ext_man}
%{_mandir}/man1/openstack-db.1%{?ext_man}
%{_mandir}/man1/openstack-demo-install.1%{?ext_man}
+%{_mandir}/man1/openstack-service.1.gz
%{_mandir}/man1/openstack-status.1%{?ext_man}
%changelog
++++++ _service ++++++
--- /var/tmp/diff_new_pack.rGQqQg/_old 2013-10-30 15:48:14.000000000 +0100
+++ /var/tmp/diff_new_pack.rGQqQg/_new 2013-10-30 15:48:14.000000000 +0100
@@ -1,18 +1,18 @@
<services>
- <service name="tar_scm" mode="disabled">
+ <service mode="disabled" name="tar_scm">
<param name="url">git://github.com/redhat-openstack/openstack-utils.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="versionformat">@PARENT_TAG@+git.%ct.%h</param>
<param name="revision">master</param>
- </service>
+ <param name="changesrevision">b17bebedea</param></service>
- <service name="recompress" mode="disabled">
+ <service mode="disabled" name="recompress">
<param name="file">openstack-utils-*.tar</param>
<param name="compression">gz</param>
</service>
- <service name="set_version" mode="disabled">
+ <service mode="disabled" name="set_version">
<param name="basename">openstack-utils</param>
</service>
-</services>
+</services>
\ No newline at end of file
++++++ fix-db.patch ++++++
--- /var/tmp/diff_new_pack.rGQqQg/_old 2013-10-30 15:48:14.000000000 +0100
+++ /var/tmp/diff_new_pack.rGQqQg/_new 2013-10-30 15:48:14.000000000 +0100
@@ -2,38 +2,66 @@
===================================================================
--- utils/openstack-db.orig
+++ utils/openstack-db
-@@ -88,9 +88,9 @@ esac
+@@ -18,6 +18,7 @@
+ #
+
+ systemctl --version >/dev/null 2>&1 && systemctl=1
++grep 'SUSE Linux Enterprise Server 11' /etc/SuSE-release > /dev/null && sles=1
+
+ usage() {
+
+@@ -98,7 +99,7 @@ db_manage()
+ db_cmd="db_$cmd"
+ fi
+ # Run as $APP user so any newly created (log) files have correct ownership
+- runuser -s /bin/sh $APP -c "$APP-manage $db_cmd"
++ su -s /bin/sh -c "$APP-manage $db_sync" openstack-$APP
+ }
+
+ db_sync() { db_manage sync; }
+@@ -117,10 +118,15 @@ if [ "$MODE" = 'sync' ]; then
+ fi
install_mysql_server() {
++ if test "$sles"; then
++ PACKAGES="mysql mysql-client"
++ else
++ PACKAGES="mariadb mariadb-client"
++ fi
if [ -z "${ASSUME_YES}" ]; then
- yum install mysql-server
-+ zypper install mariadb mariadb-client
++ zypper install $PACKAGES
else
- yum install -y mysql-server
-+ zypper install -y mariadb mariadb-client
++ zypper install -y $PACKAGES
fi
}
-@@ -143,15 +143,15 @@ fi
+@@ -173,15 +179,20 @@ fi
# Make sure MySQL is installed.
NEW_MYSQL_INSTALL=0
-if ! rpm -q --whatprovides mysql-server > /dev/null; then
-+if ! rpm -q --whatprovides mariadb > /dev/null; then
++if test "$sles"; then
++ DB="mysql"
++else
++ DB="mariadb"
++fi
++if ! rpm -q --whatprovides $DB > /dev/null; then
if [ -z "${ASSUME_YES}" ]; then
- printf "mysql-server is not installed. Would you like to install it now? (y/n): "
-+ printf "mariadb is not installed. Would you like to install it now? (y/n): "
++ printf "$DB is not installed. Would you like to install it now? (y/n): "
read response
case "$response" in
y|Y)
;;
n|N)
- echo "mysql-server must be installed. Please install it before proceeding."
-+ echo "mariadb must be installed. Please install it before proceeding."
++ echo "$DB must be installed. Please install it before proceeding."
exit 0
;;
*)
-@@ -167,7 +167,7 @@ fi
+@@ -197,7 +208,7 @@ fi
# Make sure mysqld is running.
@@ -42,7 +70,7 @@
if [ -z "${ASSUME_YES}" ]; then
printf "mysqld is not running. Would you like to start it now? (y/n): "
read response
-@@ -184,10 +184,10 @@ if ! service_running mysqld; then
+@@ -214,10 +225,10 @@ if ! service_running mysqld; then
esac
fi
@@ -55,12 +83,3 @@
fi
-@@ -300,7 +300,7 @@ if [ "$MODE" = 'init' ]; then
- db_sync='db_sync'
- fi
- # Run as $APP user so any newly created (log) files have correct ownership
-- runuser -s /bin/sh $APP -c "$APP-manage $db_sync"
-+ su -s /bin/sh -c "$APP-manage $db_sync" openstack-$APP
-
- # Do a final sanity check on the database.
- if ! echo "SELECT * FROM migrate_version;" |
++++++ openstack-utils-2013.2.1+git.1379433390.6ec0116.tar.gz -> openstack-utils-2013.2.1+git.1382396927.b17bebe.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openstack-utils-2013.2.1+git.1379433390.6ec0116/NEWS new/openstack-utils-2013.2.1+git.1382396927.b17bebe/NEWS
--- old/openstack-utils-2013.2.1+git.1379433390.6ec0116/NEWS 2013-09-27 16:24:44.000000000 +0200
+++ new/openstack-utils-2013.2.1+git.1382396927.b17bebe/NEWS 2013-10-28 16:39:11.000000000 +0100
@@ -1,3 +1,11 @@
+2013.2-? ??-??-????
+ openstack-status:
+ print ceilometer alarm services status
+ openstack-db:
+ Add the --update option to sync the database
+ openstack-service:
+ Add a new util to control enabled openstack services
+
2013.2-1 17-09-2013
openstack-status:
don't print httpd status which is problematic on RHEL 6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openstack-utils-2013.2.1+git.1379433390.6ec0116/README.md new/openstack-utils-2013.2.1+git.1382396927.b17bebe/README.md
--- old/openstack-utils-2013.2.1+git.1379433390.6ec0116/README.md 2013-09-27 16:24:44.000000000 +0200
+++ new/openstack-utils-2013.2.1+git.1382396927.b17bebe/README.md 2013-10-28 16:39:11.000000000 +0100
@@ -4,6 +4,7 @@
Helper utilities for OpenStack services on Fedora/RHEL distros
* openstack-config - Manipulate the openstack ini files
-* openstack-db - Setup or delete the database for a specified service
+* openstack-db - Create/Update/Delete, the database for a service
* openstack-demo-install - Setup all services on a single node for testing
* openstack-status - Give an overview of the status of installed services
+* openstack-service - Control enabled openstack services
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openstack-utils-2013.2.1+git.1379433390.6ec0116/man/openstack-db.1 new/openstack-utils-2013.2.1+git.1382396927.b17bebe/man/openstack-db.1
--- old/openstack-utils-2013.2.1+git.1379433390.6ec0116/man/openstack-db.1 2013-09-27 16:24:44.000000000 +0200
+++ new/openstack-utils-2013.2.1+git.1382396927.b17bebe/man/openstack-db.1 2013-10-28 16:39:11.000000000 +0100
@@ -24,6 +24,10 @@
.IP
Initialise the database.
.HP
+\fB\-\-update\fR
+.IP
+Update an initialised database.
+.HP
\fB\-\-password\fR <pw> | \fB\-p\fR <pw>
.IP
Specify the password for user that will be used
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openstack-utils-2013.2.1+git.1379433390.6ec0116/man/openstack-service.1 new/openstack-utils-2013.2.1+git.1382396927.b17bebe/man/openstack-service.1
--- old/openstack-utils-2013.2.1+git.1379433390.6ec0116/man/openstack-service.1 1970-01-01 01:00:00.000000000 +0100
+++ new/openstack-utils-2013.2.1+git.1382396927.b17bebe/man/openstack-service.1 2013-10-28 16:39:11.000000000 +0100
@@ -0,0 +1,12 @@
+.TH openstack-service "1" "October 2013" "openstack-utils" "User Commands"
+.SH NAME
+openstack-service - Control enabled openstack services
+.SH SYNOPSIS
+.B openstack-service
+\fI<action> \fR[\fIservice\fR]...
+.SH DESCRIPTION
+ <action> can be 'list' or an action supported by the service.
+ 'list' will list the enabled openstack services.
+ Any specified [service]s filter the list of enabled openstack services.
+.SH SEE ALSO
+openstack-status(1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openstack-utils-2013.2.1+git.1379433390.6ec0116/utils/openstack-db new/openstack-utils-2013.2.1+git.1382396927.b17bebe/utils/openstack-db
--- old/openstack-utils-2013.2.1+git.1379433390.6ec0116/utils/openstack-db 2013-09-27 16:24:44.000000000 +0200
+++ new/openstack-utils-2013.2.1+git.1382396927.b17bebe/utils/openstack-db 2013-10-28 16:39:11.000000000 +0100
@@ -36,6 +36,8 @@
Drop the database.
--init
Initialise the database.
+ --update
+ Update an initialised database.
--password <pw> | -p <pw>
Specify the password for user that will be used
to connect database for the service. By default the
@@ -64,6 +66,7 @@
-h|--help) usage 0 ;;
--drop) MODE='drop' ;;
--init) MODE='init' ;;
+ --update) MODE='sync' ;;
--service) shift; APP=$1 ;;
-p|--password) shift; MYSQL_APP_PW=$1 ;;
-r|--rootpw) shift; MYSQL_ROOT_PW=$1 ;;
@@ -86,6 +89,33 @@
exit 1 ;;
esac
+db_manage()
+{
+ cmd="$1"
+ if [ "${APP}" = "nova" ] || [ "${APP}" = "cinder" ]; then
+ db_cmd="db $cmd"
+ else
+ db_cmd="db_$cmd"
+ fi
+ # Run as $APP user so any newly created (log) files have correct ownership
+ runuser -s /bin/sh $APP -c "$APP-manage $db_cmd"
+}
+
+db_sync() { db_manage sync; }
+db_synced() { db_manage version >/dev/null 2>&1; }
+
+if [ "$MODE" = 'sync' ]; then
+ if ! db_synced; then
+ echo "Can't determine the existing sync level." >&2
+ echo "Please ensure the database is running and already initialised." >&2
+ exit 1
+ else
+ db_sync
+ echo "Complete!"
+ exit
+ fi
+fi
+
install_mysql_server() {
if [ -z "${ASSUME_YES}" ]; then
yum install mysql-server
@@ -294,13 +324,7 @@
# Ask openstack-$APP to sync the db.
echo "Initializing the $APP database, please wait..."
- if [ "${APP}" = "nova" ] || [ "${APP}" = "cinder" ]; then
- db_sync='db sync'
- else
- db_sync='db_sync'
- fi
- # Run as $APP user so any newly created (log) files have correct ownership
- runuser -s /bin/sh $APP -c "$APP-manage $db_sync"
+ db_sync
# Do a final sanity check on the database.
if ! echo "SELECT * FROM migrate_version;" |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openstack-utils-2013.2.1+git.1379433390.6ec0116/utils/openstack-service new/openstack-utils-2013.2.1+git.1382396927.b17bebe/utils/openstack-service
--- old/openstack-utils-2013.2.1+git.1379433390.6ec0116/utils/openstack-service 1970-01-01 01:00:00.000000000 +0100
+++ new/openstack-utils-2013.2.1+git.1382396927.b17bebe/utils/openstack-service 2013-10-28 16:39:11.000000000 +0100
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+# Copyright (C) 2013, Red Hat, Inc.
+# Lars Kellogg-Stedman
participants (1)
-
root@hilbert.suse.de