Add option to create system user `nova` on all compute nodes
* In MOS8 system user `nova` has different uid/git on compute nodes. During deployment on each compute node puppet changes permissions for NFS mount point. As result only one node (the one which has been deployed last) can use NFS share. All other nodes faice permission errors. * parseyaml() function deprecated, use hiera instead Change-Id: Icebec5a25db3d99568293555553a45476ac7a5eb
This commit is contained in:
parent
767a222422
commit
e1bf67f211
|
@ -118,3 +118,7 @@ Release Notes
|
|||
**3.2.0**
|
||||
|
||||
* Update plugin to inject task into deployment graph instead of being run as post-deployment task
|
||||
|
||||
**3.2.1**
|
||||
|
||||
* Plugin is able to create system user `nova` on compute nodes with same uid/gid
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
notice('PLUGIN nova-nfs: create_user.pp')
|
||||
|
||||
$nova_nfs_hash = hiera_hash('nova_nfs', {})
|
||||
|
||||
if $nova_nfs_hash['create_nova_user'] {
|
||||
user { 'nova':
|
||||
uid => 499,
|
||||
gid => 499,
|
||||
home => '/var/lib/nova',
|
||||
shell => '/bin/bash',
|
||||
}
|
||||
|
||||
group { 'nova':
|
||||
gid => 499,
|
||||
}
|
||||
}
|
|
@ -1,5 +1,10 @@
|
|||
$fuel_settings = parseyaml(file('/etc/astute.yaml'))
|
||||
notice('PLUGIN nova-nfs: site.pp')
|
||||
|
||||
$nova_nfs_hash = hiera_hash('nova_nfs', {})
|
||||
$nfs_volume_for_nova = pick($nova_nfs_hash['nfs_volume_for_nova'])
|
||||
$nfs_mount_point_nova = pick($nova_nfs_hash['nfs_mount_point_nova'], '/mnt/nova')
|
||||
|
||||
class { 'nova_nfs':
|
||||
nfs_volume_for_nova => $fuel_settings['nova_nfs']['nfs_volume_for_nova'],
|
||||
nfs_mount_point_nova => $fuel_settings['nova_nfs']['nfs_mount_point_nova'],
|
||||
nfs_volume_for_nova => $nfs_volume_for_nova,
|
||||
nfs_mount_point_nova => $nfs_mount_point_nova,
|
||||
}
|
||||
|
|
|
@ -7,3 +7,13 @@
|
|||
puppet_manifest: puppet/site.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 360
|
||||
|
||||
- id: nova-nfs-create-nova-user
|
||||
type: puppet
|
||||
groups: [compute]
|
||||
required_for: [top-role-compute]
|
||||
requires: [deploy_start]
|
||||
parameters:
|
||||
puppet_manifest: puppet/create_user.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 360
|
||||
|
|
|
@ -17,3 +17,9 @@ attributes:
|
|||
regex:
|
||||
source: '^/(?:[\w-]+\/?)+$'
|
||||
error: "Valid characters are: '/', '0-9', 'a-z', 'A-Z', '_', '-'"
|
||||
create_nova_user:
|
||||
value: true
|
||||
label: 'Create system user `nova`'
|
||||
description: 'Create system user `nova` to ensure same uid/git for it on all compute nodes'
|
||||
weight: 30
|
||||
type: "checkbox"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name: nova_nfs
|
||||
title: Nova NFS plugin
|
||||
# Plugin version
|
||||
version: 3.2.0
|
||||
version: 3.2.1
|
||||
# Description
|
||||
description: Enables Nova to use NFS volume as storage backend for ephemeral volumes
|
||||
# Required fuel version
|
||||
|
|
Loading…
Reference in New Issue