Issue #6845 has been updated by John Warburton.

OK - I see now. Actually, I commented out all fields expect /tmp just to focus 
on it. So, my /etc/vfstab has 8 entries in it:

    #device         device          mount           FS      fsck    mount   
mount
    #to mount       to fsck         point           type    pass    at boot 
options
    #
    fd      -       /dev/fd fd      -       no      -
    /proc   -       /proc   proc    -       no      -
    /dev/zvol/dsk/rpool/swap        -       -       swap    -       no      -
    /devices        -       /devices        devfs   -       no      -
    sharefs -       /etc/dfs/sharetab       sharefs -       no      -
    ctfs    -       /system/contract        ctfs    -       no      -
    objfs   -       /system/object  objfs   -       no      -
    swap    -       /tmp    tmpfs   -       yes     size=512m

And "puppet resource mount" returns 8 resources, which is fine

    # puppet resource mount
    mount { '-':
    ensure      => 'unmounted',
    atboot      => 'no',
    blockdevice => '-',
    device      => '/dev/zvol/dsk/rpool/swap',
    fstype      => 'swap',
    options     => '-',
    pass        => '-',
    target      => '/etc/vfstab',
    }
    mount { '/dev/fd':
    ensure      => 'unmounted',
    atboot      => 'no',
    blockdevice => '-',
    device      => 'fd',
    fstype      => 'fd',
    options     => '-',
    pass        => '-',
    target      => '/etc/vfstab',
    }
    mount { '/devices':
    ensure      => 'unmounted',
    atboot      => 'no',
    blockdevice => '-',
    device      => '/devices',
    fstype      => 'devfs',
    options     => '-',
    pass        => '-',
    target      => '/etc/vfstab',
    }
    mount { '/etc/dfs/sharetab':
    ensure      => 'unmounted',
    atboot      => 'no',
    blockdevice => '-',
    device      => 'sharefs',
    fstype      => 'sharefs',
    options     => '-',
    pass        => '-',
    target      => '/etc/vfstab',
    }
    mount { '/proc':
    ensure      => 'unmounted',
    atboot      => 'no',
    blockdevice => '-',
    device      => '/proc',
    fstype      => 'proc',
    options     => '-',
    pass        => '-',
    target      => '/etc/vfstab',
    }
    mount { '/system/contract':
    ensure      => 'unmounted',
    atboot      => 'no',
    blockdevice => '-',
    device      => 'ctfs',
    fstype      => 'ctfs',
    options     => '-',
    pass        => '-',
    target      => '/etc/vfstab',
    }
    mount { '/system/object':
    ensure      => 'unmounted',
    atboot      => 'no',
    blockdevice => '-',
    device      => 'objfs',
    fstype      => 'objfs',
    options     => '-',
    pass        => '-',
    target      => '/etc/vfstab',
    }
    mount { '/tmp':
    ensure      => 'unmounted',
    atboot      => 'yes',
    blockdevice => '-',
    device      => 'swap',
    fstype      => 'tmpfs',
    options     => 'size=512m',
    pass        => '-',
    target      => '/etc/vfstab',
    }
    
But I have some issues:

1) It seems to think all these mount points should be unmounted

2) Remount (via refresh) isn't applicable to mount points like /dev/fd, /tmp 
(issue #4904)

3) Swap files are just given a name of '-', but we can have multiple swap file 
entries in /etc/vfstab, so puppet barfs:

    /dev/zvol/dsk/rpool/swap        -       -       swap    -       no      -
    /dev/zvol/dsk/rpool/swap1       -       -       swap    -       no      -
    
    # puppet resource mount
    warning: Mount - found in both parsed and parsed; skipping the parsed 
version
    mount { '-':
    ensure      => 'unmounted',
    atboot      => 'no',
    blockdevice => '-',
    device      => '/dev/zvol/dsk/rpool/swap',
    fstype      => 'swap',
    options     => '-',
    pass        => '-',
    target      => '/etc/vfstab',
    }
    
    etc etc     

----------------------------------------
Bug #6845: mount tmpfs on Solaris fail
https://projects.puppetlabs.com/issues/6845

Author: John Warburton
Status: Ready For Testing
Priority: High
Assignee: 
Category: mount
Target version: 
Affected Puppet version: 2.6.7
Keywords: Solaris mount /tmp tempfs tmpfs
Branch: https://github.com/stschulte/puppet/tree/ticket/2.6.x/6845


The newly released 2.6.7 mount provider fails on Solaris 10 U9, and does not 
modify the /etc/vfstab, but just adds another (wrong) line

mount.pp:
    mount{ "/tmp":
        device  => "swap",
        blockdevice  => "-",
        fstype  => "tmpfs",
        pass    => "-",
        atboot  => "yes",
        options => "size=512m",
        # http://projects.puppetlabs.com/issues/4904
        ensure => $puppetversion ? {
            /0\.25/  => mounted,
            default => present,
        },
    }

/etc/vfstab before:
    swap    -       /tmp    tmpfs   -       yes     -

Apply the change
    # puppet apply --verbose --color true /tmp/mount.pp
    info: Applying configuration version '1301028968'
    notice: /Stage[main]//Mount[/tmp]/ensure: ensure changed 'ghost' to 
'defined'
    info: FileBucket adding {md5}de855ac78119686e92d519e9068c3e70
    info: /Stage[main]//Mount[/tmp]: Scheduling refresh of Mount[/tmp]
    notice: /Stage[main]//Mount[/tmp]: Triggered 'refresh' from 1 events
    info: /Stage[main]//Mount[/tmp]: Scheduling refresh of Mount[/tmp]
    notice: Finished catalog run in 0.22 seconds

/etc/vfstab after:
    swap    -       /tmp    tmpfs   -       yes     -
    swap    /tmp    tmpfs   size=512m       0       -
    
Expected result:
    swap    -       /tmp    tmpfs   -       yes     size=512m




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to