Bug #7646

trailing slashes in file paths are not removed before comparing for unique resource title

Added by Peter Meier about 2 years ago. Updated 6 months ago.

Status:AcceptedStart date:05/24/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:file
Target version:-
Affected Puppet version:2.6.8 Branch:
Keywords:

Description

I thought we have fixed that in #2675 – apparently not. so here we go:

Yippie!

$ cat foo.pp 
file{
  '/tmp/foo':
    ensure => directory,
    mode => 0777;
  '/tmp/foo/':
    ensure => directory,
    mode => 0700;
}
$ puppet foo.pp
notice: /Stage[main]//File[/tmp/foo/]/ensure: created
notice: /Stage[main]//File[/tmp/foo]/mode: mode changed '700' to '777'
$ puppet foo.pp
notice: /Stage[main]//File[/tmp/foo/]/mode: mode changed '777' to '700'
$ puppet foo.pp
notice: /Stage[main]//File[/tmp/foo]/mode: mode changed '700' to '777'
notice: /Stage[main]//File[/tmp/foo/]/mode: mode changed '777' to '700'
$ puppet foo.pp
notice: /Stage[main]//File[/tmp/foo]/mode: mode changed '700' to '777'
notice: /Stage[main]//File[/tmp/foo/]/mode: mode changed '777' to '700'
$ puppet --version
2.6.4

I can confirm that it still happens on 2.6.8


Related issues

Related to Puppet - Bug #2675: File path comparisons sensitive to trailing slashes Closed 09/24/2009

History

#1 Updated by Jacob Helwig about 2 years ago

  • Status changed from Unreviewed to Accepted

Confirmed that this is still happening in 2.6.8, and 2.7.0rc3

#2 Updated by Jacob Helwig about 2 years ago

  • Target version set to 2.6.x

#3 Updated by Cody Herriges about 2 years ago

I have a feeling this is actually linked to a bigger problem.

file { '/tmp/both':
  content => "test",
}
file { 'two':
  path    => '/tmp/both',
  content => 'test2',
}

The above runs with out error.

user { 'bob':
  ensure => present,
}

user { 'isntbob':
  ensure => absent,
  name   => 'bob',
}

This also works without error.

user { 'isbob':
  ensure => present,
  name   => 'bob',
}
user { 'isntbob':
  ensure => absent,
  name   => 'bob',
}

This last one fails properly.

#4 Updated by Nigel Kersten almost 2 years ago

  • Priority changed from Normal to Urgent
  • Target version changed from 2.6.x to 2.7.x

eeek!

Targeting at 2.7.x and raising priority.

#5 Updated by eric sorenson 11 months ago

  • Priority changed from Urgent to Normal

#6 Updated by Andrew Parker 6 months ago

  • Target version deleted (2.7.x)

Also available in: Atom PDF