<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puppet.git/lib/puppet/provider/mount, branch master</title>
<subtitle>Puppet repo</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/'/>
<entry>
<title>Merge branch 'ticket/2.7.x/7300' into 2.7.next</title>
<updated>2011-05-16T21:57:52+00:00</updated>
<author>
<name>Nick Lewis</name>
<email>nick@puppetlabs.com</email>
</author>
<published>2011-05-16T21:57:52+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=83fa8cf03133174d7182adee6f34efc6ba15d6b3'/>
<id>83fa8cf03133174d7182adee6f34efc6ba15d6b3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>(#7300) Fix instances method of mount provider</title>
<updated>2011-05-16T21:53:05+00:00</updated>
<author>
<name>Stefan Schulte</name>
<email>stefan.schulte@taunusstein.net</email>
</author>
<published>2011-05-01T13:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=0b8ebaccfef829856720c29c3bc00c042a515c71'/>
<id>0b8ebaccfef829856720c29c3bc00c042a515c71</id>
<content type='text'>
The instance method now behaves like the prefetch method: After parsing
/etc/(v)fstab run mount to update the ensure state from either
:unmounted to :mounted and from :absent to :ghost

Reviewed-By: Nick Lewis
Reviewed-By: Josh Cooper
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The instance method now behaves like the prefetch method: After parsing
/etc/(v)fstab run mount to update the ensure state from either
:unmounted to :mounted and from :absent to :ghost

Reviewed-By: Nick Lewis
Reviewed-By: Josh Cooper
</pre>
</div>
</content>
</entry>
<entry>
<title>(#6845) Mount writes incorrect vfstab entries</title>
<updated>2011-04-28T05:15:19+00:00</updated>
<author>
<name>Stefan Schulte</name>
<email>stefan.schulte@taunusstein.net</email>
</author>
<published>2011-03-25T07:41:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=729336e3d74f3b56237c24cc777f2679c158e496'/>
<id>729336e3d74f3b56237c24cc777f2679c158e496</id>
<content type='text'>
Facter[:operatingsystem] will not retrieve the operatingsystem as a
string so puppet will always write fstab entries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Facter[:operatingsystem] will not retrieve the operatingsystem as a
string so puppet will always write fstab entries.
</pre>
</div>
</content>
</entry>
<entry>
<title>(#6632) Adding a new mount no longer causes error with umount</title>
<updated>2011-03-08T21:04:39+00:00</updated>
<author>
<name>Paul Berry</name>
<email>paul@puppetlabs.com</email>
</author>
<published>2011-03-08T19:35:58+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=5ef10315705b8e4d69d13b8df86b9585f2bcc29a'/>
<id>5ef10315705b8e4d69d13b8df86b9585f2bcc29a</id>
<content type='text'>
There were two problems:

* In lib/puppet/type/mount.rb, we were calling provider.mounted? to
  determine whether we needed to execute "mount" after updating the
  in-memory fstab record.  This wasn't working properly because
  provider.mounted? makes its decision based on the data stored in the
  in-memory fstab record.  Since the fstab record had just been
  updated, provider.mounted? was incorrectly returning true even
  though the device wasn't actually mounted.  Fixed this by checking
  provider.mounted? before updating the in-memory fstab record.

* Calling mount from this point in lib/puppet/type/mount.rb is
  actually too early, because even though the in-memory fstab record
  has been created, its contents have not been written to `/etc/fstab`
  yet.  Fixed this by storing a :needs_mount entry in the
  property_hash and checking it at the end of the flush() method.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were two problems:

* In lib/puppet/type/mount.rb, we were calling provider.mounted? to
  determine whether we needed to execute "mount" after updating the
  in-memory fstab record.  This wasn't working properly because
  provider.mounted? makes its decision based on the data stored in the
  in-memory fstab record.  Since the fstab record had just been
  updated, provider.mounted? was incorrectly returning true even
  though the device wasn't actually mounted.  Fixed this by checking
  provider.mounted? before updating the in-memory fstab record.

* Calling mount from this point in lib/puppet/type/mount.rb is
  actually too early, because even though the in-memory fstab record
  has been created, its contents have not been written to `/etc/fstab`
  yet.  Fixed this by storing a :needs_mount entry in the
  property_hash and checking it at the end of the flush() method.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'ticket/2.6.x/4914' into maint/2.6.next/revert-6309</title>
<updated>2011-02-28T21:13:52+00:00</updated>
<author>
<name>Paul Berry</name>
<email>paul@puppetlabs.com</email>
</author>
<published>2011-02-28T21:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=ecb953646b2defbab3bbc53a58ce7ba98d560b50'/>
<id>ecb953646b2defbab3bbc53a58ce7ba98d560b50</id>
<content type='text'>
* ticket/2.6.x/4914:
  (#4914) Improved stubbing in mount/parsed_spec tests.
  (#4914) Improved parsed_spec for mount
  (#4914) Remove mount specs
  (#4914) Specs for mounted? match new behaviour
  (#4914) Add specs for modified mount provider
  (#4914) Add specs for modified mount type
  (#4914) Update property blocks
  (#4914) Query property_hash for mountstate
  (#4914) Prefetch mountstate
  (#4914) Join lines for better readability

Conflicts:
	lib/puppet/provider/mount.rb
	lib/puppet/provider/mount/parsed.rb
	spec/unit/provider/mount/parsed_spec.rb
	spec/unit/provider/mount_spec.rb
	spec/unit/type/mount_spec.rb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ticket/2.6.x/4914:
  (#4914) Improved stubbing in mount/parsed_spec tests.
  (#4914) Improved parsed_spec for mount
  (#4914) Remove mount specs
  (#4914) Specs for mounted? match new behaviour
  (#4914) Add specs for modified mount provider
  (#4914) Add specs for modified mount type
  (#4914) Update property blocks
  (#4914) Query property_hash for mountstate
  (#4914) Prefetch mountstate
  (#4914) Join lines for better readability

Conflicts:
	lib/puppet/provider/mount.rb
	lib/puppet/provider/mount/parsed.rb
	spec/unit/provider/mount/parsed_spec.rb
	spec/unit/provider/mount_spec.rb
	spec/unit/type/mount_spec.rb
</pre>
</div>
</content>
</entry>
<entry>
<title>(#4914) Improved parsed_spec for mount</title>
<updated>2011-02-20T10:18:19+00:00</updated>
<author>
<name>Stefan Schulte</name>
<email>stefan.schulte@taunusstein.net</email>
</author>
<published>2011-02-20T10:18:19+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=c57c508e938083115bbc00037901f652505288b0'/>
<id>c57c508e938083115bbc00037901f652505288b0</id>
<content type='text'>
Add specs for the new prefetching and the correct parsing of vfstab on
Solaris and fstab on other systems
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add specs for the new prefetching and the correct parsing of vfstab on
Solaris and fstab on other systems
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up whitespace, and commented out code in parsed mount provider</title>
<updated>2011-02-18T23:17:09+00:00</updated>
<author>
<name>Jacob Helwig</name>
<email>jacob@puppetlabs.com</email>
</author>
<published>2011-02-18T23:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=3b41d44812eed82d41e135375df15ae0bc3b4800'/>
<id>3b41d44812eed82d41e135375df15ae0bc3b4800</id>
<content type='text'>
Paired-with: Jesse Wolfe &lt;jesse@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Paired-with: Jesse Wolfe &lt;jesse@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#4914) Prefetch mountstate</title>
<updated>2011-01-25T20:23:35+00:00</updated>
<author>
<name>Stefan Schulte</name>
<email>stefan.schulte@taunusstein.net</email>
</author>
<published>2011-01-23T12:03:15+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=2884660768fbea22a91e3c5bab9595ce075e67a5'/>
<id>2884660768fbea22a91e3c5bab9595ce075e67a5</id>
<content type='text'>
Add a method mountinstances that returns a list of currently mounted
filesystems and overwrite prefetch to update the :ensure state of a
mount resource to either
- :absent    =&gt; not in fstab and not mounted
- :unmounted =&gt; in fstab but not mounted
- :mounted   =&gt; in fstab and mounted
- :ghost     =&gt; not in fstab but mounted

This is just one step towards 4914. Next will be query the property_hash
when asking mounted? and update the insync? methods to handle the
different states.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a method mountinstances that returns a list of currently mounted
filesystems and overwrite prefetch to update the :ensure state of a
mount resource to either
- :absent    =&gt; not in fstab and not mounted
- :unmounted =&gt; in fstab but not mounted
- :mounted   =&gt; in fstab and mounted
- :ghost     =&gt; not in fstab but mounted

This is just one step towards 4914. Next will be query the property_hash
when asking mounted? and update the insync? methods to handle the
different states.
</pre>
</div>
</content>
</entry>
<entry>
<title>(#4914) Join lines for better readability</title>
<updated>2011-01-25T20:23:35+00:00</updated>
<author>
<name>Stefan Schulte</name>
<email>stefan.schulte@taunusstein.net</email>
</author>
<published>2011-01-23T11:47:38+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=ade951aa9d0017743059f282cbc1611a8b0b02f0'/>
<id>ade951aa9d0017743059f282cbc1611a8b0b02f0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Code smell: Two space indentation</title>
<updated>2010-07-10T01:12:17+00:00</updated>
<author>
<name>Markus Roberts</name>
<email>Markus@reality.com</email>
</author>
<published>2010-07-10T01:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=3180b9d9b2c844dade1d361326600f7001ec66dd'/>
<id>3180b9d9b2c844dade1d361326600f7001ec66dd</id>
<content type='text'>
Replaced 106806 occurances of ^( +)(.*$) with

The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people
who learned ruby in the 1900s) uses two-space indentation.

3 Examples:

    The code:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
            element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
            assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    becomes:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
          element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
          assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    The code:
            assert_equal(str, val)

            assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    becomes:
          assert_equal(str, val)

          assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    The code:
        end

        assert_nothing_raised do
            klass[:Yay] = "boo"
            klass["Cool"] = :yayness
        end

    becomes:
        end

        assert_nothing_raised do
          klass[:Yay] = "boo"
          klass["Cool"] = :yayness
        end
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaced 106806 occurances of ^( +)(.*$) with

The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people
who learned ruby in the 1900s) uses two-space indentation.

3 Examples:

    The code:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
            element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
            assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    becomes:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
          element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
          assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    The code:
            assert_equal(str, val)

            assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    becomes:
          assert_equal(str, val)

          assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    The code:
        end

        assert_nothing_raised do
            klass[:Yay] = "boo"
            klass["Cool"] = :yayness
        end

    becomes:
        end

        assert_nothing_raised do
          klass[:Yay] = "boo"
          klass["Cool"] = :yayness
        end
</pre>
</div>
</content>
</entry>
</feed>
