168 Commits

Author SHA1 Message Date
Jenkins
3a68aee3ad Merge "Use auth vars for admin user" 2017-06-04 15:05:29 +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
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
Jenkins
defc49448b Merge "Add compute inventory precheck" 2017-05-02 08:05:17 +00:00
Eduardo Gonzalez
fee4eee0be Add compute inventory precheck
With nova cells_v2 at least one compute node is required in
inventory to deploy nova.

This change add prechecks to ensure at least 1 compute is present.

Change-Id: I242518ad3bd149ad245515299301777f6b3bdd08
Closes-Bug: #1686410
2017-04-26 16:18:15 +02:00
Eduardo Gonzalez
5dfb81efc8 Update simple_cell_setup to manual creation
Simple_cell_setup is not recomended to use.
Is better create map_cell0 manually, create base
cell for non cell deployments and run discover_hosts.

This PS migrate actual config to make use of described
workflow at [1]. We our actual workflow we're running
into the issue that services are not mapped until cells
are present, breaking deployment waiting for compute
services to appear.

[1] https://docs.openstack.org/developer/nova/cells.html#fresh-install

Change-Id: Id061e8039e72de77a04c51657705457193da2d0f
Closes-Bug: #1682060
2017-04-18 12:09:13 +01:00
Bertrand Lallau
3170b6c2a7 Fix 'node_config_directory' variable bad usage
Some roles made a bad usage of the 'node_config_directory' variable.

As described here:
https://github.com/openstack/kolla-ansible/blob/master/ansible/group_vars/all.yml#L16

'node_config_directory' is the directory to store the config files on
the destination node.

This variable MUST be changed to 'node_custom_config'.
Futhermore this will unified all roles.

Closes-Bug: #1682445
Change-Id: Id8d8a1268c79befac8938c1e0396267314b40301
2017-04-13 17:15:24 +02:00
Eduardo Gonzalez
de4747afae Temporaly fix deploy gate
Nova service-list is returning empty registered service
when in database they are. Because of this, simple_cell_setup
is not executed and deploy stucks waiting for nova-compute.

This change temporaly checks the database for existing nova services
instead of openstack compute service list.

This change will need to be reverted once the command is fixed.

Change-Id: Ic508eb3ff03b5f233186353fc7697305cc792d14
2017-04-11 18:10:06 +01:00
caoyuan
312c3fe56f Fix the Nova SSH port prechecks missing
Change-Id: Ide78ed1de89a9904db48f08fcff3c247ee650317
2017-03-19 16:55:58 +08:00
Jenkins
9e804f4286 Merge "Multi-regions Support" 2017-03-16 17:42:07 +00:00
Nathan Harper
586e81f39e Nova external-ceph.yml writes keyname into libvirt.base64
Closes-Bug: #1671862
Change-Id: I6b77773238cd65a3cc009d8d9a38bdbea0035212
2017-03-14 08:53:28 +00:00
rcherrueau
dcdbe44190
Multi-regions Support
Add support for basic multiple regions, that is to say, many OpenStack
with a shared Keystone (same users) and Horizon. The shared Keystone
and Horizon are deployed into one region, for instance RegionOne.
Services of other regions have an access to this Keystone. This
support assumes that the operator knows the name of all OpenStack
regions in advance, and considers as many Kolla runs as there are
regions.

The new variable, multiple_regions_names, contains the name of
regions. It is needed by the region that includes Keystone and
Horizon. In register.yml, it specifies to create as many Keystone
endpoints as there are regiones, so that services of other regions can
connect to Keystone. In local_settings.j2, it changes the render to
support multiple regions in Horizon. The multi-regions.rst explains
how to perform a multiple regions deployment.

Implements: blueprint multi-kolla-config
Change-Id: Icab2aebfc4de0e3bc609950956e0af397705f403
2017-03-10 14:24:42 +01:00
Jenkins
0160521337 Merge "Fix typo in nova external ceph" 2017-03-10 02:09:58 +00:00
Jenkins
5ce03840d1 Merge "Remove cell setup and db creation nova upgrade" 2017-03-09 17:45:36 +00:00
Jenkins
9d0daa015a Merge "Enable sanity checks from kolla-ansible" 2017-03-09 17:31:51 +00:00
Eduardo Gonzalez
07a8c47f33 Fix typo in nova external ceph
Nova external ceph task have a type which break deployment.
State module not present, the module used should be stat.

Change-Id: Ie8a0b30f44fc35a597334383a85353d324e765cd
Closes-Bug: #1671526
2017-03-09 16:54:30 +00:00
Paul Bourke
5418ada148 Enable sanity checks from kolla-ansible
Add a new subcommand 'check' to kolla-ansible, used to run the
smoke/sanity checks.

Add stub files to all services that don't currently have checks.

Change-Id: I9f661c5fc51fd5b9b266f23f6c524884613dee48
Partially-implements: blueprint sanity-check-container
2017-03-09 10:37:06 +00:00
Eduardo Gonzalez
58195bd264 Remove cell setup and db creation nova upgrade
cell0 is already setup in Ocata, when upgrading to Pike
is not anymore necessary to create.
All nova DBs (nova_api, nova and nova_cell0) are already
created in Ocata too. Only bootstrap_service is needed
while upgrading.

