Commit Graph

21 Commits

Author SHA1 Message Date
Adam Spiers
6a5aa7c6a2 Fix some Markdown formatting issues
Address miscellaneous issues with Markdown formatting in comments which
are consumed by shocco when generating the online documentation.

Change-Id: I953075cdbddbf1f119c6c7e35f039e2e54b79078
2013-10-24 17:38:19 +01:00
Jenkins
7ad51b4a47 Merge "Do not install mysql if mariadb is installed on openSUSE" 2013-07-16 20:01:32 +00:00
zhhuabj
2832f28012 Set MYSQL_HOST parameter to better support multi-node mode.
When deploying openstack with multi-node mode,
mysql needs to be started by listening it's real ip, not localhost.
but devstack always use localhost to recreate databases that will
lead bellow errors.

Fix bug 1177735

Change-Id: I50284f469a998d023a41b4796f1dc775bb52e710
2013-05-08 18:47:49 +08:00
Vincent Untz
623a0a58f6 Do not install mysql if mariadb is installed on openSUSE
mariadb and mysql are conflicting on a package level, but are compatible
for our needs. So if mariadb is already installed, do not try to install
mysql.

Change-Id: I3aa991c1c4691df3e3f4798505668da3ab908998
2013-04-11 08:41:27 +02:00
Dean Troyer
cc6b443545 Formatting cleanups, doc updates and whatnot
Change-Id: Ica8298353be22f947c8e8a03d8dc29ded9cb26dd
2013-04-09 14:05:32 -05:00
Sean Dague
584d90ec56 add emacs shell-script tagging
for files that don't start with a #! or end in .sh, the added tags
are nice for emacs users to automatically switch to the right mode.

Change-Id: If4b93e106191bc744ccad8420cef20e751cdf902
2013-03-29 14:36:49 -04:00
Dean Troyer
995eb927f7 Add clean.sh
clean.sh gets rid of all residue of running DevStack except installed
packages and pip modules.

And it eradicates rabbitmq-server and ts erlang dependencies as well as
the other RPC backends and databases.

Change-Id: I2b9a251a0a151c012bae85a5a2f9c2f72e7700be
2013-03-15 10:30:37 -05:00
Attila Fazekas
7e79d9139f Simplify database_connection_url
* does not expects dynamic scoping.
* does not uses eval.

Change-Id: I5ba4e5b7ffaabbb3c2bddadf9e53a2875de8b7c0
2013-03-03 13:13:36 +01:00
Dean Troyer
41bf452023 Handle nested xtrace states
The lib/database abstraction includes the appropriate database file that also
contains the $XTRACE bits at entry and exit.  The nested XTRACE handling overwrote
the value from lib/database.  So...make the nested files use their own
XTRACE variables.

Change-Id: Ibdfc8d7d1e1457a9bc889b781ce176b417789ea1
2013-01-28 14:32:05 -06:00
Joe Gordon
767cd63179 Set MySQL slow log to record every query
Since devstack is for development, lets record all SQL queries to enable
debugging, and further development.

Change-Id: Idb4078a0d3a84151ad4c506f8861637d84ae47ad
2013-01-22 11:08:24 -05:00
Monty Taylor
7c73e8dee7 Enable MySQL slow query log.
Change-Id: I3db33839bea28abaff01f1d7b7d6698c5dd2c083
2013-01-14 05:20:06 -08:00
Dean Troyer
6d04fd7ba5 Holiday docs and comment formatting cleanup
Change-Id: Ia4ca88c67d3b94e306a79a669805a2fa1b0dc069
2012-12-28 18:03:10 -06:00
Vincent Untz
b1b04d066d Fix postgresql setup on openSUSE
The initdb call is part of starting the service for the first time, so
we need to do that.

Also, restart postgresql after sed'ing its configuration files: if it
was already running for some reason, it needs to be restarted, not
started.

