Skip to content

Commit

Permalink
SM-Storage: create ceph user/group and use latest package resource
Browse files Browse the repository at this point in the history
Partial Bug: #1609619
Partial Bug: #1611446

With current version of ceph, uses ceph:ceph instead of root:root. This causes
ceph-mon to fail to come up and provisioning gets stuck.

ensure latest for contrail-storage package instead of present. This will
install latest version for package available.

PATCH 2:
add ceph:ceph for /var/lib/ceph and directory/files under /var/lib/ceph. This
is needed for mitaka

Change-Id: Id317d8d00d05deb2196f3f710d0af33ee3aeccc5
  • Loading branch information
Dheeraj Gautam committed Aug 15, 2016
1 parent 07b24fa commit b5843bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions contrail/environment/modules/ceph/manifests/mon.pp
Expand Up @@ -130,12 +130,15 @@
mon_data=\$(ceph-mon ${cluster_option} --id ${id} --show-config-value mon_data)
if [ ! -d \$mon_data ] ; then
mkdir -p \$mon_data
chown -h ceph:ceph \$mon_data
if ceph-mon ${cluster_option} \
--setuser ceph --setgroup ceph \
${public_addr_option} \
--mkfs \
--id ${id} \
--keyring ${keyring_path} ; then
touch \$mon_data/done \$mon_data/${init} \$mon_data/keyring
chown -h ceph:ceph \$mon_data/done \$mon_data/${init} \$mon_data/keyring
else
rm -fr \$mon_data
fi
Expand Down
5 changes: 4 additions & 1 deletion contrail/environment/modules/contrail/manifests/common.pp
Expand Up @@ -40,13 +40,16 @@
$contrail_group_details = {
'nova' => { gid => '499'},
'kvm' => { gid => '498'},
'libvirtd' => { gid => '497'}
'libvirtd' => { gid => '497'},
'ceph' => { gid => '496'}
}
$contrail_users_details = {
'nova' => { ensure => present, uid => '499', gid => '499', home => '/var/lib/nova' , managehome => true},
'libvirt-qemu' => { ensure => present, uid => '498', gid => '498', home => '/var/lib/libvirt', managehome => true},
'libvirt-dnsmasq' => { ensure => present, uid => '497', gid => '497', home => '/var/lib/libvirt/dnsmasq', managehome => true},
'ceph' => { ensure => present, uid => '496', gid => '496', home => '/var/lib/ceph', managehome => true},
}

create_resources(group, $contrail_group_details)
create_resources(user, $contrail_users_details)

Expand Down
Expand Up @@ -29,7 +29,7 @@

contrail::lib::report_status { 'storage_started': state => 'storage_started' }
->
package { 'contrail-storage' : ensure => present, }
package { 'contrail-storage' : ensure => latest, }
->
file { 'contrail-storage-rest-api.conf':
ensure => present,
Expand Down

0 comments on commit b5843bf

Please sign in to comment.