Skip to content

Commit

Permalink
SM-Storage: Added support for one provisioning of storage via puppet
Browse files Browse the repository at this point in the history
Closes-bug: #1420901

1. Exit when compute has not been computed and storage is started
2. Exit when mount failed for livemnfs
3. Added support for storage status of start/completion.

Change-Id: I933d21d818c73814e78f368f05d50ec46086fcd2
  • Loading branch information
Dheeraj Gautam committed Feb 24, 2015
1 parent b7e20f9 commit 1f5b951
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
Expand Up @@ -183,4 +183,13 @@ if [ $RETVAL -eq 0 ]
then
echo "ping done"
mount 192.168.101.3:/livemnfsvol /var/lib/nova/instances/global
RETVAL=$?
if [ ${RETVAL} -ne 0 ]
then
echo "mount to livemnfsvol failed"
exit ${RETVAL}
fi
else
echo "ping to livemnfs failed"
exit 1
fi
Expand Up @@ -16,6 +16,8 @@
$contrail_storage_cluster_network
) {

contrail::lib::report_status { "storage_started": state => "storage_started" }
->
package { 'contrail-storage-packages' : ensure => present, }
->
package { 'contrail-storage' : ensure => present, }
Expand Down Expand Up @@ -125,6 +127,7 @@
pg_num => $contrail_ceph_pg_num,
pgp_num => $contrail_ceph_pg_num,
}
Ceph::Pool['images'] -> Contrail::Lib::Report_status['storage_completed']
}
if 'openstack' in $contrail_host_roles {
#notify { "role openstack":}
Expand Down Expand Up @@ -263,5 +266,6 @@
hasstatus => 'true',
require => Exec['ceph-virsh-secret'],
subscribe => File['/etc/ceph/virsh.conf'],
}
} ->
contrail::lib::report_status { "storage_completed": state => "storage_completed" }
}
21 changes: 17 additions & 4 deletions contrail/environment/modules/contrail/manifests/storage.pp
Expand Up @@ -20,7 +20,7 @@
# Main resource declarations for the class
#notify { "disk-names => $contrail_storage_osd_disks" :;}
if 'compute' in $contrail_host_roles {
if $contrail_interface_rename_done == 2 {
if ($contrail_interface_rename_done == 2) {
contrail::lib::storage_common { 'storage-compute':
contrail_storage_fsid => $contrail_storage_fsid,
contrail_openstack_ip => $contrail_openstack_ip,
Expand All @@ -36,9 +36,22 @@
contrail_storage_hostname => $contrail_storage_hostname,
contrail_live_migration_host => $contrail_live_migration_host,
contrail_lm_storage_scope => $contrail_lm_storage_scope,
contrail_storage_cluster_network => $contrail_storage_cluster_network
}
}
contrail_storage_cluster_network => $contrail_storage_cluster_network }
} else {
file { "contrail-storage-exit-file":
path => "/etc/contrail/contrail_setup_utils/config-storage-exit.sh",
ensure => present,
mode => 0755,
owner => root,
group => root,
content => "exit 1",
}
->
exec { "contrail-storage-exit" :
command => "/etc/contrail/contrail_setup_utils/config-storage-exit.sh",
provider => shell,
}
}
} else {
contrail::lib::storage_common { 'storage-master':
contrail_storage_fsid => $contrail_storage_fsid,
Expand Down

0 comments on commit 1f5b951

Please sign in to comment.