Bug #6409

Mount provider should reject spaces in fstab fields

Added by Paul Berry about 1 year ago. Updated 3 months ago.

Status:Needs More Information Start date:02/22/2011
Priority:Normal Due date:
Assignee:Daniel Pittman % Done:

0%

Category:mount
Target version:-
Affected Puppet version: Branch:
Keywords:mount fstab
Votes: 0

Description

This is accepted by Puppet:

mount { '/Volumes/NIKON D40X': ensure => unmounted, device => "/dev/disk1s1", fstype => msdos }

But (at least on Mac OS X) it causes problems, because it causes an fstab entry to be created that has a space in the mount point:

/dev/disk1s1    /Volumes/NIKON D40X msdos       0   0

According to mac’s fstab man page, fstab fields are separated by whitespace, so the “D40X” gets interpreted as the fstype, which obviously doesn’t work.

Additionally, the next time Puppet needs to change the fstab file, it will change the space to a hard tab, leaving a new entry behind for every single puppet run. For example:

/dev/disk1s1    /Volumes/NIKON  D40X    msdos   0   0
/dev/disk1s1    /Volumes/NIKON  D40X    msdos   0   0
/dev/disk1s1    /Volumes/NIKON D40X msdos       0   0

It seems likely that similar problems exist on most OSes.

It seems like an easy and sufficient solution to this problem is to prohibit spaces in the properties of mount resources.


Related issues

related to Puppet - Bug #4184: mount will produce invalid fstab records if "options" or ... Needs More Information 07/09/2010

History

Updated by Paul Berry about 1 year ago

Nigel, can you confirm that this would be a reasonable solution?

Updated by Nigel Kersten about 1 year ago

  • Status changed from Needs Decision to Accepted

Yes.

Updated by Nigel Kersten 8 months ago

  • Assignee deleted (Nigel Kersten)
  • Keywords set to mount fstab

This is part of the whole mount provider refactor we’ve been working on.

Updated by Ben Hughes 4 months ago

  • Description updated (diff)
  • Status changed from Accepted to Unreviewed

Updated by Daniel Pittman 4 months ago

  • Description updated (diff)
  • Category set to mount
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Nigel Kersten

I would like to drop the in-core mount provider, in favour of the split module version, to fix this. Can we do that?

Updated by Nigel Kersten 4 months ago

Are we feature equivalent with the two now?

I am in favor of us deprecating this provider for Telly in favor of the split-mount provider, so long as we’re shipping the latter in core.

Updated by Nigel Kersten 3 months ago

  • Status changed from Needs Decision to Needs More Information
  • Assignee changed from Nigel Kersten to Daniel Pittman

Also available in: Atom PDF