112 Commits

Author SHA1 Message Date
caoyuan
36c530f9ed Fix the database user name for all roles
when create database user, it should use
database_user, not database_name.

Change-Id: I4dfa01d1a5a46c5c58f1fc47b0be71b186462764
Closes-Bug: #1698762
2017-06-20 21:19:31 +08:00
Jenkins
cec609f225 Merge "Fix cinder-api ubuntu binary deploy" 2017-06-05 11:18:17 +00:00
Jenkins
3a68aee3ad Merge "Use auth vars for admin user" 2017-06-04 15:05:29 +00:00
Jenkins
f1b7366e78 Merge "Add copy ceph keyring files conditions in cinder" 2017-05-23 11:23:15 +00:00
Bertrand Lallau
afdd11b9a2 Generalize api_interface_address variable usage
Useful api_interface_address variable has been define here:
https://github.com/openstack/kolla-ansible/blob/master/ansible/group_vars/all.yml#L57
In order to simplify codebase we must use it as much as possible.

Change-Id: I18fec19bf69e05a22a4142a9cd1165eccd022455
2017-05-23 08:35:15 +00:00
Eduardo Gonzalez
e9bde0dcb9 Use auth vars for admin user
In someplace in the code admin user, project and domain name
are hardcoded.

This change use the correct variable defined at:
https://github.com/openstack/kolla-ansible/blob/master/ansible/group_vars/all.yml#L278

Change-Id: I3a4c78d81733bf7a2f3c67d259ec5c5f5bb38d3f
2017-05-16 08:54:37 +00:00
Eduardo Gonzalez
ba78082e0c Fix cinder-api ubuntu binary deploy
This changes moves cinder-api to make use of apache to
launch its processes.
Ubuntu binary removed support in Ocata for cinder-api
system services [1]. At this moment cinder in Ocata branch
is not working at all due this issue.

This changes aims to fix cinder in master only for ubuntu
binary with the purpose of make a clean backport to stable/ocata
without do any other change on the backport process.
A follow up change will migrate other OS/install_type to make use
of Apache but only changing master branch.

[1] http://lists.openstack.org/pipermail/openstack-dev/2017-January/111069.html

Change-Id: I9885d6acadbac1da46844f583e7cd37785505ae0
Closes-Bug: #1676751
2017-05-12 12:00:21 +01:00
Jeffrey Zhang
b1f015616c Add timeout parameter for precheck tasks
wait_for module waits 300 seconds for the port started or stopped.  This
is meaningless and useless in precheck. This patch change timeout to 1
seconds.

Change-Id: I9b251ec4ba17ce446655917e8ef5e152ef947298
Closes-Bug: #1688152
2017-05-04 09:02:25 +08:00
shaofeng_cheng
3a67e5727b Add copy ceph keyring files conditions in cinder
If used external ceph for cinder,the ceph storage not enable cephx.
So ceph keyring file not does not exist.
Task throw warning of copy over ceph keyring files.

Change-Id: Ibb3cd536c982ad9dede3c2a0ecfc02cdf6e4c1b9
Closes-Bug: #1684461
2017-04-21 09:58:50 +08:00
Jeffrey Zhang
9866f8b4b7 Register Cinder v3 endpoint in keystone
Change-Id: I2658259d88a8df1c0d716ed6f360f9514fb957b5
Closes-Bug: #1673703
2017-03-17 18:40:12 +08:00
Jeffrey Zhang
47762d4850 Fix the failure when running precheck after deploy
* Move the tasks to the role
* Skip the task when container is already running

