The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #4815

Allow Mount to create a mount point and set the under lying permission

Added by Chuck Schweizer about 4 years ago. Updated almost 3 years ago.

Status:RejectedStart date:09/21/2010
Priority:LowDue date:
Assignee:-% Done:

0%

Category:mount
Target version:-
Affected Puppet version: Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

It would be nice to allow the Mount resource type to create the mountpoint directory and the under lying permissions.
Example:

mount { "/opt/open_source":
  atboot => yes,
  device  => "/dev/vg01/lv_opensrc",
  owner  => root,
  group => root,
  mode => 555,
  ensure => mounted,
  fstype => ext3,
  options => "defaults",
  dump    => "0",
  pass    => "2",
}

In this case the owner, group, mode are for the directory under the actual filesystem, it is only used if the filesystem is not mounted.

You are then able to have the following code set the actual permissions on the mounted file system.

file {
  "/opt/open_source" :
    ensure  => "directory",
    owner   => "opensrc",
    group   => "opensrc",
    mode    => "2755",
    require => Mount["/opt/open_source"];
}

Under the current puppet flow you have to have the mount require the file. This leads to permissions not being set correctly on the first run of puppet.

History

#1 Updated by James Turnbull about 4 years ago

  • Category set to mount
  • Status changed from Unreviewed to Accepted
  • Target version set to 2.7.x

#2 Updated by eric sorenson almost 3 years ago

  • Status changed from Accepted to Rejected

Triage-A-Thon: this is trivial to do with a defined type, which gives you more flexibility anyways. Also check out

https://github.com/puppetlabs/puppetlabs-mount-providers

#3 Updated by eric sorenson almost 3 years ago

eric sorenson wrote:

Triage-A-Thon: this is trivial to do with a defined type, which gives you more flexibility anyways. Also check out

https://github.com/puppetlabs/puppetlabs-mount-providers

Added a definition example to help out: https://github.com/ahpook/puppetlabs-mount-providers/commit/31dc733331af32bb586dbd755b978b2bd074d9cf

#4 Updated by Chuck Schweizer almost 3 years ago

This define still does not solve the problem.

The issues is there there is a mount point the File system is mounted on THEN there is the actual mount

eg.

There is the mount point that needs to be created:

  • /opt/my_mount owner=root group= root mode=755

Then you have to mount the LV

  • MOUNT LV on /opt/my_mount

Then you have to set the permissions on the mounted filesystem

  • /opt/my_mount owner=captain group=mountgrp mode=750

#5 Updated by Anonymous almost 3 years ago

  • Target version deleted (2.7.x)

Also available in: Atom PDF