mount type attempting remount when ensure => present

1,088 views
Skip to first unread message

John Warburton

unread,
Sep 30, 2010, 2:57:32 AM9/30/10
to puppet-users
Hi All

I am not sure if I am doing this right, or just meeting some Solaris specific thing that hasn't been catered for.

Solaris 10, with puppet 0.25.5, and trying to manage /tmp. Note that /tmp can't be remounted on a live system (http://wikis.sun.com/display/BigAdmin/Talking+about+RAM+disks+in+the+Solaris+OS)

    mount{ "/tmp":
        atboot  => "yes",
        device  => "swap",
        ensure  => present,
        pass    => "-",
        fstype  => "tmpfs",
        options => "size=4096m",
    }

Changes /etc/vfstab as expected, but yields this error:

err: //solaris/Mount[/tmp]/ensure: change from mounted to present failed: Execution of '/usr/sbin/umount /tmp' returned 1: umount: /tmp busy

notice: //solaris/Mount[/tmp]: Refreshing self
info: Mount[/tmp](provider=parsed): Remounting
err: //solaris/Mount[/tmp]: Failed to call refresh on Mount[/tmp]: Execution of '/usr/sbin/umount /tmp' returned 1: umount: /tmp busy

Seems that ensure => present (Set to present to add to fstab but not change mount/unmount status) is being overridden by the fact the provider is deemed refreshable.

I've had a look lib/puppet/type/mount.rb & lib/puppet/provider/mount/parsed.rb and it isn't obvious how I can change the provider to something that isn't refreshable.

I suspect this may end up as a feature request to turn off refreshable for Solaris tmpfs fstypes

Thanks

John

Felix Frank

unread,
Sep 30, 2010, 4:31:20 AM9/30/10
to puppet...@googlegroups.com

I noticed similar behaviour in Linux, with catastrophic results.
Ensure => present apparently always means "in fstab, but not mounted",
which not only doesn't make much sense to me, but led me to never use
any ensure setting besides "mounted".

Regards,
Felix

Nigel Kersten

unread,
Sep 30, 2010, 12:37:12 PM9/30/10
to puppet...@googlegroups.com

Anyone bug reported this yet?

Rob McBroom

unread,
Sep 30, 2010, 2:13:08 PM9/30/10
to puppet...@googlegroups.com
On Sep 30, 2010, at 12:37 PM, Nigel Kersten wrote:

>> I noticed similar behaviour in Linux, with catastrophic results.
>> Ensure => present apparently always means "in fstab, but not mounted",
>> which not only doesn't make much sense to me, but led me to never use
>> any ensure setting besides "mounted".
>
> Anyone bug reported this yet?

According to the documentation, that's how `ensure => present` is supposed to work, though I can't imagine the use case for “put it in fstab but make sure it's never mounted”. I would love it if that behavior were changed to just “put it in fstab”. Then I could actually use it. :)

--
Rob McBroom
<http://www.skurfer.com/>

Nigel Kersten

unread,
Sep 30, 2010, 3:01:48 PM9/30/10
to puppet...@googlegroups.com

It's perfectly reasonable to bug report something you think is broken,
even if it is consistent with provided documentation :)

John Warburton

unread,
Sep 30, 2010, 7:01:47 PM9/30/10
to puppet...@googlegroups.com
I'll file a bug


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




--
John Warburton
Ph: 0417 299 600
Email: jwarb...@gmail.com

John Warburton

unread,
Sep 30, 2010, 8:41:55 PM9/30/10
to puppet...@googlegroups.com
http://projects.puppetlabs.com/issues/4904

Can Felix & Rob update the ticket with your use cases and requests?

Thanks

John


On 1 October 2010 09:01, John Warburton <jwarb...@gmail.com> wrote:
I'll file a bug


On 1 October 2010 05:01, Nigel Kersten <nig...@google.com> wrote:
On Thu, Sep 30, 2010 at 11:13 AM, Rob McBroom <mailin...@skurfer.com> wrote:
> On Sep 30, 2010, at 12:37 PM, Nigel Kersten wrote:
>
>>> I noticed similar behaviour in Linux, with catastrophic results.
>>> Ensure => present apparently always means "in fstab, but not mounted",
>>> which not only doesn't make much sense to me, but led me to never use
>>> any ensure setting besides "mounted".
>>
>> Anyone bug reported this yet?
>
> According to the documentation, that's how `ensure => present` is supposed to work, though I can't imagine the use case for “put it in fstab but make sure it's never mounted”. I would love it if that behavior were changed to just “put it in fstab”. Then I could actually use it. :)

It's perfectly reasonable to bug report something you think is broken,
even if it is consistent with provided documentation :)

--



Felix Frank

unread,
Oct 1, 2010, 3:49:59 AM10/1/10
to puppet...@googlegroups.com
On 10/01/2010 02:41 AM, John Warburton wrote:
> http://projects.puppetlabs.com/issues/4904

Thanks.

> Can Felix & Rob update the ticket with your use cases and requests?

Done. I hope I could generalize the problem somewhat (yes, in this case
that's a good thing ;-)

Cheers,
Felix

Bruce Richardson

unread,
Oct 1, 2010, 4:30:46 AM10/1/10
to puppet...@googlegroups.com
On Thu, Sep 30, 2010 at 02:13:08PM -0400, Rob McBroom wrote:
>
> According to the documentation, that's how `ensure => present` is
> supposed to work, though I can't imagine the use case for “put it in
> fstab but make sure it's never mounted”.

According to the online documentation (which is autogenerated), "Set to


present to add to fstab but not change mount/unmount status "

Which is the opposite of what you say it is doing. But I believe you,
because I know I've seen this behaviour reported before, although it may
have been on this list and not in a bug report.

--
Bruce

I see a mouse. Where? There, on the stair. And its clumsy wooden
footwear makes it easy to trap and kill. -- Harry Hill

signature.asc

Rob McBroom

unread,
Oct 1, 2010, 8:55:34 AM10/1/10
to puppet...@googlegroups.com
I've added a use case to the bug report.

On Oct 1, 2010, at 4:30 AM, Bruce Richardson wrote:

> According to the online documentation (which is autogenerated), "Set to
> present to add to fstab but not change mount/unmount status "

Where are you seeing that? For as long as I've used Puppet, the type reference has said: “Set this attribute to present to make sure the filesystem is in the filesystem table but not mounted (if the filesystem is currently mounted, it will be unmounted).”

See <http://docs.puppetlabs.com/guides/types/mount.html#id75>

Bruce Richardson

unread,
Oct 1, 2010, 1:13:49 PM10/1/10
to puppet...@googlegroups.com
On Fri, Oct 01, 2010 at 08:55:34AM -0400, Rob McBroom wrote:
> I've added a use case to the bug report.
>
> On Oct 1, 2010, at 4:30 AM, Bruce Richardson wrote:
>
> > According to the online documentation (which is autogenerated), "Set to
> > present to add to fstab but not change mount/unmount status "
>
> Where are you seeing that? For as long as I've used Puppet, the type reference has said: “Set this attribute to present to make sure the filesystem is in the filesystem table but not mounted (if the filesystem is currently mounted, it will be unmounted).”

http://docs.puppetlabs.com/references/latest/type.html#mount

>
> See <http://docs.puppetlabs.com/guides/types/mount.html#id75>

Some inconsistency on the site, then.


--
Bruce

Remember you're a Womble.

signature.asc
Reply all
Reply to author
Forward
0 new messages