FAQ
I'm seeing a strange issue with symlinks in Puppet 2.7.19.
File {
ensure => directory,
owner => apache,
group => apache,
}

file { "/mnt/${site_name}":
mode => 0660,
}

mount { "/mnt/${site_name}":
ensure => mounted,
atboot => true,
device => "${drupal_nfs_host}:${drupal_nfs_vol_root}",
fstype => "nfs",
options => "rw,vers=3,timeo=60,nosuid",
require => File["/mnt/${site_name}"],
}

file { "/var/www/${site_name}/${drupal_shared_reldir}":
ensure => link,
target => "/mnt/${site_name}",
require => [Mount["/mnt/${site_name}"],
File["/var/www/${site_name}/${drupal_shared_reldir}"]],
}

I run the agent on my node. The mount directory and mount point are setup
correctly. However, the symlink is completely ignored. (I've replaced
actual paths with the vars used above for privacy.)

notice: /File[/mnt/${site_name}]/ensure: created
notice:
/Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]/ensure:
defined 'ensure' as 'mounted'
info: FileBucket adding {md5}fa596fe1bd0cf2b5a3205e605b02a259
info:
/Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]:
Scheduling refresh of Mount[/mnt/${site_name}]
info: Mount[/mnt/${site_name}](provider=parsed): Remounting
notice:
/Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]:
Triggered 'refresh' from 1 events
info:
/Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]:
Scheduling refresh of Mount[/mnt/${site_name}]
notice: Finished catalog run in 13.16 seconds

As you can see, there were no messages related to
File["/var/www/${site_name}/${drupal_shared_reldir}"].

The crazy part is that a test link does work.
file { "/tmp/test-link":
}

file { "/tmp/link":
ensure => link,
target => "/tmp/test-link",
require => File["/tmp/test-link"],
}

Any thoughts on what's happening? It seems odd that there are no error
messages.

Thanks,

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/GN2ALLfkR7UJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Jbrown at Nov 7, 2012 at 11:22 pm
    Please disregard the original post. I found the issue.

    I had the following incorrect require line in the link resource:
    require => [Mount["/mnt/${site_name}"],
    File["/var/www/${site_name}/${drupal_shared_reldir}"]],
    It should be
    require => Mount["/mnt/${site_name}"],

    Cheers,
    Justin
    On Wednesday, November 7, 2012 4:51:18 PM UTC-6, jbrown wrote:

    I'm seeing a strange issue with symlinks in Puppet 2.7.19.
    File {
    ensure => directory,
    owner => apache,
    group => apache,
    }

    file { "/mnt/${site_name}":
    mode => 0660,
    }

    mount { "/mnt/${site_name}":
    ensure => mounted,
    atboot => true,
    device => "${drupal_nfs_host}:${drupal_nfs_vol_root}",
    fstype => "nfs",
    options => "rw,vers=3,timeo=60,nosuid",
    require => File["/mnt/${site_name}"],
    }

    file { "/var/www/${site_name}/${drupal_shared_reldir}":
    ensure => link,
    target => "/mnt/${site_name}",
    require => [Mount["/mnt/${site_name}"],
    File["/var/www/${site_name}/${drupal_shared_reldir}"]],
    }

    I run the agent on my node. The mount directory and mount point are setup
    correctly. However, the symlink is completely ignored. (I've replaced
    actual paths with the vars used above for privacy.)

    notice: /File[/mnt/${site_name}]/ensure: created
    notice:
    /Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]/ensure:
    defined 'ensure' as 'mounted'
    info: FileBucket adding {md5}fa596fe1bd0cf2b5a3205e605b02a259
    info:
    /Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]:
    Scheduling refresh of Mount[/mnt/${site_name}]
    info: Mount[/mnt/${site_name}](provider=parsed): Remounting
    notice:
    /Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]:
    Triggered 'refresh' from 1 events
    info:
    /Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]:
    Scheduling refresh of Mount[/mnt/${site_name}]
    notice: Finished catalog run in 13.16 seconds

    As you can see, there were no messages related to
    File["/var/www/${site_name}/${drupal_shared_reldir}"].

    The crazy part is that a test link does work.
    file { "/tmp/test-link":
    }

    file { "/tmp/link":
    ensure => link,
    target => "/tmp/test-link",
    require => File["/tmp/test-link"],
    }

    Any thoughts on what's happening? It seems odd that there are no error
    messages.

    Thanks,
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/qnR7CaJWracJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedNov 7, '12 at 10:51p
activeNov 7, '12 at 11:22p
posts2
users1
websitepuppetlabs.com

1 user in discussion

Jbrown: 2 posts

People

Translate

site design / logo © 2022 Grokbase