wearetherobots | 1 Mar 01:00 2012

(puppetlabs/puppet) Ruby 1.8.5 fix for autoload and up2date

On Wed Feb 29 23:54:45 UTC 2012 pull request #547 was closed.

Ruby 1.8.5 fix for autoload and up2date requested by (pcarlisle)

The pull request was merged by: daniel-pittman

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

wearetherobots | 1 Mar 01:00 2012

(puppetlabs/puppet-acceptance) (maint) slight tweaks to new answers

Please review pull request #157: (maint) slight tweaks to new answers opened by (justinstoller)

Description:

This changes the console and auth db users to unique names.

It also makes the db passwords use as many special characters as we support.

I moved the one line that needed interpolation in the dashboard answers section to it's own string so the special characters I added won't be interpolated.

I also added a conditional to replace the DASHBOARD refers that remained in the answers file.

  • Opened: Wed Feb 29 23:45:53 UTC 2012
  • Based on: puppetlabs:master (36080cb058a840fd0bbc97ea8965c4249eb7fc06)
  • Requested merge: justinstoller:dont_duplicate_db_users (18240dc2f472a406b6a250e7f3776cad78754e01)

Diff follows:

diff --git a/setup/early/01-gen-answer-file.rb b/setup/early/01-gen-answer-file.rb index 6ac8de4..809e6e7 100644 --- a/setup/early/01-gen-answer-file.rb +++ b/setup/early/01-gen-answer-file.rb <at> <at> -31,30 +31,29 <at> <at> ] # Dashboard only answers -dashboard_a = %Q[ -q_puppet_enterpriseconsole_auth_database_user='console' -q_puppet_enterpriseconsole_auth_database_password='puppet' +dashboard_a = %q[ +q_puppet_enterpriseconsole_auth_database_user='mYu7hu3r' +q_puppet_enterpriseconsole_auth_database_password='~! <at> #$%^*-/aZ' q_puppet_enterpriseconsole_smtp_host=DASHBOARD q_puppet_enterpriseconsole_smtp_use_tls=n q_puppet_enterpriseconsole_smtp_port=25 q_puppet_enterpriseconsole_smtp_user_auth=y q_puppet_enterpriseconsole_smtp_username='console' -q_puppet_enterpriseconsole_smtp_password='puppet' -q_puppet_enterpriseconsole_auth_password='puppet' +q_puppet_enterpriseconsole_smtp_password='~! <at> #$%^*-/aZ' +q_puppet_enterpriseconsole_auth_password='~! <at> #$%^*-/aZ' q_puppet_enterpriseconsole_auth_user='console' q_puppet_enterpriseconsole_database_install=y q_puppet_enterpriseconsole_database_name='console' -q_puppet_enterpriseconsole_database_password='puppet' -q_puppet_enterpriseconsole_database_root_password='puppet' -q_puppet_enterpriseconsole_database_user='console' -q_puppet_enterpriseconsole_httpd_port=#{portno} +q_puppet_enterpriseconsole_database_password='~! <at> #$%^*-/aZ' +q_puppet_enterpriseconsole_database_root_password='~! <at> #$%^*-/aZ' +q_puppet_enterpriseconsole_database_user='mYc0nS03u3r' q_puppet_enterpriseconsole_install=y q_puppet_enterpriseconsole_inventory_hostname=`uname | grep -i sunos > /dev/null && hostname || hostname -s` q_puppet_enterpriseconsole_inventory_port=8140 q_puppet_enterpriseconsole_master_hostname=MASTER q_puppet_enterpriseconsole_inventory_certname=`uname | grep -i sunos > /dev/null && hostname || hostname -s` q_puppet_enterpriseconsole_inventory_dnsaltnames=MASTER -] +] + "\nq_puppet_enterpriseconsole_httpd_port=#{portno}\n" dashboardhost = nil hosts.each do |host| # Clean up all answer files that might conflict <at> <at> -111,6 +110,9 <at> <at> if line =~ /(q_puppetmaster_enterpriseconsole_hostname=)DASHBOARD/ then line = $1+dashboardhost end + if line =~ /(q_puppet_enterpriseconsole_smtp_host=)DASHBOARD/ then + line = $1+dashboardhost + end if line =~ /(q_puppet_enterpriseconsole_master_hostname=)MASTER/ then line = $1+master end

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

