Bug #3001

Can't manage broken links

Added by Markus Roberts 7 months ago. Updated 6 months ago.

Status:Closed Start:01/04/2010
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:fileserving
Target version:0.25.4
Affected version:0.25.2 Branch:http://github.com/MarkusQ/puppet/tree/ticket/0.25.x/3001
Keywords:
Votes: 0

Description

This fell off one of the grab-bag symlink tickets as a low priority side issue since it’s easy to workaround, and may be rendered obsolete if we refacter the symlink handling system, but I’m giving it its own ticket so we don’t loose track of it.

Give a manifest containing:

node default {
  file {"/tmp/link_to_nowhere":
    links => manage,
    source => "puppet://localhost/fs/link_to_nowhere",
  }
}

and a fileserver.conf

[fs]
  path /tmp/test_data/
  allow *

and a link in /tmp/test_data/ that points to the nonexistent file “only_on_client_file”

lrwxr-xr-x  1 markus  staff   7 Dec 31 10:20 link_to_nowhere -> only_on_client_file

where the intent is to produce a link to a target (only_on_client_file) on the client that corresponds to the target of the specified source (link_to_nowhere) but does not exist on the server, we get the following error on the client:

err: //Node[default]/File[/tmp/link_to_nowhere]: Failed to retrieve current state of resource: Could not retrieve
information from source(s) puppet://localhost/fs/link_to_nowhere at manifests/site.pp:17

and on the server:

info: File does not exist or is not accessible: /tmp/test_data/link_to_nowhere
info: Could not find file_metadata for 'fs/link_to_nowhere'

Any attempt to fix this without a general refactoring should be weighed against the risk of reversion on the other symlink tickets fixed in 0.25.2.

History

Updated by Markus Roberts 7 months ago

  • Target version changed from 0.25.3 to 0.25.4

Updated by James Turnbull 7 months ago

  • Target version changed from 0.25.4 to 0.25.5

Updated by Markus Roberts 6 months ago

  • Target version changed from 0.25.5 to 0.25.4

Updated by Markus Roberts 6 months ago

  • Category changed from file to fileserving
  • Status changed from Accepted to Ready for Testing
  • Priority changed from Low to Normal
  • Branch set to http://github.com/MarkusQ/puppet/tree/ticket/0.25.x/3001

Minimal fix to avoid the possible regressions mentioned above. This change just lets a broken symlink continue so that we can get the target (if we are managing links) or fail more informatively when trying to access the contents (if we are following).

Updated by Markus Roberts 6 months ago

  • Status changed from Ready for Testing to Ready for Checkin

Updated by James Turnbull 6 months ago

  • Status changed from Ready for Checkin to Closed

Pushed in commit:“d4319a5418ce84ac83f9137cf1b7255210833eb4” in branch 0.25.x

Updated by James Turnbull 6 months ago

Correct commit commit:“94e269cbc98e774630426aa0a0dc70c1db82502d”.

Also available in: Atom PDF