this might obviate the need for postgresql in the gate, as it will
make mysql act more strict. Suggested by Monty during Atlanta
summit on test matrix.
Change-Id: Ibfcb0959159f3b84fe35a1198d481bff308da0d4
The mysql config file is using INI format so use the iniset function to
manipulate it. This change also rearranges the config updates a bit
allowing us to make mulitple changes in a single sudo call. This reduces
the number of required process forks, and the number of times the 'functions'
file needs to be sourced a bit.
The "log-slow-queries" option is deprecated since mysql 5.1.29 and got
removed with 5.6.x. Use the newer slow-query-log-file/slow-query-log
settings instead. They are available since 5.1.12. This fixes a problem
with running devstack with mysql-5.6, which is e.g. part of openSUSE
13.1.
Change-Id: Iea28bf05c664b5387d51dae1a63a780344623596
The clean.sh script should also remove the /etc/mysql
directory. It contains information from the old
devstack installation and may conflict with the further
one. apt-get purge does not remove it since the
directory is not empty.
Change-Id: I885345a2311851d8746abe42e44300ecd4f6e08a
Removes the dependence with aptitude by replacing
the call of:
aptitude purge -y ~npackage by apt_get purge -y package*
Change-Id: I08875ffad9dc6293047827666f02453a355b16ea
Closes-Bug: 1281410
RHEL7 still in beta status, so it will require the FORCE option,
until the GA release.
The main notable difference from another RHEL family members, it does
not have the mysql alias for the mariadb.
Change-Id: Ic90bb6c3dd9447fc80453c3dc1adb22cdfc6226f
* lib/databases/mysql: Wrap query log configuration in a check for a
ENABLE_QUERY_LOGGING variable.
* stackrc: Add the DATABASE_QUERY_LOGGING variable defaulted to True.
Change-Id: Iddf8538ad0a1e36e2c6944dc70315984026c8245
postgresql-setup does not exists on el6,
the service postgresql initdb is the documented db init command.
Change-Id: I2b92a3c8e7db603eb13378e46893fc81f507405b
When using postgresql we were handling the fallback if the role root was
already here but this was still printing an error message, try to make
it a bit smarter.
Closes-Bug: #1265477
Change-Id: Ib3768dd182ab968e81038f900550f641b9a2af5c
Address miscellaneous issues with Markdown formatting in comments which
are consumed by shocco when generating the online documentation.
Change-Id: I953075cdbddbf1f119c6c7e35f039e2e54b79078
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
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
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
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
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
Since devstack is for development, lets record all SQL queries to enable
debugging, and further development.
Change-Id: Idb4078a0d3a84151ad4c506f8861637d84ae47ad
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
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
This replaces all of the [[ "$os_PACKAGE" = "deb" ]] tests, except when
those tests are before straight calls to dpkg.
Change-Id: I8a3ebf1b1bc5a55d736f9258d5ba1d24dabf04ea
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
The Fedora RPM does not set up the postgresql data directory.
postgresql-setup initdb must be run after installing the RPM.
Change-Id: I5e5ab659e83f4ee6a024f74a23bf4562ea0065ce
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
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
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