Chef

Link provider doesn't understand paths requiring expansion

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 0.7.14
  • Fix Version/s: 0.8.2
  • Component/s: Providers
  • Labels:
    None
  • Environment:

    Debian 5.0.1

Description

The Link resource creates a new symlink everytime chef-client is run. This is fine until I need to notify a service to restart when the link is created.

I can add a not_if to only run if the symlink exists however this doesn't account for when the destination for the symlink is different.

I have this work around:

link "/etc/pure-ftpd/auth/65unix" do
to "../conf/UnixAuthentication"
notifies :restart, resources(:service => "pure-ftpd")

  1. If the symlink exists and it points to the "TO" file then don't do anything
    not_if do File.symlink?("#{name}") and File.readlink("#{name}") == to end
    end

Activity

Hide
Adam Jacob added a comment - 23/Nov/09 7:04 PM

Scheduling this fix for 0.8

Show
Adam Jacob added a comment - 23/Nov/09 7:04 PM Scheduling this fix for 0.8
Hide
AJ Christensen added a comment - 04/Jan/10 6:08 AM

Triage

Show
AJ Christensen added a comment - 04/Jan/10 6:08 AM Triage
Hide
AJ Christensen added a comment - 04/Jan/10 6:08 AM

Fixed, pushed fujin/chef-722

Show
AJ Christensen added a comment - 04/Jan/10 6:08 AM Fixed, pushed fujin/chef-722
Hide
Adam Jacob added a comment - 05/Jan/10 12:48 AM

Fixed!

Show
Adam Jacob added a comment - 05/Jan/10 12:48 AM Fixed!

People

Vote (0)
Watch (0)

Dates

  • Created:
    19/Nov/09 10:10 PM
    Updated:
    05/Jan/10 12:48 AM
    Resolved:
    04/Jan/10 6:08 AM