echocat / puppet-nfs

Puppet module for automagic set up of up nfs servers and clients. Storeconfigs is used for propogating configs to clients. Optional nfs4-support.
Other
12 stars 58 forks source link

nfs::client::mounts generates a dependency cycle #91

Open dploeger opened 7 years ago

dploeger commented 7 years ago

When using nfs::client::mounts (i.e. from hiera), a dependency cycle is generated:

(Mount[shared 192.168.1.10:test by xenial.openvpn on /srv/test] => Nfs::Client::Mount[test] => Class[Nfs::Client] => Mount[shared 192.168.1.10:test by xenial.openvpn on /srv/test])

Workaround: Create a profile, that creates the nfs::client::mount-types independently of the class:

# Generate nfs::client::mount types, because nfs::client::mounts generates
# a dependency cycle

class profile::nfs_client_mounts () {

  $nfs_mounts = hiera_hash('nfs_client_mounts', undef)

  if $nfs_mounts {
    create_resources(nfs::client::mount, $nfs_mounts)
  }

}

and include that into the classes list.

rudgab commented 6 years ago

I solved this for me in commenting out a line in mount.pp: ... require => [ 79 Nfs::Mkdir[$_mount], 80 # Class['::nfs::client'], 81 ], 82 } ..

TwizzyDizzy commented 4 years ago

Hey @echocat,

any reason this has not been incorporated into a release? Or @rudgab's solution? Can we help?

Cheers & Thanks Thomas