Change-Id: I1990d4dd2a02efa2b3766329000aa23419e0ff17
Closes-Bug: #1670286
2017-03-07 06:57:16 +00:00
Jenkins
d9740e9c40 Merge "Remove unnecessary until in register.yml file" 2017-02-22 12:28:06 +00:00
Jenkins
bb52076329 Merge "Add Loading nfs_shares file without .j2 extension in cinder config" 2017-02-21 16:02:06 +00:00
Jeffrey Zhang
5355155783 Fix copying over nfs_shares task failure
Change-Id: I2e050d811a26ac83f2336d25b02952a9e9835142
Closes-Bug: #1662625
2017-02-08 16:26:56 +08:00
Mauricio Lima
4957752286 Fix parameter issue in cinder handlers
Co-Authored-By: Jeffrey Zhang <jeffrey.zhang@99cloud.net>
Change-Id: I92c0757af6567cbb4ff338493df9931ebef3366c
2017-02-04 15:55:29 +08:00
Jeffrey Zhang
38ad05a872 Remove unnecessary until in register.yml file
Change-Id: I1577cc3afef4dadd3a188c8ba749c9cdfad313ae
2017-02-04 14:38:54 +08:00
Jeffrey Zhang
71f6d104d8 Add Loading nfs_shares file without .j2 extension in cinder config
We do not use *.j2 filename pattern in custom config folder. Add
nfs_shares without .j2 extension for consistency. And do not remove the
.j2 extension file for back compatibility.

Change-Id: Ic66c2f3188e818b9dff4d693102f0d433d2695ac
2017-02-04 13:16:26 +08:00
Eduardo Gonzalez
4e0fa6a334 Remove hardcoded usernames in register.yml
Usernames can be configured with variables in
configuration files, but user creation is hardcoded.

Change-Id: I057cfb921d776217db66f59226dcfa79f3eb7368
Closes-Bug: #1661587
2017-02-03 12:17:54 +00:00
Eduardo Gonzalez
485ded5ba3 Fix pull syntax error in cinder
Change-Id: I548cb6cbc718864cffb95b73376a3e138eef0a6d
Closes-Bug: #1660961
2017-02-01 14:31:52 +00:00
Jenkins
cb4cef062e Merge "Optimize reconfigure action for cinder" 2017-01-27 17:30:43 +00:00
Jenkins
8884422f3d Merge "Refactor register.yml files" 2017-01-26 18:48:59 +00:00
Jeffrey Zhang
8155d74d8d Refactor register.yml files
Co-Authored-By: Mauricio Lima <mauriciolimab@gmail.com>
Change-Id: I9a4a6b6523dee4b388513386b7d85d421f2b7b89
2017-01-26 17:10:27 +00:00
caoyuan
60d24417df Optimize reconfigure action for cinder
Co-Authored-By: Mauricio Lima <mauriciolimab@gmail.com>
Change-Id: I8718c4a63f1d645f3e947f8ce90d196f9cbfd91a
Partially-implements: blueprint better-reconfigure
2017-01-25 09:18:36 -03:00
Jenkins
1da30ce395 Merge "Allow cinder-volume to be configured to use HNAS nfs" 2017-01-24 13:08:38 +00:00
Mauricio Lima
8b93e9d69d Allow cinder-volume to be configured to use HNAS nfs
Change-Id: I5910da875eba9f9b9a18d27fcb69bb38ad67bad0
2017-01-18 11:06:45 -03:00
Jenkins
3f8cb8adda Merge "Refactor bootstrap.yml file" 2017-01-18 10:17:50 +00:00
Jenkins
016d79f009 Merge "Render ceph.conf using merge_configs" 2017-01-17 16:40:04 +00:00
jackning
b25c6b15fe Render ceph.conf using merge_configs
At present, cinder/nova/glance/gnocchi relative containers's
ceph.conf aren't be merge from user custom's config.
In some condition, we should add extra parameter to custom's
ceph.conf, for example:rbd_default_features = 1.

So, it is necessary to use merge_configs instead of template.
Closes-Bug: #1656162

Change-Id: I824e0c68af270b85c52382ae35987213266fc6f6
2017-01-17 09:32:44 +08:00
Jeffrey Zhang
7233b45d29 Refactor bootstrap.yml file
Change-Id: I00d2dcb0895548ba169ab85764cf546c2214cbf5
2017-01-12 23:37:50 +08:00
Eduardo Gonzalez
a18174b3b4 Unify jinja syntax
Change-Id: I63197f8c5646e44a9a7287e644c904a1e227af23
2017-01-12 10:52:44 +00:00
caoyuan
91313d8293 Move cinder precheck into its own role
And remove the unnecessary blanks.

