Allow live migration attributes

Change-Id: I435200916b006af9146b8b2790fd167ad4d50fee
Closes-Bug: #1286582
This commit is contained in:
Mark Vanderwiel 2014-06-25 10:46:48 -05:00
parent 62bb379397
commit 3cbc281f77
6 changed files with 28 additions and 7 deletions

View File

@ -1,6 +1,8 @@
# CHANGELOG for cookbook-openstack-compute
This file is used to list changes made in each version of cookbook-openstack-compute.
## 9.2.9
* Allow live migration to have attribute overrides
## 9.2.8
* Allow inject_partition to have attribute overrides

View File

@ -133,6 +133,7 @@ Openstack Compute attributes are in the attribute namespace ["openstack"]["compu
* `openstack["compute"]["config"]["allow_resize_to_same_host"]` - Allow destination machine to match source for resize. Useful when testing in single-host environments (default is false)
* `openstack["compute"]["config"]["resize_confirm_window"]` - Automatically confirm resizes after N seconds, Set to 0 to disable (default is 0)
* `openstack["compute"]["config"]["disk_cachemodes"]` - Cachemodes to use for different disk types e.g: "file=directsync,block=none". Valid cache values are "default", "none", "writethrough", "writeback", "directsync" and "unsafe".
* `openstack["compute"]["config"]["live_migration_retry_count"]` - Number of 1 second retries needed in live_migration
* `openstack["compute"]["api"]["signing_dir"]` - Keystone PKI needs a location to hold the signed tokens
* `openstack["compute"]["api"]["signing_dir"]` - Keystone PKI needs a location to hold the signed tokens
* `openstack["compute"]["rpc_thread_pool_size"]` - Size of RPC thread pool (default 64)
@ -239,6 +240,10 @@ Libvirt Configuration Attributes
* `openstack["compute"]["libvirt"]["images_rbd_pool"]` - When images_type is rbd: use this RBD pool
* `openstack["compute"]["libvirt"]["images_rbd_ceph_conf"]` - When images_type is rbd: use this ceph.conf
* `openstack["compute"]["libvirt"]["unix_sock_rw_perms"]` - Set the UNIX socket permissions for the R/W socket. This is used for full management of VMs.
* `openstack["compute"]["libvirt"]["live_migration_bandwidth"]` - Maximum bandwidth to be used during migration, in Mbps.
* `openstack["compute"]["libvirt"]["live_migration_flag"]` - Migration flags to be set for live migration.
* `openstack["compute"]["libvirt"]["block_migration_flag"]` - Migration flags to be set for block migration.
* `openstack["compute"]["libvirt"]["live_migration_uri"]` - Migration target URI (any included "%s" is replaced with the migration target hostname).
* `openstack["compute"]["libvirt"]["rbd"]["rbd_user"]` - The cephx user used for accessing the RBD pool used for block storage. (Which pool to use is passed by cinder when nova-compute is instructed to mount a volume.)
* `openstack["compute"]["libvirt"]["rbd"]["rbd_secret_name"]` - The name of the databag item containing the UUID shared between Cinder and nova-compute. `libvirt_rbd` will define a libvirt secret with this UUID, containing the `rbd_user`'s password. The password itself will be retrieved using `get_password` on the service `rbd_block_storage`. Creating the cephx user in a Ceph cluster has to be done outside of the scope of this cookbook.

View File

@ -221,6 +221,12 @@ default['openstack']['compute']['libvirt']['images_rbd_ceph_conf'] = '/etc/ceph/
default['openstack']['compute']['libvirt']['volume_backend'] = nil
default['openstack']['compute']['libvirt']['rbd']['rbd_secret_name'] = 'rbd_secret_uuid'
default['openstack']['compute']['libvirt']['rbd']['rbd_user'] = 'cinder'
# live migration
default['openstack']['compute']['libvirt']['live_migration_bandwidth'] = 0
default['openstack']['compute']['libvirt']['live_migration_flag'] = 'VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER'
default['openstack']['compute']['libvirt']['block_migration_flag'] = 'VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER, VIR_MIGRATE_NON_SHARED_INC'
default['openstack']['compute']['libvirt']['live_migration_uri'] = 'qemu+tcp://%s/system'
default['openstack']['compute']['config']['availability_zone'] = 'nova'
default['openstack']['compute']['config']['default_schedule_zone'] = 'nova'
default['openstack']['compute']['config']['force_raw_images'] = false
@ -274,6 +280,8 @@ default['openstack']['compute']['config']['quota_metadata_items'] = 128
default['openstack']['compute']['config']['quota_ram'] = 51200
# disk cache modes
default['openstack']['compute']['config']['disk_cache_modes'] = nil
# Number of 1 second retries needed in live_migration
default['openstack']['compute']['config']['live_migration_retry_count'] = 30
default['openstack']['compute']['ratelimit']['settings'] = {
'generic-post-limit' => { 'verb' => 'POST', 'uri' => '*', 'regex' => '.*', 'limit' => '10', 'interval' => 'MINUTE' },

View File

@ -4,7 +4,7 @@ maintainer_email 'matt@opscode.com'
license 'Apache 2.0'
description 'The OpenStack Compute service Nova.'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '9.2.8'
version '9.2.9'
recipe 'openstack-compute::api-ec2', 'Installs AWS EC2 compatible API'
recipe 'openstack-compute::api-metadata', 'Installs the nova metadata package'

View File

@ -92,7 +92,8 @@ describe 'openstack-compute::nova-common' do
/^preallocate_images=none$/,
/^use_cow_images=true$/,
/^vif_plugging_is_fatal=true$/,
/^vif_plugging_timeout=300$/].each do |line|
/^vif_plugging_timeout=300$/,
/^live_migration_retry_count=30$/].each do |line|
expect(chef_run).to render_file(file.name).with_content(line)
end
end
@ -340,7 +341,11 @@ describe 'openstack-compute::nova-common' do
/^images_type=default$/,
/^inject_key=true$/,
/^inject_password=false$/,
/^inject_partition=-2$/].each do |line|
/^inject_partition=-2$/,
/^live_migration_bandwidth=0$/,
/^live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER$/,
/^block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER, VIR_MIGRATE_NON_SHARED_INC$/,
%r{live_migration_uri=qemu\+tcp://%s/system$}].each do |line|
expect(chef_run).to render_file(file.name).with_content(line)
end
end

View File

@ -206,6 +206,7 @@ start_guests_on_host_boot=<%= node["openstack"]["compute"]["config"]["start_gues
resume_guests_state_on_host_boot=<%= node["openstack"]["compute"]["config"]["resume_guests_state_on_host_boot"] %>
allow_resize_to_same_host=<%= node["openstack"]["compute"]["config"]["allow_resize_to_same_host"] %>
resize_confirm_window=<%= node["openstack"]["compute"]["config"]["resize_confirm_window"] %>
live_migration_retry_count=<%= node["openstack"]["compute"]["config"]["live_migration_retry_count"] %>
##### QUOTAS #####
# (StrOpt) default driver to use for quota checks (default: nova.quota.DbQuotaDriver)
@ -461,17 +462,17 @@ inject_partition=<%= node["openstack"]["compute"]["libvirt"]["libvirt_inject_par
# Migration target URI (any included "%s" is replaced with the
# migration target hostname) (string value)
#live_migration_uri=qemu+tcp://%s/system
live_migration_uri=<%= node["openstack"]["compute"]["libvirt"]["live_migration_uri"] %>
# Migration flags to be set for live migration (string value)
#live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER
live_migration_flag=<%= node["openstack"]["compute"]["libvirt"]["live_migration_flag"] %>
# Migration flags to be set for block migration (string value)
#block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE, VIR_MIGRATE_PEER2PEER, VIR_MIGRATE_NON_SHARED_INC
block_migration_flag=<%= node["openstack"]["compute"]["libvirt"]["block_migration_flag"] %>
# Maximum bandwidth to be used during migration, in Mbps
# (integer value)
#live_migration_bandwidth=0
live_migration_bandwidth=<%= node["openstack"]["compute"]["libvirt"]["live_migration_bandwidth"] %>
# Snapshot image format (valid options are : raw, qcow2, vmdk,
# vdi). Defaults to same as source image (string value)