wearetherobots | 1 Mar 01:15 2012

(puppetlabs/puppet-acceptance) (maint) slight tweaks to new answers

On Thu Mar 01 00:04:04 UTC 2012 pull request #157 was closed.

(maint) slight tweaks to new answers requested by (justinstoller)

The pull request was merged by: mykhyggz

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

wearetherobots | 1 Mar 02:15 2012

(puppetlabs/puppet) Fix ruby 1.8.5 failures for execution_spec

Please review pull request #548: Fix ruby 1.8.5 failures for execution_spec opened by (cprice-puppet)

Description:

  • Opened: Thu Mar 01 01:13:26 UTC 2012
  • Based on: puppetlabs:master (bf8a77c8f6cfb1b14f7513c298471813da979eea)
  • Requested merge: cprice-puppet:cleanup/master/ruby-185-execution-spec-failures (85077ea13ce9b12aee6179158c3c2176617e0251)

Diff follows:

diff --git a/spec/unit/util/execution_spec.rb b/spec/unit/util/execution_spec.rb index 0de37ec..760570d 100755 --- a/spec/unit/util/execution_spec.rb +++ b/spec/unit/util/execution_spec.rb <at> <at> -20,6 +20,14 <at> <at> def call_exec_windows(command, arguments, stdin, stdout, stderr) Puppet::Util::Execution.send(:execute_windows, command, arguments, stdin, stdout, stderr) end + # utility method for cloning the ENV object. Because it is not ACTUALLY a Hash instance, + # we can't use the built-in #clone method, and because Ruby 1.8.5 doesn't support some of + # the newer constructors for the Hash object, this slightly hacky syntax was the best I + # could come up with. At least it's isolated to one line of code :) + def clone_env() + ENV.inject(Hash.new) {|result,entry| result[entry[0]] = entry[1] ; result } + end + describe "execution methods" do let(:pid) { 5501 } <at> <at> -58,7 +66,7 <at> <at> def stub_process_wait(exitstatus) # there is a danger here that ENV will be modified by exec_posix. Normally it would only affect the ENV # of a forked process, but here, we're stubbing Kernel.fork, so the method has the ability to override the # "real" ENV. To guard against this, we'll capture a snapshot of ENV before each test. - <at> saved_env = Hash[ENV.map {|key,val| [key, val]}] + <at> saved_env = clone_env # Now, we're going to effectively "mock" the magic ruby 'ENV' variable by creating a local definition of it # inside of the module we're testing. <at> <at> -71,7 +79,7 <at> <at> def stub_process_wait(exitstatus) Puppet::Util::Execution.send(:remove_const, :ENV) # capture the current environment and make sure it's the same as it was before the test - cur_env = Hash[ENV.map {|key,val| [key, val]}] + cur_env = clone_env # we will get some fairly useless output if we just use the raw == operator on the hashes here, so we'll # be a bit more explicit and laborious in the name of making the error more useful... <at> <at> -286,14 +294,13 <at> <at> def stub_process_wait(exitstatus) # of a forked process, but, in some of the previous tests in this file we're stubbing Kernel.fork., which could # allow the method to override the "real" ENV. This shouldn't be a problem for these tests because they are # not stubbing Kernel.fork, but, better safe than sorry... so, to guard against this, we'll capture a snapshot - # of ENV before each test. We have to use this somewhat kludgy code to clone the ENV var, because ENV doesn't - # provide a useful == method. - <at> saved_env = Hash[ENV.map {|key,val| [key, val]}] + # of ENV before each test. + <at> saved_env = clone_env end after :each do # capture the current environment and make sure it's the same as it was before the test - cur_env = Hash[ENV.map {|key,val| [key, val]}] + cur_env = clone_env # we will get some fairly useless output if we just use the raw == operator on the hashes here, so we'll # be a bit more explicit and laborious in the name of making the error more useful... <at> saved_env.each_pair { |key,val| cur_env[key].should == val }

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