Change-Id: Id2b5f8119c446b36c91ec0e63246c90a60459e24
Partially-implements: blueprint condition-pre-check
2017-01-03 15:23:54 +08:00
Duong Ha-Quang
b5d1e4b457 Fix placement of policy.json
Currently, policy.json is put in
"{{ node_config_directory }}/{{ service_name }}"
in target nodes.

Relocation policy.json to "{{ node_config_directory }}/{{ item }}"
with item is corresponding service compoment config directory.

Currently, the policy.json is copied to all services, but it
should be reviewed and left only in neccesary service
(at many cases, only API service needs that).

Redundant files will be removed in follow up patchset.

Change-Id: I0e997dccf4ec438c9c0436db71ec2fd06650f50d
Closes-Bug: #1639686
2016-11-29 16:00:09 +07:00
Mauricio Lima
7bb88390d8 Fix copying nfs_shares configuration
Using the `when` conditional on a `with_` loop gets evaluated on each
loop iteration and will not skip a task entirely. Use the `skip`
attribute to ignore errors in this scenario but only `skip` when
`enable_cinder_backend_nfs` is not enabled. If it is enabled the
`nfs_shares` file should be required and this task should fail if it
does not exist.

Co-authored-by: Andrew Widdersheim <amwiddersheim@gmail.com>
Change-Id: I6b997dd943efe7b16beb63899c1488fa5353d996
Closes-Bug: #1641183
2016-11-11 14:33:26 -05:00
xionglingfeng
17e6e629f5 Allow cinder-volume to be configured to use NFS
Allow cinder-volume, nova-compute and nova-libvirtd to be configured to
use NFS. In order to mount and work with NFS shares, several containers
needed the NFS packages installed during build time.

One somewhat significant change is the addition of an explicit bind
volume for nova-compute that has shared mounts enabled.

According to docker-run(1), the shared mount propagation flag can only
be specified for bind mounted Docker volumes and not named volumes.

In an NFS setup, cinder-volume mounts the NFS shares so that it can
create and manage the Cinder volumes. When a new instance is created
with a Cinder volume or a Cinder volume is attached to an existing
instance, nova-compute mounts the Cinder volume from the NFS share for
nova-libvirtd. In order for nova-libvirtd to then see those Cinder
volumes the shared mounts flag must be enabled for the Docker volume.

Remove the rpcbind container as it is only necessary for operators who
are using NFSv3 or lower. There is no known need for this currently
however, this container can be added in the future should an operator
require it.

Co-authored-by: Ryan Hallisey <rhallise@redhat.com>
Co-authored-by: Andrew Widdersheim <amwiddersheim@gmail.com>
Change-Id: Iad77c05bce8876bdcc69b7ec22edd50e3bf48b9f
Closes-Bug: #1530515
Partially implements: blueprint  nfs-support-in-cinder
2016-11-07 12:57:54 -05:00
Jenkins
dbc881456b Merge "Custom policy files" 2016-11-04 13:42:55 +00:00
Jeffrey Zhang
fa45801946 Move precheck into its own role
* Merge prechecks.yml and site.yml playbook
* Create empty precheck.yml into all roles.

Change-Id: I8a138558a26c0a2a66c5fd48ed37be657c99c1dd
Implements: blueprint condition-pre-check
2016-11-03 14:48:58 +08:00
Eduardo Gonzalez
ef1fd6b8c0 Custom policy files
Allow operators to use their custom policy files.
Avoid maintain policy files in kolla repos, only copying
the files when an operator add their custom config.

Implements: blueprint custom-policies
Change-Id: Icf3c961b87cbc7a1f1dd2ffbfffcf271d151d862
2016-10-28 10:47:05 +01:00
Jeffrey Zhang
ce5a11a374 Fix stale namespace removal issue
When using both /run and /run/netns in docker container, mount
propagation won't work when delete namespace after the containers are
restarted. This PS makes /run mount as shared.

Closes-Bug: #1616268
Change-Id: Ie16699e1b193b2bf1263d89ea634e89ea69add9e
2016-10-15 01:49:13 +08:00
Jenkins
45b0f2cf63 Merge "Remove do_reconfigure.yml file for all roles" 2016-10-13 16:20:30 +00:00
Jeffrey Zhang
fa856556d5 Remove do_reconfigure.yml file for all roles
do_reconfigure.yml is introduced to use serial directive. But we use
it in wrong. Now serial has moved to playbook file. So it is time to
remove the do_reconfigure.yml file

