diff --git a/environments/storage-environment.yaml b/environments/storage-environment.yaml index 4aa457f2bb..d15b7d2652 100644 --- a/environments/storage-environment.yaml +++ b/environments/storage-environment.yaml @@ -59,7 +59,7 @@ parameter_defaults: ## e.g. "'[fdd0::1]:/export/nova'") # NovaNfsShare: '' ## Mount options for the NFS instance file storage mount point - # NovaNfsOptions: 'context=system_u:object_r:nova_var_lib_t:s0' + # NovaNfsOptions: 'context=system_u:object_r:nfs_t:s0' #### CEPH SETTINGS #### diff --git a/environments/storage/nova-nfs.yaml b/environments/storage/nova-nfs.yaml index b31ddd3f7f..b3a354c60e 100644 --- a/environments/storage/nova-nfs.yaml +++ b/environments/storage/nova-nfs.yaml @@ -11,7 +11,7 @@ parameter_defaults: # NFS mount options for nova storage (when NovaNfsEnabled is true) # Type: string - NovaNfsOptions: context=system_u:object_r:nova_var_lib_t:s0 + NovaNfsOptions: context=system_u:object_r:nfs_t:s0 # NFS share to mount for nova storage (when NovaNfsEnabled is true) # Type: string diff --git a/puppet/services/nova-compute.yaml b/puppet/services/nova-compute.yaml index bedef486b8..90ce86c89f 100644 --- a/puppet/services/nova-compute.yaml +++ b/puppet/services/nova-compute.yaml @@ -65,7 +65,7 @@ parameters: description: NFS share to mount for nova storage (when NovaNfsEnabled is true) type: string NovaNfsOptions: - default: 'context=system_u:object_r:nova_var_lib_t:s0' + default: 'context=system_u:object_r:nfs_t:s0' description: NFS mount options for nova storage (when NovaNfsEnabled is true) type: string CinderEnableRbdBackend: diff --git a/releasenotes/notes/nova_nfs_default_secontext-5ad33675aaf0b521.yaml b/releasenotes/notes/nova_nfs_default_secontext-5ad33675aaf0b521.yaml new file mode 100644 index 0000000000..f0b43c9215 --- /dev/null +++ b/releasenotes/notes/nova_nfs_default_secontext-5ad33675aaf0b521.yaml @@ -0,0 +1,13 @@ +--- +fixes: + - | + Instance create fails due to wrong default secontext with NFS + + With NovaNfsEnabled instance create fails due to wrong default + secontext. The default in THT is set to nova_var_lib_t in + Ie4fe217bd119b638f42c682d21572547f02f17b2 while + system_u:object_r:nfs_t:s0 should have access. The virt_use_nfs + boolean, which is turned on by openstack-selinux, should cover + this use case. + + This changes the default to context=system_u:object_r:nfs_t:s0