Fix ignored notifications/orders
This fixes the resource notifications and orders defined in the mount class was unintentionally ignored unless selinux is enabled. Also, resource collectors are replaced by explicit resources, because we can expect precise list of resources defined in the class. Finally, restorecon should be executed when the directory is mounted, regardless of the result of chmod. Change-Id: If919c7aceb5394a99657c3be7dc4f376d8a1b453
This commit is contained in:
@@ -84,6 +84,14 @@ define swift::storage::mount(
|
||||
before => Anchor['swift::config::end'],
|
||||
}
|
||||
|
||||
File["${mnt_base_dir}/${name}"]
|
||||
-> Exec["fix_mountpoint_permissions_${name}"]
|
||||
-> Mount["${mnt_base_dir}/${name}"]
|
||||
-> Exec["mount_${name}"]
|
||||
|
||||
Mount["${mnt_base_dir}/${name}"] ~> Exec["fix_mount_permissions_${name}"]
|
||||
Exec["mount_${name}"] ~> Exec["fix_mount_permissions_${name}"]
|
||||
|
||||
# mounting in linux and puppet is broken and non-atomic
|
||||
# we have to mount, check mount with executing command,
|
||||
# fix ownership and on selinux systems fix context.
|
||||
@@ -99,15 +107,7 @@ define swift::storage::mount(
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
File<| title == "${mnt_base_dir}/${name}" |>
|
||||
~> Exec<| title == "fix_mountpoint_permissions_${name}" |>
|
||||
-> Exec<| title == "mount_${name}" |>
|
||||
|
||||
File<| title == "${mnt_base_dir}/${name}" |>
|
||||
~> Mount<| title == "${mnt_base_dir}/${name}" |>
|
||||
~> Exec<| title == "mount_${name}" |>
|
||||
~> Exec<| title == "fix_mount_permissions_${name}" |>
|
||||
~> Exec<| title == "restorecon_mount_${name}" |>
|
||||
|
||||
Mount["${mnt_base_dir}/${name}"] ~> Exec["restorecon_mount_${name}"]
|
||||
Exec["mount_${name}"] ~> Exec["restorecon_mount_${name}"]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user