70 Commits

Author SHA1 Message Date
Sean Dague
f35ff72b77 add support for changing cinder perodic_interval
As discovered in tempest, when you create and delete volumes
quickly, and have a small volume storage pool, you can get cinder
scheduler to think you are "out of space" when you are not.

This is because cinder scheduler updates free space on it's
periodic job, which defaults to 60 seconds. We need control over
that value for the devstack gate otherwise we regularly get
overruns if we run too many volume tests quickly.

Work around for bug 1180976

Expect that this will get removed later if cinder gets a more
efficient way to update the scheduler for freed resources.

Also, don't be completely stupid about setting defaults....

Change-Id: I20e52e66fcc94b224476cdd14c88bd6981b4e617
2013-05-16 18:05:47 -04:00
Jenkins
459bdc3b50 Merge "Add support for GlusterFS Cinder driver" 2013-04-23 18:07:20 +00:00
Eric Harney
cd26151261 Add support for GlusterFS Cinder driver
The GlusterFS volume driver can be used with Cinder by setting the
following in localrc:

CINDER_DRIVER=glusterfs
CINDER_GLUSTERFS_SHARES="127.0.0.1:/vol1;127.0.0.1:/vol2"

Shares are <host>:<volume> and separated by semicolons.

Change-Id: Iaa105233c9fce8d8fda0a9ea447e045b8d010db7
2013-04-22 17:16:21 -04:00
Jenkins
3927fa76d2 Merge "link /etc/tgt/stack.d to cinder volumes directory" 2013-04-15 13:20:28 +00:00
Steve Baker
18225d92c0 link /etc/tgt/stack.d to cinder volumes directory
This creates /etc/tgt/stack.d as a symlink to the cinder volumes
directory and includes it in /etc/tgt/targets.conf in a similar way
to /etc/tgt/conf.d

targets.conf only gets appended to when the symlink is created.
Any old /etc/tgt/conf.d/stack.conf is deleted

Change-Id: Ifb6412f6860ceb28b724644fb9b618638f552102
Fixes: bug #1072121
2013-04-14 12:48:41 -07:00
Dean Troyer
cc6b443545 Formatting cleanups, doc updates and whatnot
Change-Id: Ica8298353be22f947c8e8a03d8dc29ded9cb26dd
2013-04-09 14:05:32 -05:00
Dean Troyer
253a1a351b Move setup_develop call
Move setup_develop() call into the install_XXX() function as the
distinction has no real purpose.  This eliminates the configure_XXXclient()
function for Nova and Swift.

Also create install_cinderclient() as we will need it to handle dependencies
in a followup patch.

Chasing down another #$^%&&^^^$%%#$ prettytable version pin

Change-Id: I61d761bc57a31caf2ed0ade326ab236eb2bb7358
2013-04-02 01:40:53 -05:00
Sean Dague
4bf9d7a74a change the install/configure split
make setup_develop part of install so that configure is only about
config file setup.