Closes-Bug: #1628152
Change-Id: I8d42d27e6bc302a0e575b0353956eaef9b2ca9fd
2016-09-27 15:04:00 +00:00
caoyuan
cfe93911da Fix the url of Cinder endpoints
When use "openstack endpoint list" to list the endpoints of
cinder service, the url is not right. This patch fix it.

closes-Bug: #1627061

Change-Id: I43756421680f4ce59f7cbfb02509aa96c9e5ca9b
2016-09-26 09:40:15 +00:00
Vladislav Belogrudov
b1f986c349 Cinder cannot use external non-LVM iSCSI storage
Currently Cinder enables iscsid service only when LVM is choosen as
backend. This fix will allow to specify external iSCSI storage via
configuration add-on and to run iscsid independently of LVM settings.

Change-Id: Iaae0f8025534e5ab1c5f9d5e812a7d41129915ef
Closes-Bug: 1614125
2016-09-21 12:28:07 +00:00
Jenkins
d75847772d Merge "Cinder-backup fails while backing up iSCSI volumes" 2016-09-16 20:19:42 +00:00
Mick Thompson
4c1482b999 Added serial option to site.yml.
Useful for upgrade etc., which is preferablly done serially.

Example usage: tools/kolla-ansible deploy OR tools/kolla-ansible upgrade

Closes-Bug: #1576708

DocImpact

Change-Id: I34b2e16f8ce53e472a4682a4738c4ac0f5abf00c
2016-09-13 09:26:51 +00:00
Vladislav Belogrudov
da8ce56cc6 Cinder-backup fails while backing up iSCSI volumes
Cinder backup needs access to the same volumes as
cinder volume service when saving/restoring iSCSI disks

Change-Id: Ib1956cbd57e8959bad520b8d4c6d792a449ecf22
Closes-Bug: #1614460
2016-09-06 16:49:02 +03:00
Duong Ha-Quang
5e35fc54a6 Port with_ loop variable syntax to Ansbile 2 (finish)
Migrate to full variable syntax in with_ loop
instead of bare variables for:

- cinder
- haproxy
- ironic
- magnum
- mistral
- mongodb
- murano
- swift
- watcher

TrivialFix
Change-Id: I3ef2e79053cf609aaa710e43ffd0adbc5a97565b
2016-08-18 17:45:52 +07:00
Jeffrey Zhang
1b0e701402 Simplify the Cinder LVM backend
Remove the unnecessary option in the  group_vars/all.yml file.

* removed some cinder.conf options like volume_backend_name,
  iscsi_helper, iscsi_protocol etc. these value can be configured by
  custom cinder.conf file, no need export as global variables.
* remove meaningless iscsi_ip_addess, which is not used in LVM driver
* force start iscsi relate when enable_cinder_backend_lvm is yes

TrivialFix
Change-Id: Ifcbfdad15e4d68bc5f20fc77e0315a09983ef022
2016-07-25 09:50:12 +08:00
Mathias Ewald
3894883871 External Ceph - Implementation Cinder
This patch adds support for external Ceph clusters for Cinder.

For clean integration the backend configuration mechanism had to be
slightly adjusted.

We now have the option to enable multiple backends for Cinder
independently.

Currently, the flags cinder_backend_iscsi and cinder_backend_ceph are
used to toggle backends.

Documentation on how to use external ceph was added.

Change-Id: I7e0267b90d62d6d881f24f063cdb894422ec8618
Partially-Implements: Blueprint: external-ceph
2016-07-19 12:45:48 +00:00
Jeffrey Zhang
b90ecae39c Fix the cinder backup permission issue when enable ceph
Closes-Bug: #1587244
Change-Id: I22ed3c57e4669c4372daf448da8385729c7cc8d1
2016-05-31 13:04:30 +08:00
Jenkins
6f17a71d7f Merge "add support for non-default database_port in kolla/ansible" 2016-05-26 09:24:56 +00:00