Change-Id: Ib7d3ff5217d06a7764a62a36084090514a1825ea
2012-12-12 16:15:06 +01:00
Vincent Untz
00011c0847 Add is_fedora and exit_distro_not_supported functions
Between is_fedora, is_ubuntu and is_suse, we can make the code a bit
simpler to read. We also use exit_distro_not_supported to identify
places where we need implementation details for new distros.

As "/sbin/service --skip-redirect" is Fedora-specific, guard this with a
is_fedora test too.

Change-Id: Ic77c0697ed9be0dbb5df8e73da93463e76025f0c
2012-12-07 09:06:07 +01:00
Vincent Untz
c18b965152 Add is_ubuntu function
This replaces all of the [[ "$os_PACKAGE" = "deb" ]] tests, except when
those tests are before straight calls to dpkg.

Change-Id: I8a3ebf1b1bc5a55d736f9258d5ba1d24dabf04ea
2012-12-04 18:30:13 +01:00
Vincent Untz
ca5c471386 Add package names for openSUSE/SLE
Change-Id: I487cc7b8bd228ff77c9881528e3395cbe3c43d4a
2012-11-28 16:26:53 +01:00
Vincent Untz
856a11e0e4 Add partial openSUSE/SLE support
Note that this is the first part of the support. A second part involves
dealing with the package names.

Among the changes:
 - add several functions to determine some distro-specific behavior (how
   to call usermod, if some features are available on the distro, etc.)
 - correctly detect openSUSE and SLE in GetOSVersion, and set DISTRO
   accordingly
 - new is_suse() function to check if running on a SUSE-based distro
 - use zypper to install packages
 - adapt apache virtual host configuration for openSUSE
 - some simple fixes (path to pip, mysql service name)

Change-Id: Id2f7c9e18a1c4a7b7cea262ea7959d183e4b0cf0
2012-11-28 16:22:12 +01:00
Terry Wilson
adfc7a3c0a Re-add postgresql-setup initdb for Fedora
The Fedora RPM does not set up the postgresql data directory.
postgresql-setup initdb must be run after installing the RPM.

Change-Id: I5e5ab659e83f4ee6a024f74a23bf4562ea0065ce
2012-11-20 14:19:16 -05:00
Matthew Treinish
c3fca08149 Remove use of nonexistent postgresql-setup.
On Ubuntu the default postgresql data directory is not
/var/lib/pgsql/data so the check to see if that directory
exists is not needed. On Fedora we can assume that the rpm will
create it and initialize it properly. So this line can safely
removed without any issues.

Change-Id: If949f0580eb139f3803b698ee88fceebf958448e
2012-11-15 14:14:30 -05:00
Dean Troyer
c1b486a520 Simplify database selection
Do not require every script that sources stackrc to also
source lib/databases.

* Move use_databases() to functions
* Set DATABASE_TYPE in stackrc
* Allow setting DATABASE_TYPE in localrc to work
  (use_database() essentially just sets DATABASE_TYPE at this stage
  so continuing to use it is equivalent)
* Validate DATABASE_TYPE in stack.sh.
* Change sudo to postgresql user to go through root to eliminate
  password prompt
* fix use_database error condition

Change-Id: Ibb080c76e6cd7c6eebbb641a894d54b1dde78ca6
2012-11-15 11:48:18 -05:00
Terry Wilson
428af5a257 Add PostgreSQL support to devstack
This patch adds an interface for supporting multiple database backend
types and implemnts support for PostgreSQL. It also adds a function,
use_exclusive_service, which serves as a base for enabling a service
that conflicts with other services. The use_database function uses it,
and it might also be useful for selecting messaging backends.

MySQL is still selected by default. Tested on Fedora 17 and Ubuntu
12.04 with MySQL and PostgreSQL. Implements blueprint postgresql-support

Change-Id: I4b1373e25676fd9a9809fe70cb4a6450a2479174
2012-11-03 18:19:21 -04:00