summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | | | (#6513) Adjust P::U::Settings test name to reflect what it testsJacob Helwig2011-03-081-1/+1
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'should interpolate found values using the current environment' wasn't actually testing what it was describing, since the environment variable is special cased. Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
| * | | | | | | Merge branch 'ticket/2.6.next/5724-deprecate_DESTDIR_for_install.rb' of ↵Jacob Helwig2011-03-081-25/+20
| |\ \ \ \ \ \ \ | | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://github.com/elutfall/puppet into 2.6.next * 'ticket/2.6.next/5724-deprecate_DESTDIR_for_install.rb' of git://github.com/elutfall/puppet: (5724) Prep for deprecation of DESTDIR Refactoring duplicate code and logic in prep for DESTDIR deprecation.
| | * | | | | | (5724) Prep for deprecation of DESTDIRElias Lutfallah2011-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation of deprecating the DESTDIR env variable, I've added a warning when the DESTDIR variable is being used.
| | * | | | | | Refactoring duplicate code and logic in prep for DESTDIR deprecation.Elias Lutfallah2011-03-051-25/+19
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESTDIR is slated to be deprecated. The block of code that checks for DESTDIR contained duplicate code as the block that checks for --destdir. The dupe code has been moved out of the destdir checks. I have also flipped the order of checking. Previously, if the DESTDIR env was set it would be used regardless of whether or not the --destdir flag was set. No env, no flag: ./install.rb destdir = nil Env only: DESTDIR="foo" ./install.rb destdir = foo Flag only: ./install.rb --destdir="bar" destdir = bar Both (uses flag): DESTDIR="foo" ./install.rb --destdir="bar" destdir = bar
| * | | | | | Merge branch 'ticket/2.6.next/6632' into 2.6.nextPaul Berry2011-03-084-32/+14
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.next/6632: (#6632) Adding a new mount no longer causes error with umount
| | * | | | | | (#6632) Adding a new mount no longer causes error with umountPaul Berry2011-03-084-32/+14
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jacob@puppetlabs.com>
| * | | | | | Adjust Darwin mount provider tests to pass on LinuxPaul Berry2011-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mount, and umount are located under /bin, instead of /sbin on Linux, so we adjust the ExecutionStub to accept either location. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
| * | | | | | Merge branch 'maint/2.6.next/test_mount' into 2.6.nextPaul Berry2011-03-071-0/+93
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint/2.6.next/test_mount: Maint: Begin adding integration tests for the mount provider
| | * | | | | | Maint: Begin adding integration tests for the mount providerPaul Berry2011-03-071-0/+93
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests form a starting point for integration testing the mount provider, using the new Puppet::Util::ExecutionStub mechanism to simulate the state of the machine in response to the execution of "mount" and "umount" commands. The tests currently work around some known bugs (6628, 6632, and 6633). Reviewed-by: Max Martin <max@puppetlabs.com>
| * | | | | | Merge branch 'maint/2.6.next/make_execute_stubbable' into 2.6.nextPaul Berry2011-03-074-0/+67
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | * maint/2.6.next/make_execute_stubbable: Maint: Added the ability to replace the behavior of Puppet::Util.execute with an arbitrary code block for ease in spec testing.
| | * | | | | Maint: Added the ability to replace the behavior ofPaul Berry2011-03-074-0/+67
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Puppet::Util.execute with an arbitrary code block for ease in spec testing. Reviewed-by: Max Martin <max@puppetlabs.com>
| * | | | | Merge branch 'ticket/2.6.next/6606' into 2.6.nextnfagerlund2011-03-0411-11/+41
| |\ \ \ \ \ | | |/ / / / | |/| | | |
| | * | | | (#6606) Inline docs: Document all autorequire relationshipsnfagerlund2011-03-0411-11/+41
| |/ / / / | | | | | | | | | | | | | | | This patch appends **Autorequires:** notes to the @doc string of every type whose instances can autorequire other resources. This will put autorequire info right on the types reference where it can do the most good.
| * | | | Merge branch 'ticket/2.6.next/6602' into 2.6.nextNick Lewis2011-03-041-1/+1
| |\ \ \ \
| | * | | | (#5148) Fix failing spec due to timezoneNick Lewis2011-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Time.parse(...) will yield a string in the local timezone. So when this spec was run in a non -0700 timezone, it was failing, because it was comparing a string in local time to a string in -0700. This fixes it to compare to the local string representation of the time.
| * | | | | Merge branch 'ticket/2.6.next/6602' into 2.6.nextNick Lewis2011-03-042-0/+45
| |\| | | |
| | * | | | (#5148) Add support for PSON to factsNick Lewis2011-03-042-0/+45
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, facts could be fetched via the REST API in PSON, but came back as the to_s representation of a Ruby object, rather than as proper PSON data. This patch adds to_pson and from_pson to facts, so they can be properly used with PSON.
| * | | | Merge branch 'ticket/2.6.next/6581' into 2.6.nextNick Lewis2011-03-036-310/+289
| |\ \ \ \
| | * | | | (#6338) Remove inventory indirection, and move to facts indirectionNick Lewis2011-03-036-310/+289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The inventory indirection was just providing the search method for facts. Because the route is now facts_search instead of inventory, it can just be implemented as the search method for facts. Reviewed-By: Daniel Pittman
| * | | | | Merge branch 'ticket/2.6.next/6445' into 2.6.nextnfagerlund2011-03-031-1/+1
| |\ \ \ \ \ | | |/ / / / | |/| | | |
| | * | | | (#6445) Fix inline docs: puppet agent does not accept --mkusersBen Hughes2011-03-031-1/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | Inline documentation in lib/puppet/reference/configuration.rb stated that puppet agent accepted the --mkusers flag, which is only intended for use with puppet master.
| * | | | Merge branch '2.6.x' into 2.6.nextJacob Helwig2011-03-022-1/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: Update CHANGELOG and version for 2.6.6rc1 (#6541) Fix content with checksum truncation bug (#6418) Recursive files shouldn't be audited
| * | | | Merge branch 'ticket/2.6.next/6541-md5_in_content_truncates' into 2.6.nextMatt Robinson2011-03-023-33/+63
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.next/6541-md5_in_content_truncates: (#6541) maint: whitespace cleanup on the file integration spec (#6541) Fix content with checksum truncation bug
| | * | | | (#6541) maint: whitespace cleanup on the file integration specMatt Robinson2011-03-021-29/+32
| | | | | |
| | * | | | (#6541) Fix content with checksum truncation bugMatt Robinson2011-03-022-4/+31
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch for #6107 fd73874147a1aaa3a047f904a0bc1ae67780a2e4 introduced a bug when content was an invalid checksum. Rather than error the checksum was invalid, it would overwrite the file with empty string, essentially truncating it. The problem with #6107 is that when I wrote it, I didn't realize that the content parameter was munged to be nil when it was a checksum, and then chunking method special cased nil content to mean you should check the filebucket. #6107 intended to fix the case where content REALLY WAS nil, and handle that by returning an empty string. This patch fixes it so that we check to see if we really passed in a checksum when chunking, and only then going to the filebucket. Surprisingly it is possible to have a content checksum should value set from source, so we have to be careful not to assume the use of the filebucket whenever there's a checksum. The following manifest produces this situation: file { "/tmp/mydir" : source => '/tmp/sourcedir', recurse => true, } I've said it before, and sure I'll say it again, but long term the file provider really needs a refactor. I'll write some acceptance tests for file behavior right after committing this so that the refactoring will be easier. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
| * | | | Merge branch '2.6.x' into 2.6.nextNigel Kersten2011-02-281-15/+14
| |\ \ \ \
| * \ \ \ \ Merge branch 'ticket/2.6.next/5466' into 2.6.nextMatt Robinson2011-02-283-22/+40
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.next/5466: (#5466) Write specs for output of puppet resource (#5466) Monkey patch Symbol so that you can sort them (#5466) Fixed puppet resource bug with trailing ,
| | * | | | | (#5466) Write specs for output of puppet resourceMatt Robinson2011-02-281-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | (#5466) Monkey patch Symbol so that you can sort themMatt Robinson2011-02-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that the ability to sort symbols comes in the preinit section of application run when we load Facter and hit the code that adds the <=> method for symbols in lib/facter/util/plist/generator.rb Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | * | | | | (#5466) Fixed puppet resource bug with trailing ,Nan Liu2011-02-281-9/+20
| |/ / / / /
| * | | | | Merge branch 'maint/2.6.next/revert-5935' into 2.6.nextNick Lewis2011-02-283-993/+962
| |\ \ \ \ \
| | * | | | | Revert "(#5935) Allow functions to accept negated values"Nick Lewis2011-02-213-993/+962
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e3c59df2b246fe5e764272f21b631a5d2f28687f. This commit is being reverted because the solution is incomplete, and a better solution is out of scope for this release. A more complete solution will be implemented in the future.
| * | | | | | Merge branch 'ticket/2.6.next/4922' into 2.6.nextNick Lewis2011-02-282-138/+38
| |\ \ \ \ \ \
| | * | | | | | (#4922) Don't truncate remotely-sourced files on 404Nick Lewis2011-02-282-138/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were 'handling' 404's on remote file content retrieval by returning nil rather than raising an exception. This caused no content to be written to the temporary file, but still appeared successful, so the destination file was overwritten, instead of preserved. Now we just handle 404 like any other error. Note that the root cause of these 404s seems to have been #4319, which has been fixed. However, in the event we do happen to get a 404 here, it's better not to have code to specifically handle it incorrectly. Paired-With: Max Martin Reviewed-By: Matt Robinson
| * | | | | | | Merge branch 'ticket/2.6.next/4914' into 2.6.nextPaul Berry2011-02-2815-447/+603
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.next/4914: Revert "(#6309) Ensure the correct device is mounted when managing mounts" (#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
| | * \ \ \ \ \ \ Merge branch 'ticket/2.6.x/4914' into maint/2.6.next/revert-6309Paul Berry2011-02-2813-307/+586
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| | | * | | | | | | (#4914) Improved stubbing in mount/parsed_spec tests.Paul Berry2011-02-251-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few of the spec tests were attempting to stub Puppet::Type::Mount#default_target so that it pointed to a temporary file rather than /etc/fstab, but they were creating the stub after the first call to default_target, so both /etc/fstab and the temporary file were being read. This caused errors when running spec tests on platforms where /etc/fstab is unreadable by non-privileged users. Fixed the problem by moving the stub declaration earlier in the test.
| | | * | | | | | | (#4914) Improved parsed_spec for mountStefan Schulte2011-02-208-48/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add specs for the new prefetching and the correct parsing of vfstab on Solaris and fstab on other systems
| | | * | | | | | | (#4914) Remove mount specsStefan Schulte2011-02-201-80/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove mount specs that seem to only test if the parsedfile provider is working correctly or are obsolete specs.
| | | * | | | | | | (#4914) Specs for mounted? match new behaviourStefan Schulte2011-01-301-37/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The question if a filesystem is mounted or not can be answered without calling mount and the specs have to reflect that.
| | | * | | | | | | (#4914) Add specs for modified mount providerStefan Schulte2011-01-251-13/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change specs - No need to call flush before mounting (explicitly), because the type and syncothers will to that for us - Add tests regarding the prefetched mount status
| | | * | | | | | | (#4914) Add specs for modified mount typeStefan Schulte2011-01-251-110/+182
| | | | | | | | | |
| | | * | | | | | | (#4914) Update property blocksStefan Schulte2011-01-251-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The action for a specific ensure state depends on the actual state so we cannot use the default behaviour. The following transitions are now supported (with ghost = mounted but not present in fstab): * 4 Is-states : absent, mounted, unmounted, ghost * 4 Should-states: absent, mounted, present, unmounted * from ghost to present -> create * from absent to present -> create * from ghost to unmounted -> create, umount * from mounted to unmounted -> umount * from absent to unmounted -> create * from ghost to absent -> umount (may fail on certain OS) * from mounted to absent -> umount, destroy * from unmounted to absent -> destroy * from ghost to mounted -> create * from absent to mounted -> create, mount * from unmounted to mounted -> mount Every other combination is treatet insync
| | | * | | | | | | (#4914) Query property_hash for mountstateStefan Schulte2011-01-251-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change mounted? to query the property_hash so we don't have to run the mountcommand for every specified mount but rely on the prefetched state Also update the prefetched property_hash[:ensure] after mount or umount. This is important if we query mounted? later (most obvious when refresh is called. We dont want to remount a resource that was umounted before)
| | | * | | | | | | (#4914) Prefetch mountstateStefan Schulte2011-01-251-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 => not in fstab and not mounted - :unmounted => in fstab but not mounted - :mounted => in fstab and mounted - :ghost => 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.
| | | * | | | | | | (#4914) Join lines for better readabilityStefan Schulte2011-01-251-9/+2
| | | | | | | | | |
| | * | | | | | | | Revert "(#6309) Ensure the correct device is mounted when managing mounts"Paul Berry2011-02-259-241/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6cb365a887d47606bdfae0ff540038b0c49b7451, which fixed bug #6309 but introduced bug #6411. In addition, it conflicts with a significant patch to the mount provider that addresses #4914. After merging in the fix for #4914 I will determine whether bug #6309 still exists, and if so work on an improved fix for it.
| * | | | | | | | | Merge branch 'ticket/2.6.next/maint-remove_version_control_tags' into 2.6.nextMatt Robinson2011-02-2811-23/+0
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.next/maint-remove_version_control_tags: (#6338) Remove unused version control tags
| | * | | | | | | | | (#6338) Remove unused version control tagsMatt Robinson2011-02-2811-23/+0
| | | |_|/ / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Older version control systems like CVS and SVN used to use these $Id$ tags for version information. Paired-with: Nick Lewis
| * | | | | | | | | Merge branch 'ticket/2.6.next/6509' into 2.6.nextnfagerlund2011-02-2810-80/+90
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | |/| | | | | | | |