edf-hpc / puppet-hpc

Generic Puppet Configuration for HPC Clusters
http://edf-hpc.github.io/puppet-hpc/
GNU General Public License v2.0
13 stars 4 forks source link

Symlink to mountpoint error #125

Closed fmdm closed 6 years ago

fmdm commented 7 years ago

If a "mount" is defined with the profile nfs::to_mount :

profiles::nfs::to_mount: 'test': server: 'test.some.domain' exportdir: '/' mountpoint: '/mnt/test' options: ''

AND a symlink is defined directly to this mountpoint:

profiles::filesystem::symlinks: '/data/test': target: '/mnt/test'

A strange dependency cycle error appears:

Error: Could not apply complete catalog: Found 1 dependency cycle: (Anchor[filesystem::symlinks::end] => Class[Filesystem::Symlinks] => Stage[first] => Stage[main] => Class[Profiles::Nfs::Mounts] => Nfs::Client::Mount[test] => File[/mnt/test] => File[/data/test] => Class[Filesystem::Symlinks::Config] => Stage[first]) Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz

It's probably caused by an automatic dependency between the mount resource and the mountpoint, as the mountpoint is a "file" resource in the nfs::client::mount class.

hmlth commented 7 years ago

Since it is a core puppet type, it's difficult to remove, correct solution is probably to mode filesystem::symlinks out of the first stage into the main stage. This require some testing.

hmlth commented 6 years ago

moved to main stage.