0

Basic Info :

Puppet Version: 2.8.1
OS Name/Version: RedHat 7

We are trying to run the below puppet resource but we are getting whitespace error, Please find the same.

    mount { "/SERVER/New York_share":    
   atboot  => true,    
   ensure  => mounted,    
   device  => "//MOUNTSERVER/New York_share",    
   fstype  => "cifs",    
   options => "credentials=/tmp/id,uid=oracle,gid=oinstall,iocharset=utf8,file_mode=0644,dir_mode=0775,_netdev,soft",  }

Error:

Failed to apply catalog: Parameter name failed on Mount[/SERVER/New York_share]: name must not contain whitespace: /SERVER/New York_share at /etc/puppetlabs/code/environments/master/site/profile/manifests/ob.pp:132

Anybody could suggest us. Please respond.

Surenthar Pitchai
  • 1,231
  • 15
  • 18
SudhakaranR
  • 43
  • 10

2 Answers2

1

As the error message suggests, Puppet will not accept spaces in the mount point. It looks like you will need to rename your mount point so that it doesn't have spaces in it.

The behaviour goes all the way back to Puppet Bug #6409, where it was found that a mount point with spaces would break fstab, because fstab also doesn't support spaces in the mount point either.

Arguably, Puppet's behaviour is incorrect, and instead of erroring out, Puppet should write a string \040 in fstab like this article says. It's probably not hard to fix this behaviour, if someone feels like raising a pull request.

Alex Harvey
  • 14,494
  • 5
  • 61
  • 97
1

This is an new feature and it was apparently an intentional decision many years ago. We can look into supporting whitespace in paths here,

For More Info

SudhakaranR
  • 43
  • 10