wearetherobots | 1 Mar 02:30 2012

(puppetlabs/puppet) Fix ruby 1.8.5 failures for execution_spec

On Thu Mar 01 01:18:18 UTC 2012 pull request #548 was closed.

Fix ruby 1.8.5 failures for execution_spec requested by (cprice-puppet)

The pull request was merged by: pcarlisle

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

Matthaus Litteken | 1 Mar 04:27 2012

Reminder: Changes to apt.puppetlabs.com have happened

At the beginning of the year we shuffled our repository structure to
use apt.puppetlabs.com without a trailing /debian or /ubuntu.

This means that your repository lists should be changed to something
like the following:

deb http://apt.puppetlabs.com/ $dist main
and
deb-src http://apt.puppetlabs.com/ $dist main

For the moment, we have 302 redirects in place for
apt.puppetlabs.com/debian and apt.puppetlabs.com/ubuntu, so your old
repository definitions should still work on our current configuration
[as long as your version of apt is >= 0.7.21 (released April 14th
2009)].

However, users have noticed that the 302 links are *much* slower with
apt, and the redirects will not be there forever, so please update
your repository lists accordingly.

If you would like an easier way of adding our repositories, we have a
debian package that will do it for you. It can be downloaded at:
http://apt.puppetlabs.com/puppetlabs-release_1.0-2_all.deb

As always, if you come across any issues with the repository or our
packages, issues can be opened at
http://projects.puppetlabs.com/projects/puppet-community-pkg-repo/.

--

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

wearetherobots | 1 Mar 18:00 2012

(puppetlabs/puppet-docs) Display an example of using $settings::

Please review pull request #53: Display an example of using $settings:: opened by (glarizza)

Description:

Previously, we explained how $settings:: could be used to display
configuration settings inside your Puppet manifests. This commit adds an
example using puppet apply -ve from the command line.

  • Opened: Thu Mar 01 16:53:52 UTC 2012
  • Based on: puppetlabs:master (6741b28826c6f657be261b6d82a0dfbab3213d21)
  • Requested merge: glarizza:feature/master/faq_puppet-e (a137c7b40f67c603edb63e2f99bdfcd0e027d37e)

Diff follows:

diff --git a/source/guides/faq.markdown b/source/guides/faq.markdown index 569c91a..8774b6b 100644 --- a/source/guides/faq.markdown +++ b/source/guides/faq.markdown <at> <at> -358,7 +358,9 <at> <at> master's certname is set to something other than its fully-qualified domain name, this variable will still contain the server's fqdn.) * `$serverip` --- Provided by the puppet master; contains the master server's IP address. * `$serverversion` --- Provided by the puppet master; contains the puppet master's current version. -* `$settings::<name of setting>` --- Provided by the puppet master; exposes all of the master's [configuration settings](./configuring.html) as variables in the `settings` namespace. Note that other than `$environment`, the agent's settings aren't available in manifests. Added in Puppet 2.6.0. +* `$settings::<name of setting>` --- Provided by the puppet master; exposes all of the master's [configuration settings](./configuring.html) as variables in the `settings` namespace. Note that other than `$environment`, the agent's settings aren't available in manifests. Added in Puppet 2.6.0. For example, to display your certname: + + puppet apply -ve 'notify {"My certname is: ${settings::certname}":}' ### Can I access environment variables with Facter?

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

wearetherobots | 1 Mar 21:15 2012

(puppetlabs/facter) Ticket/1.6.x/9482 virtual solaris vm

Please review pull request #183: Ticket/1.6.x/9482 virtual solaris vm opened by (ssvarma)

Description:

Added correct fact virtual and is_virtual for Solaris VM

  • Opened: Thu Mar 01 20:04:22 UTC 2012
  • Based on: puppetlabs:master (a4f433e59653d0e0827744c7219d1c40aaabf0a2)
  • Requested merge: ssvarma:ticket/1.6.x/9482-virtualSolarisVM (81c52e74cb58830cdcb5c05aca1b674ea7f41926)

Diff follows:

diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb index 78d0841..0aab61a 100644 --- a/lib/facter/virtual.rb +++ b/lib/facter/virtual.rb <at> <at> -118,6 +118,7 <at> <at> output.each_line do |pd| result = "parallels" if pd =~ /Parallels/ result = "vmware" if pd =~ /VMware/ + result = "kvm" if pd =~ /KVM/ result = "virtualbox" if pd =~ /VirtualBox/ result = "xenhvm" if pd =~ /HVM domU/ result = "hyperv" if pd =~ /Product Name: Virtual Machine/ <at> <at> -131,6 +132,7 <at> <at> output.each_line do |pd| result = "parallels" if pd =~ /Parallels/ result = "vmware" if pd =~ /VMware/ + result = "kvm" if pd =~ /KVM/ result = "virtualbox" if pd =~ /VirtualBox/ result = "xenhvm" if pd =~ /HVM domU/ end diff --git a/spec/unit/virtual_spec.rb b/spec/unit/virtual_spec.rb index 5d7b1ac..dac3432 100755 --- a/spec/unit/virtual_spec.rb +++ b/spec/unit/virtual_spec.rb <at> <at> -67,7 +67,7 <at> <at> Facter::Util::Macosx.stubs(:profiler_data).returns({ "spdisplays_vendor" => "VMWare" }) Facter.fact(:virtual).value.should == "vmware" end - end + end describe "on Linux" do <at> <at> -186,6 +186,17 <at> <at> Facter.fact(:virtual).value.should == "vmware" end + it "should be kvm with KVM vendor name from prtdiag" do + Facter.fact(:kernel).stubs(:value).returns("SunOS") + Facter.fact(:hardwaremodel).stubs(:value).returns(nil) + Facter::Util::Resolution.stubs(:exec).with('lspci').returns(nil) + Facter::Util::Resolution.stubs(:exec).with('dmidecode').returns(nil) + Facter::Util::Resolution.stubs(:exec).with('prtdiag').returns("System Configuration: KVM Virtual Pla\ +tform") + Facter.fact(:virtual).value.should == "kvm" + end + + it "should be parallels with Parallels vendor name from prtdiag" do Facter.fact(:kernel).stubs(:value).returns("SunOS") Facter.fact(:hardwaremodel).stubs(:value).returns(nil)

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

wearetherobots | 1 Mar 21:30 2012

(puppetlabs/puppet) More fixes / cleanup for 1.8.5

Please review pull request #549: More fixes / cleanup for 1.8.5 opened by (cprice-puppet)

Description:

  • Opened: Thu Mar 01 20:28:14 UTC 2012
  • Based on: puppetlabs:master (196c85f51dd1839c67715f576830b942f8a90a27)
  • Requested merge: cprice-puppet:cleanup/master/ruby-185-execution-spec-failures (9b62607af61452a3aafda51a0268498e4d2f829e)

Diff follows:

diff --git a/spec/unit/type/yumrepo_spec.rb b/spec/unit/type/yumrepo_spec.rb index 3e2a7b0..1ce12cf 100644 --- a/spec/unit/type/yumrepo_spec.rb +++ b/spec/unit/type/yumrepo_spec.rb <at> <at> -4,6 +4,7 <at> <at> describe Puppet::Type.type(:yumrepo) do + include PuppetSpec::Files describe "When validating attributes" do <at> <at> -88,7 +89,7 <at> <at> def create_data_files() before(:each) do - <at> yumdir = Dir.mktmpdir("yumrepo_spec_tmpdir") + <at> yumdir = tmpdir("yumrepo_spec_tmpdir") <at> yumconf = File.join( <at> yumdir, "yum.conf") File.open( <at> yumconf, "w") do |f| f.print "[main]\nreposdir=#{ <at> yumdir} /no/such/dir\n" <at> <at> -99,11 +100,6 <at> <at> def create_data_files() Puppet::Type.type(:yumrepo).inifile = nil end - after(:each) do - FileUtils.rm_rf( <at> yumdir) - end - - it "should be able to create a valid config file" do values = { diff --git a/spec/unit/util/execution_spec.rb b/spec/unit/util/execution_spec.rb index 760570d..92bfcd8 100755 --- a/spec/unit/util/execution_spec.rb +++ b/spec/unit/util/execution_spec.rb <at> <at> -20,14 +20,6 <at> <at> def call_exec_windows(command, arguments, stdin, stdout, stderr) Puppet::Util::Execution.send(:execute_windows, command, arguments, stdin, stdout, stderr) end - # utility method for cloning the ENV object. Because it is not ACTUALLY a Hash instance, - # we can't use the built-in #clone method, and because Ruby 1.8.5 doesn't support some of - # the newer constructors for the Hash object, this slightly hacky syntax was the best I - # could come up with. At least it's isolated to one line of code :) - def clone_env() - ENV.inject(Hash.new) {|result,entry| result[entry[0]] = entry[1] ; result } - end - describe "execution methods" do let(:pid) { 5501 } <at> <at> -66,7 +58,7 <at> <at> def stub_process_wait(exitstatus) # there is a danger here that ENV will be modified by exec_posix. Normally it would only affect the ENV # of a forked process, but here, we're stubbing Kernel.fork, so the method has the ability to override the # "real" ENV. To guard against this, we'll capture a snapshot of ENV before each test. - <at> saved_env = clone_env + <at> saved_env = ENV.to_hash # Now, we're going to effectively "mock" the magic ruby 'ENV' variable by creating a local definition of it # inside of the module we're testing. <at> <at> -79,7 +71,7 <at> <at> def stub_process_wait(exitstatus) Puppet::Util::Execution.send(:remove_const, :ENV) # capture the current environment and make sure it's the same as it was before the test - cur_env = clone_env + cur_env = ENV.to_hash # we will get some fairly useless output if we just use the raw == operator on the hashes here, so we'll # be a bit more explicit and laborious in the name of making the error more useful... <at> <at> -295,12 +287,12 <at> <at> def stub_process_wait(exitstatus) # allow the method to override the "real" ENV. This shouldn't be a problem for these tests because they are # not stubbing Kernel.fork, but, better safe than sorry... so, to guard against this, we'll capture a snapshot # of ENV before each test. - <at> saved_env = clone_env + <at> saved_env = ENV.to_hash end after :each do # capture the current environment and make sure it's the same as it was before the test - cur_env = clone_env + cur_env = ENV.to_hash # we will get some fairly useless output if we just use the raw == operator on the hashes here, so we'll # be a bit more explicit and laborious in the name of making the error more useful... <at> saved_env.each_pair { |key,val| cur_env[key].should == val }

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

wearetherobots | 1 Mar 22:15 2012

(puppetlabs/facter) Ticket/1.6.x/10112 pid

Please review pull request #184: Ticket/1.6.x/10112 pid opened by (ssvarma)

Description:

Added fact pid.

  • Opened: Thu Mar 01 21:09:31 UTC 2012
  • Based on: puppetlabs:master (a4f433e59653d0e0827744c7219d1c40aaabf0a2)
  • Requested merge: ssvarma:ticket/1.6.x/10112-pid (5a787d0c35487dde7875eb3dee06773a5aaa4245)

Diff follows:

diff --git a/lib/facter/pid.rb b/lib/facter/pid.rb new file mode 100644 index 0000000..13261b9 --- /dev/null +++ b/lib/facter/pid.rb <at> <at> -0,0 +1,13 <at> <at> +# Fact: pid +# +# Purpose: Internal fact for what to use to list the process id. +# +# Resolution: +# Assumes "Process.pid" for all operating systems +# +# Caveats: +# + +Facter.add("pid") do + setcode {Process.pid} +end diff --git a/spec/unit/pid_spec.rb b/spec/unit/pid_spec.rb new file mode 100644 index 0000000..e01c23e --- /dev/null +++ b/spec/unit/pid_spec.rb <at> <at> -0,0 +1,12 <at> <at> +#!usr/bin/env ruby +#Test for process ID fact. +#Author: Shubhra Sinha Varma + +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe "process id fact" do + it "should use the pid command" do + Facter.fact(:pid).value.should == Process.pid + end +end +

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


Gmane