Change-Id: I1ed58011e41c550d3ab2ba33b38cfe16adb3dde4
2013-04-01 16:41:39 -04: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
b7490da972 Clean up stack.sh config
* Clean up interactive configuration
* Complete moving initialization of service-specific varialbes into the
  service lib/* files.
* Cosmetic cleanups

Change-Id: Iea14359bd224dd5533201d4c7cb1437d5382c4d1
2013-03-20 17:04:23 -05:00
Jenkins
820467f20f Merge "Simplify database_connection_url" 2013-03-14 21:12:18 +00:00
John Griffith
997c10306e Set debug to True in cinder.conf
Adds a line to lib/cinder to turn on debug logging
by default in Cinder.

Change-Id: I9cc7d78b97eea40fc787ca68721b58fc7a00faf4
2013-03-05 23:03:25 +00: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
Jérôme Gallard
dda2b7afc7 Add cinder multi backend support to devstack
* add CINDER_MULTI_LVM_BACKEND parameter
* if CINDER_MULTI_LVM_BACKEND = True, creates 2 LVM volumes
    - Name : stack-volumes and stack-volumes2
    - Size : 5GB for each of them

Change-Id: I6e03b96e6b2aed0f0c166472300139fba9eaa68b
2013-02-26 09:44:34 +01:00
Stephen Mulcahy
67068ef415 Added cinder-backup service (not enabled by default)
cinder-backup service has been added to cinder. This fix adds the
cinder-backup service. To enable this service, c-bak must be added
to ENABLED_SERVICES in the users localrc. To actually perform a
backup the user must enable swift or another service.

Change-Id: If4ef8d78081be572987e7c38c76ff57e82b4f744
2013-02-22 15:45:56 +00:00
Joe Gordon
a58382acb6 Update cinder to use rootwrap_config
Move from using deprecated option root_helper to rootwrap_config

Fix bug 1130890

Change-Id: Iea8ad55f29bd74f2805c05d417ff56ab6afe6d72
2013-02-20 12:45:02 -08:00
Dean Troyer
f03bafeb84 Refactor init functions to simplify Grenade upgrades
* Glance: create_glance_cache_dir()
* Cinder: create_cinder_cache_dir() and create_cinder_volume_group()
* Nova: create_nova_cache_dir() and create_nova_keys_dir()
* Random tidy-up changes

Change-Id: I20d995d4c2e5facfb912ee03a6cda6c56f20bbe9
2013-02-15 14:56:19 -06:00
Jenkins
f3da41a5ee Merge "Introduce get_python_exec_prefix function." 2013-02-02 13:30:16 +00:00
Joe Gordon
07db713549 Improve millisecond logging
Always display 3 digits for milliseconds (appends 0s)
Based on I3f1461839258be0723e2d3616ec225a830d13029

Change-Id: I48b3f3781b4d34ed6a5fb9e4e78cee919afda6c1
2013-01-30 13:11:04 -08:00
Jakub Ruzicka
4196d5565e Introduce get_python_exec_prefix function.
get_python_exec_prefix returns the path to the direcotry where python
executables are installed, that is /usr/bin on Fedora and /usr/local/bin
everywhere else.

It is used to properly locate OpenStack executables.

Fixes: bug #1068386

Change-Id: I228498ebe2762568d00757d065e37377ee2c8fb3
2013-01-30 16:33:43 +01:00
Dan Prince
9f22f07a15 Cinder: update osapi_volume_extension default.
Updates the Cinder config file to use the new extension
loader location.

Change-Id: I515e16e00b54c69ae3c09e64841818eb4a9c8f73
2013-01-28 09:53:38 -05:00
MORITA Kazutaka
af22a477d1 lib/cinder: add sheepdog support
This enables us to use Sheepdog as a Cinder backend storage by setting
the CINDER_DRIVER environment variable.

Change-Id: I70cfb7f89ac3260d277fa160c457d220255de065
2013-01-17 16:58:05 +09:00
Akihiro MOTOKI
b0f1c38bdc Refactor rpc backend configuration logic
This commit also changes the following:
- Fixes Nova QPID module path
- Fixes a bug Cinder ZeroMQ RPC points to nova module
- Adds ZeroMQ setting for Heat RPC

qpid_is_supported is moved from functions to lib/rpc_backend.

This work is based on the work by Isaku Yamahata <yamahata@valinux.co.jp>
in https://review.openstack.org/#/c/19074/.

Change-Id: I45e21b1fb85e539213f5243764132a37906d7455
2013-01-14 16:12:06 +09:00
Jenkins
fec9355fd2 Merge "Fix "sudo: sorry, you must have a tty to run sudo"" 2013-01-12 20:35:13 +00:00
Jenkins
8aecaeee4c Merge "Set up Cinder for TLS" 2013-01-11 13:40:39 +00:00
Attila Fazekas
91b8d13eda Fix "sudo: sorry, you must have a tty to run sudo"
On many systems the requiretty sudoers option is turned on by default.
With "requiretty" option the sudo ensures the user have real tty access.

Just several "su" variant has an option for skipping the new session creation step.

Only one session can posses a tty, so after a "su -c" the sudo will not
work.

We will use sudo instead of su, when we create the stack account.

This change adds new variable the STACK_USER for
 service username.

Change-Id: I1b3fbd903686884e74a5a22d82c0c0890e1be03c
2013-01-11 09:15:30 +01:00
Jenkins
d9cfdc6ae1 Merge "Adjust CINDER_SECURE_DELETE flag to cinder changes" 2013-01-09 04:44:15 +00:00
Dean Troyer
22853c1974 Clean up cinder volume group rather than remove it
Removing the cinder volume group breaks devstack installations
that share that volume group with other logical volumes. It also was
leaking loopback devices.

Change-Id: Ice4470e06e08ce49a0e1f82af70abcc015c91c20
2013-01-07 15:21:08 -06:00
Joe Gordon
c99853ca71 Enable millisecond logging for nova and cinder
Change-Id: Ic28867ae9a436e81c7f2fcf79f40a1ecc251072c
2013-01-03 17:39:16 -08:00
Pádraig Brady
eac9370a12 Adjust CINDER_SECURE_DELETE flag to cinder changes
Cater for the pending more general cinder support
for configurable volume wiping method at:
https://review.openstack.org/#/c/12521

This change is done here first so as to not
trigger a CI lockup when the referenced patch above lands.
When that's in place, we can remove the older
secure_delete config adjustment in a subsequent patch.

Change-Id: I73fe2e0d1cf2815ab6025121584951cb5ff56fa3
2013-01-02 16:09:52 +00:00
Dean Troyer
6d04fd7ba5 Holiday docs and comment formatting cleanup
Change-Id: Ia4ca88c67d3b94e306a79a669805a2fa1b0dc069
2012-12-28 18:03:10 -06:00
Sean Dague
252f2f533b clean up cinder on an unstack
cinder currently has issues that leave volumes around
after tempest tests. Make sure that cinder gets cleaned
up to a zero state on an unstack.sh so that we can reset
the environment.

Change-Id: I448340899bf0fae7d4d16fa26da17feafcef888f
2012-12-20 16:43:41 -05:00
Dean Troyer
560346b506 Set up Cinder for TLS
* Start c-api proxy if 'tls-proxy' is enabled
* Configure Cinder service catalog for TLS

Change-Id: Ic692a0a16ffa51bfd4bfb67f827cd941ac0e72a4
2012-12-19 15:29:42 -06:00
Jenkins
701718a844 Merge "Use the right service name for tgt/tgtd in stop_cinder" 2012-12-19 18:39:36 +00:00
Jenkins
d22dd9c06c Merge "Clear out the keystone pki data for each run" 2012-12-18 13:13:50 +00:00
Vishvananda Ishaya
23431f3526 Clear out the keystone pki data for each run
This prevents old invalid tokens from working after a rerun of stack.sh
and potentially providing users and tenants that don't exist.

Fixes bug 1089700

Change-Id: Icfc22978e41e459d51b50bc7ad2e6d98d766e402
2012-12-17 08:44:01 -08:00
Dean Troyer
671c16e63a Move cinder account creation out of keystone_data.sh
Supports the coming HA/proxy configuration for Cinder

Change-Id: If2e08e45430dce895ed6bb1070612517a38ca4bc
2012-12-14 09:17:28 -06:00
Vincent Untz
90dd96d478 Use the right service name for tgt/tgtd in stop_cinder
Change-Id: I58cf8cdf88a3edebed729f4460e8ce222db3664d
2012-12-13 12:10:41 +01:00
Jenkins
e0195ed8ab Merge "Always create signing_dir regardless of token format" 2012-12-12 18:19:42 +00:00
Akihiro MOTOKI
5e3deb678e Always create signing_dir regardless of token format
Fixes bug 1088801

devstack does not create signing_dir when keystone token format is UUID.
If the default value of signing_dir is read-only, OpenStack services
such as Quantum server failed to start due to permission denied.

On the keystone client cannot know which token_format is used in keystone
in advance, so signing_dir should be created regardless of the token format.

Change-Id: I1b0d25c1ac4d22d9fb2c5443d15b96fdaa5a4c81
2012-12-11 18:16:05 +09: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
Jenkins
b3def626a2 Merge "Fix XenAPINFSDriver's path" 2012-12-06 21:27:23 +00:00
Jenkins
4b9062b619 Merge "Fix XenAPINFS configuration" 2012-12-06 21:27:04 +00:00
Mate Lakat
a0ca45f173 Fix XenAPINFSDriver's path
Fixes bug 1087329

As the driver was moved to a different location, devstack script needed
an update.

Change-Id: Iaa1db94a84b6e9cb99514ce886025600809e9f29
2012-12-06 17:45:49 +00:00
Attila Fazekas
b79574b495 Name the tgt/conf.d enties based on the vg name
On one system multiple volume and volume manger could be installed and
needs dedicated tgt config entries.
cinder-volumes, stack-volumes, nova-volumes are the default volume group
names.
/etc/tgt/conf.d/ files should be named based on the volume-group name.
The vg name is uniq on one system.
In devstack case the stack.conf is usable.

Changes:
* Rename conf.d/cinder.conf to conf.d/stack.conf
* Handle conf.d similary on all distribution

Change-Id: I856cdf4a21a414d2940d8f9d8b0b0368b1fad887
2012-12-06 17:24:10 +01:00
Mate Lakat
53d3d6baf9 Fix XenAPINFS configuration
fixes bug 1087272

Trying to configure XenAPINFS volume driver through localrc options
failed. This fix removes the extra check, as lib/cinder already exits on
error.

Change-Id: I874b7cee44861244cb7a340cc4094ef3f8b48a5a
2012-12-06 15:49:17 +00: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
Mate Lakat
b2fdafead2 Additional options for XenAPINFS cinder driver
Related to bp xenapi-storage-manager-nfs

Add configuration options to devstack scripts, so it is easier to set up
a system with a XenAPINFS volume backend. It makes possible to test this
configuration with exercises. To enable the XenAPINFS driver, specify:

CINDER_DRIVER=XenAPINFS
CINDER_XENAPI_CONNECTION_URL=<url for a xenserver>
CINDER_XENAPI_CONNECTION_USERNAME=<username for the xenserver>
CINDER_XENAPI_CONNECTION_PASSWORD=<password for the xenserver>
CINDER_XENAPI_NFS_SERVER=<a box that has an nfs export>
CINDER_XENAPI_NFS_SERVERPATH=<exported catalog>

in your localrc

Change-Id: Ia214172aac377d273a03849c8cc2adcbf5b8f607
2012-11-29 12:38:38 +00: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
Dean Troyer
4d3049e7cd Configure Cinder for syslog if enabled
Change-Id: I3d2770cd2c3e3b93c0f26de359e5b0cb166826c1
2012-11-07 11:47:57 -06:00