Puppet: System Administration Automated

Support

Ticket #769 (new defect)

Opened 1 year ago

Last modified 7 months ago

Mount Type Mounts Device Multiple Times

Reported by: pheezy Assigned to: community
Priority: normal Milestone: unplanned
Component: mount Version: 0.23.1
Severity: normal Keywords: mount type twice double two
Cc: Triage Stage: Accepted
Attached Patches: None Complexity: Medium

Description

Hi, I'm having difficulty with the mount type as it appears to be mounting a device twice. I am running Puppet 0.23.1 on RHEL4 with Kernel 2.6.9-42:

mount.pp

class images_mount {
        file    {"/var/www/folder":
                ensure => directory,
        }

mount   { "/var/www/folder":
                atboot => true,
                ensure => mounted,
                fstype => cifs,
                device => "//server/share",
                options => "ro,credentials=/etc/flimflam",
                require => file["/var/www/folder"],
        }
}

After running puppetd -v here is the relevant output:

notice: //default/imagetesting/images_mount/Mount[/var/www/trips_images]/ensure: ensure changed 'present' to 'mounted'
notice: //default/imagetesting/images_mount/Mount[/var/www/trips_images]: Refreshing self
info: Mount[/var/www/trips_images](provider=parsed): Remounting

mount command:

[root@testserver]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
//server/share on /var/www/share type cifs (rw,mand)
//server/share on /var/www/share type cifs (rw,mand)

If I change an option, say to mount it as ro, it mounts the device a third time:

[root@testserver www]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
//server/share on /var/www/share type cifs (rw,mand)
//server/share on /var/www/share type cifs (rw,mand)
//server/share on /var/www/share type cifs (ro,mand)

Obviously now I can umount it but must umount it 3 times. I hope my information helps you isolate the problem, thank you.

Change History

08/15/07 07:28:29 changed by luke

  • status changed from new to closed.
  • resolution set to duplicate.

This is a duplicate of #761.

11/06/07 09:44:55 changed by DavidS

  • status changed from closed to reopened.
  • resolution deleted.

Upon analyzing the cause of #761, I notice that this problem is caused by a mismatch between the name of the resource "/var/www/folder" and the actually mount point "/var/www/share". This happens (at least under linux) if /var/www/folder is a symlink.

11/19/07 20:30:28 changed by tim

  • owner changed from luke to community.
  • status changed from reopened to new.
  • complexity changed from Unknown to Easy.
  • stage changed from Unreviewed to Accepted.
  • milestone set to unplanned.

11/19/07 20:31:10 changed by tim

Note: If this is happening for non-symlinked nodes, this needs to be fixed in misspiggy.

11/19/07 20:31:41 changed by tim

  • complexity changed from Easy to Medium.

04/24/08 07:00:16 changed by luke

  • component changed from types to mount.