Change-Id: Idc4941334faf91feee868472155a8c8ea0eba436
2017-03-08 18:53:55 +00:00
Jenkins
a6da1bda59 Merge "Fix booting from volume failure" 2017-03-08 15:28:27 +00:00
Jeffrey Zhang
d06efcecc5 Fix booting from volume failure
Booting from volume require cinder's ceph client secret now. Move cinder
before nova in site.yml, because nova depends on cinder ceph client key
now.

Change-Id: I01c9ed80843d98305b8963894c4917c21a35d3ac
Closes-Bug: #1670676
2017-03-08 21:16:06 +08:00
Jenkins
37958ae0f7 Merge "Fix the failure when running precheck after deploy" 2017-03-07 14:05:57 +00: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
Jeffrey Zhang
57dc5b3e36 Use internal interface instead of public interface
In some case, public interface may not reachable in internal.

Change-Id: Ibcdef571a6814e6626216fe33028e5e69889b4f2
Closes-Bug: #1670259
2017-03-06 14:08:35 +08:00
caoyuan
82b5dc643d Add the missing prechecks for placement_api
Change-Id: Ic3cbf89b135a1902fa57a8d1df8c858cd6398097
2017-02-24 22:17:31 +08:00
Jenkins
d9740e9c40 Merge "Remove unnecessary until in register.yml file" 2017-02-22 12:28:06 +00:00
Jeffrey Zhang
af2acb25e5 Do not failed when there is no nova-compute is running
In ironic environment deployment, the compute nodes info will be empty
until ironic node is created. There are also some case that user just
want deploy without any nova-compute.

Also enable auto discover hosts feature. This is useful for small
environment.

Closes-Bug: #1666031
Change-Id: I6f3d1c3668452a404875aa5621ee99b2b41e28f0
2017-02-20 01:11:03 +08:00
Eduardo Gonzalez
b402dd16ed Recover nova reload task to upgrade
Sighup signal is neccessary to reload upgrade levels
on all services communicating with rpc.
If not rpc version will remain in Newton.

Change-Id: I4b02d933699aa9b013dfbc65d1e57d53db49bcee
2017-02-08 10:45:41 +00:00
Jeffrey Zhang
38ad05a872 Remove unnecessary until in register.yml file
Change-Id: I1577cc3afef4dadd3a188c8ba749c9cdfad313ae
2017-02-04 14:38:54 +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
Jeffrey Zhang
facfabf3bb Implement nova placement service
Closes-Bug: #1660987
Depends-On: I30efc20e6d918e08860584c017455e6d5fa91a35
Change-Id: If0a79b6013f28871dc9f13c510c919078f3304d5
2017-02-02 05:18:13 +00:00
Jeffrey Zhang
68d3d8ba29 Run nova-manage simple_cell_setup during deploying and upgrading
Change-Id: I64dd52d909a884b2b9aea6f016d789d99caa3f17
Closes-Bug: #1652580
2017-02-02 12:21:53 +08: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
Jeffrey Zhang
35f9335572 Optimize reconfigure action for nova
Change-Id: Ida7c955d9ddf7b7dc3289001958326c38c62d0c9
Partially-implements: blueprint better-reconfigure
2017-01-25 13:20:06 +08:00
Jenkins
f2f30b4a5e Merge "Ansible config for nova-serialproxy console" 2017-01-24 16:40:40 +00: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
Eduardo Gonzalez
3d03a50864 Ansible config for nova-serialproxy console
Change-Id: Ifd40ca95c82fafacaf91291511f7048351d1bf42
Partially-Implements: blueprint nova-proxies
2017-01-12 10:27:47 +00:00
caoyuan
029c5ae4af Move nova precheck into its own role
Change-Id: I1d9a0f0ed3d50acb1828d0894413a9adc7f21b2a
Partially-implements: blueprint condition-pre-check
2017-01-11 16:33:47 +08:00
Eduardo Gonzalez
d7a3cbdc67 Fix code style in start_compute.yml
Add space in jinja definition and specify nova-compute
in set volume fact task name.

TrivialFix

Change-Id: I94a3bb2415f1f8d60c646b488be4acc09c489a0a
2017-01-04 15:17:46 +00:00
Jenkins
1c6a696c17 Merge "Do not mount /var/lib/nova/mnt unless nfs cinder backend is enabled" 2016-12-23 05:04:57 +00:00
Ethan Lynn
e237319965 Always check enable_* variables first
Check enable_* variables first, then check inventory_host in
group, will help to avoid configuration errors.

Change-Id: Icdb1f50e5c911203b92ac431723620756b15f3c6
Closes-Bug: #1648376
2016-12-08 17:59:48 +08:00
Jeffrey Zhang
5bd67a706b Do not mount /var/lib/nova/mnt unless nfs cinder backend is enabled
When enable_cinder_backend_nfs is only used, /var/lib/nova/mnt is no
need to mount. Then we do not need care whether this folder is sharable.

Change-Id: I53f4c2c9ec25775cdb02a3256fd3a878723d15f6
Closes-Bug: #1644602
2016-12-03 21:33:21 +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
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