Re: [Puppet Users] Virtual resources not refreshing, how to clean out and re-do?

2015-08-05 Thread Steve Wray
Oh thanks, that worked. 

I guess I was confused with the semantics of 'clean' and 'deactivate' and 
thought 'deactivate' would... deactivate the node not just 'clean' out its 
virtual resources :)

It would be nice if there was a curl interface for puppetdb to delete 
specific virtual resources! So far as I can tell it doesn't work with -X 
DELETE at all.



On Wednesday, August 5, 2015 at 11:28:49 AM UTC-7, Matthew Burgess wrote:
>
> On 5 Aug 2015 19:10, "Steve Wray" > wrote:
> >
> > I have a problem where a virtual resource has, in an early run, got the 
> wrong value. I've fixed the manifest so that the virtual resource gets the 
> correct values and I've rerun Puppet on the node that populates the virtual 
> resource. However when it is instantiated it still gets the old value.
> >
> > I've used 'puppet node clean' for both the node where the virtual 
> resource is created/populated and on the node where the virtual resource is 
> instantiated and its still coming in with the wrong value. 
> >
> > If I drop the puppetdb database (its postgres) and rerun Puppet on both 
> sides the virtual resource gets the correct new values. 
> >
> > This seems like a very extreme measure for an environment with many 
> nodes and many virtual resources, just to clean out one incorrect value.
> >
> > What is the correct way to fix this situation?
>
> Run
>
> puppet node deactivate agent-hostname
>
> on your master. That nullifies all exported resources for that host, which 
> then get repopulated on the next agent run.
>
> Matt.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c9195c3b-6d1a-4c95-bbaf-ae47606e30af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Virtual resources not refreshing, how to clean out and re-do?

2015-08-05 Thread Steve Wray
I have a problem where a virtual resource has, in an early run, got the 
wrong value. I've fixed the manifest so that the virtual resource gets the 
correct values and I've rerun Puppet on the node that populates the virtual 
resource. However when it is instantiated it still gets the old value.

I've used 'puppet node clean' for both the node where the virtual resource 
is created/populated and on the node where the virtual resource is 
instantiated and its still coming in with the wrong value. 

If I drop the puppetdb database (its postgres) and rerun Puppet on both 
sides the virtual resource gets the correct new values. 

This seems like a very extreme measure for an environment with many nodes 
and many virtual resources, just to clean out one incorrect value.

What is the correct way to fix this situation?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/72cfddcf-151f-4615-8e30-0e6594161213%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Steve Wray
Your response is encouraging, thanks.

I wasn't using sqlite, I was using postgresql. I have about 100 nodes (and
growing) sqlite quickly became unusable.

One of the things I tried was aptitude install with =version but this
didn't work, apparently it couldn't find the old versions in the repo. I
started downloading the .debs to install the old versions manually but
realised it would be quicker to just uninstall foreman, we had just
commissioned a bunch of servers, and more arriving all the time, so I
really had to just get a move on.

Honestly, if it hadn't been a Debian-based system, say CentOS, I'd have
been a LOT more cautious about the 8upgrade but I've got so used to things
just not breaking in stable (last time anything like that bit me was when
someone decided to apply a 'security' patch to sudo).

When I have some breathing room I'll do some more tests with the newer
version of foreman.




On 16 October 2013 20:02, Greg Sutcliffe  wrote:

> On 16 October 2013 11:48, Steve Wray  wrote:
>
>> Sure, I'm using this repository
>>
>> deb http://deb.theforeman.org/ precise stable
>>
>> it looks as if the upgrade didn't make the required changes to the
>> database, or something like that. I dropped the db and recreated it and the
>> error about the missing column went away but still couldn't enroll new
>> nodes.
>>
>
> Firstly, as the deb package maintainer for Foreman, I'm sorry you had
> issues. Thanks also for the bug report - we've just tracked down and fixed
> an issue which specifically affects sqlite3 upgrades (I'm not sure if you
> are on sqlite3, but your symptoms fit, I think). 1.3.0-2 is now in the repo
> with the fix.
>
> With regards to upgrades not breaking things, I agree. We spent some time
> discussing the state of the Debian Foreman repo a few weeks ago[1] and one
> outcome of that was that we would create a repo for each major version (eg
> http://deb.theforeman.org/ precise 1.2) and that 'stable' would track the
> latest release. This was done, and as 1.3 was released on Monday, 'stable'
> now points to 1.3. The 1.2 repo allows people who wish to be conservative
> to lock themselves to a particular release.
>
> An unavoidable side-effect of this is that since we only had "stable"
> before, everyone is currently using it. I accept we could have done a
> better job of publicising the existence of the 1.2 repo before 1.3 came out
> though. I've just sent a mail to our users and announce lists to make
> people more aware of the new repos.
>
> Once again, apologies for your troubles, and thanks for the feedback.
>
> Greg
> [1]https://groups.google.com/d/msg/foreman-dev/76A7LmuPzLM/O8ob4aEX3VAJ
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/Dfgwz8bPYvY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Steve Wray
Sure, I'm using this repository

deb http://deb.theforeman.org/ precise stable

I upgraded from 
foreman-postgresql 1.2.3+debian1
foreman 1.2.3+debian1
foreman-proxy 1.2.1+ubuntu1
foreman-installer 1.2.1-debian1

to
foreman-postgresql 1.3.0-1
foreman 1.3.0-1
foreman-proxy 1.3.0-1
foreman-installer 1.3.0-1

it looks as if the upgrade didn't make the required changes to the 
database, or something like that. I dropped the db and recreated it and the 
error about the missing column went away but still couldn't enroll new 
nodes. 

I urgently needed to make this work so I just ripped out foreman. I didn't 
have time to research the issue further or try to fix foreman.



On Wednesday, 16 October 2013 17:24:46 UTC+8, ohad wrote:
>
>
>
>
> On Wed, Oct 16, 2013 at 11:07 AM, Steve Wray 
> > wrote:
>
>> It turned out that there was an update to the foreman package which 
>> completely broke Puppets ability to enroll new nodes.
>>
>> Call me old fashioned, I've been a Debian sysadmin for over 10 years, but 
>> on a 'stable' system an apt-get upgrade is not supposed to break things. 
>> Thats one of the things Debian is famous for. Just so happens my server is 
>> running Ubuntu server 'long term support' version and I expected something 
>> similar there.
>>
>>
> Would you mind sharing information about which version did you upgrade 
> from <-> to ?
>
> we take releases very seriously (usually 4 RC with full packages) before 
> rolling out an upgrade, I'm sorry it didn't work for you this time.
>
> Ohad
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Steve Wray
Yes, I know. At first I didn't anticipate that it was a foreman issue. 

To be honest I've found foremans usefulness marginal at best and its 
performance hit on the Puppet master server quite significant, so I'm not 
inclined to pursue it further.

On Wednesday, 16 October 2013 17:26:33 UTC+8, Andreas Ntaflos wrote:
>
> On 2013-10-16 10:07, Steve Wray wrote: 
> > It turned out that there was an update to the foreman package which 
> > completely broke Puppets ability to enroll new nodes. 
> > 
> > Call me old fashioned, I've been a Debian sysadmin for over 10 years, 
> > but on a 'stable' system an apt-get upgrade is not supposed to break 
> > things. Thats one of the things Debian is famous for. Just so happens my 
> > server is running Ubuntu server 'long term support' version and I 
> > expected something similar there. 
> > 
> > I've spent some time now ripping Foreman out. Its too unreliable and I 
> > don't think the benefits outweigh the costs. Puppet *without* foreman is 
> > just fine. 
> > 
> > Bye bye, foreman, I'll hardly miss you. 
>
> You are complaining on the wrong mailing list. If you have feedback for 
> the Foreman developers please head over to 
> https://groups.google.com/forum/#!forum/foreman-users and bring the 
> topic up there. 
>
> Andreas 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Steve Wray
It turned out that there was an update to the foreman package which 
completely broke Puppets ability to enroll new nodes.

Call me old fashioned, I've been a Debian sysadmin for over 10 years, but 
on a 'stable' system an apt-get upgrade is not supposed to break things. 
Thats one of the things Debian is famous for. Just so happens my server is 
running Ubuntu server 'long term support' version and I expected something 
similar there.

I've spent some time now ripping Foreman out. Its too unreliable and I 
don't think the benefits outweigh the costs. Puppet *without* foreman is 
just fine.

Bye bye, foreman, I'll hardly miss you.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: puppetdb, foreman, one particular node has a problem

2013-10-16 Thread Steve Wray
I just realised that between now and then there was a foreman upgrade which 
has basically broken my ability to enroll new nodes.

Great. Thanks package maintainer.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] puppetdb, foreman, one particular node has a problem

2013-10-15 Thread Steve Wray
I have about 75 nodes now and recently added 6 of them. They are all 
running Debian squeeze and all have exactly the same Puppet packages. One 
is giving an error when I try to enroll it:

Failed to import facts: PG::UndefinedColumn: ERROR:  column "environment" 
of relation "hosts" does not exist
LINE 1: ...d", "created_at", "disk", "domain_id", "enabled", "environme...

: INSERT INTO "hosts" ("architecture_id", "build", "certname", "comment", 
"compute_resource_id", "created_at", "disk", "domain_id", "enabled", 
"environment", 
"environment_id", "hostgroup_id", "image_file", "image_id", "installed_at", 
"ip", "last_compile", "last_freshcheck", "last_report", "location_id", 
"mac", "managed", "medium_id", "model_id", "name", "operatingsystem_id", 
"organization_id", "owner_id", "owner_type", "ptable_id", "puppet_ca_proxy_id", 
"puppet_proxy_id","puppet_status", "root_pass", "serial", "source_file_id", 
"subnet_id", "type", "updated_at", "use_image", "uuid") VALUES ($1, $2, $3, 
$4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, 
$20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, 
$35, $36, $37, $38, $39, $40, $41) RETURNING "id"
  Rendered text template (0.0ms)

theres nothing special about this node and other enrollments I've done 
today have been fine. Exactly the same environments, same packages, same 
everything. Whats different?





-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: getting array of hostnames of clients

2013-09-11 Thread Steve Wray
On Wednesday, 11 September 2013 22:50:59 UTC+8, jcbollinger wrote:

>
>
> On Wednesday, September 11, 2013 2:49:50 AM UTC-5, Steve Wray wrote:
>>
>> I need to get an array of hostnames of clients of the puppet server.
>>
>> There doesn't seem to be a simple way to do this so I've tried a few 
>> methods.
>>
>> I've tried a curl expression in a fact like this:
>>
>> curl -s -k -H "Accept: yaml" 
>> https://localhost:8140/production/facts_search/search?facts.nodetypet=testnodes
>>
>>
>
> In other words, this is intended to retrieve the desired information via 
> the master's REST API.  I'm not quite making the connection here, however: 
> how is putting that expression into a fact supposed to achieve your result?
>

It was returning a list of hostnames of nodes before I started using 
puppetdb, but only on the puppetmaster itself.
 

Do you mean you have a custom fact that executes that command and parses 
> the YAML result to produce the desired array?  That seems odd, because in 
> that case 'localhost' probably would not resolve to the correct machine (it 
> would be the client, not the master), and because the result is not a 
> property of the node.
>

Yes on the puppetmaster of course.
 

> Now, this used to work but doesn't any more. Between it working and now 
>> I've changed to using puppetdb. I'm not sure if theres a connection.
>>
>> The error returned is:
>>
>> Caught NoMethodError: undefined method `<<' for nil:NilClass
>>
>
>
> There could be a connection.  I have lately seen some evidence that 
> puppetdb may not reliably escape fact values when it stores them.  That 
> would be a serious flaw, but I cannot confirm its existence.
>
> Alternatively, if you have also updated your master, then it may be that 
> the data returned by the REST call has changed in form or content.  Do you 
> get what you expect if you run it from the command line?
>

I get the error when I run it from the commandline, after seeing it not 
work in the fact running the curl commandline was the first thing I tried.
 
 

> The next thing I tried was to get each interesting node to create a file 
>> on the puppetmaster server. So I now have a bunch of files in /tmp/ with 
>> distinctive names which contain only the hostname of that puppet client.
>>
>
>
> Yuck.
>

Yuck indeed. But so far we haven't got any other way to get the list of 
nodes. I'm asking for a better solution.
 

> I have a fact which is supposed to cat these together and, with luck, turn 
>> them into an array at some time. What I currently have is this:
>>
>
> Facts are properties of target nodes, and their values are evaluated 
> there.  Dropping a bunch of files on the master could allow the Puppet 
> agent to collect data from them into a fact when it runs on the Puppet 
> master server, but it cannot do anything for agents running on other 
> nodes.  Do you need the information on nodes other than the master?
>

At this point in time the puppet master node will do but ultimately I need 
this list propagated to the smokeping server.

What I am trying to avoid is hard-coding the list of smokeping slaves. 
Puppet configures the slaves themselves and it should be able to get a list 
of those slaves onto the smokeping server without me having to list them 
exhaustively and manually (and keep that list up to date).

If I run facter on the commandline like this:
>> FACTERLIB="/etc/puppet/modules/smokeping_prep/lib/facts" facter  nodelist
>>
>> I get the list I expect.
>>
>
>
> On *which* command line?  You could have the fact installed on the 
> master, but not synced to clients.
>

on the commandline on the puppet master of course, otherwise the FACTERLIB 
path wouldn't make any sense. The fact is being read on the puppet master 
node and supposedly going into that file but it isn't. 

I did say "On the puppetmaster node definition I have this:" and then the 
code thats supposed to put the fact into a file.
 

>
>1. You are collecting the Files only on the master, therefore only the 
>master's $::nodelist fact could provide the information you want.
>
>
Yes thats right. But it doesn't.
 

>
>1. Facts are evaluated before catalog compilation, therefore even the 
>master's $::nodelist fact would be perpetually one cycle behind.
>
> I don't think thats a problem.

 

> So, sorry, but I have three questions:
>>
>> 1. why isn't that curl getting the facts? Why is it getting this NoMethod 
>> error?
>>
>
>
> Beats me.  It might help for you to explain more fu

[Puppet Users] getting array of hostnames of clients

2013-09-11 Thread Steve Wray
I need to get an array of hostnames of clients of the puppet server.

There doesn't seem to be a simple way to do this so I've tried a few 
methods.

I've tried a curl expression in a fact like this:

curl -s -k -H "Accept: yaml" 
https://localhost:8140/production/facts_search/search?facts.nodetypet=testnodes

where I've got a nodetype fact which works fine for me.

Now, this used to work but doesn't any more. Between it working and now 
I've changed to using puppetdb. I'm not sure if theres a connection.

The error returned is:

Caught NoMethodError: undefined method `<<' for nil:NilClass

The next thing I tried was to get each interesting node to create a file on 
the puppetmaster server. So I now have a bunch of files in /tmp/ with 
distinctive names which contain only the hostname of that puppet client.

I have a fact which is supposed to cat these together and, with luck, turn 
them into an array at some time. What I currently have is this:

require 'facter'
Facter.add("nodelist") do
  setcode do
path="/tmp"
if File.exists?(path) && File.directory?(path) && ! Dir[path + 
'/*'].empty?
output = Facter::Util::Resolution.exec("/bin/cat 
/tmp/testnode*").split('\n').join(',')
else
  output = "empty"
end
output
  end
end

but this isn't getting anything in the fact at all, not even "empty". 
Running that cat command on the commandline returns exactly what I would 
expect.

If I run facter on the commandline like this:
FACTERLIB="/etc/puppet/modules/smokeping_prep/lib/facts" facter  nodelist

I get the list I expect.

On each node I have this:
  @@file { "testnode-{$::fqdn}":
ensure => file,
path => "/tmp/testnode-$::fqdn.txt",
mode => 640, owner => root,
tag => 'testnodes',
content => "$::hostname
",
  }

On the puppetmaster node definition I have this:
  File <<| tag == "testnodes" |>>

  file { 'nodelist':
path => '/tmp/nodelist',
content => "
$::nodelist
"
}
}

and I was expecting a file /tmp/nodelist to contain the text from the fact 
$::nodelist but the file is empty.


So, sorry, but I have three questions:

1. why isn't that curl getting the facts? Why is it getting this NoMethod 
error?
2. why isn't that new nodelist fact working? If a fact has an error where 
does this get logged?
3. Is there an easier way to do what I want? An array of hostnames of 
clients matching a fact which I can then pass to other Puppet commands. On 
the face of it I'd think this was something many people would want to do. 
In my case I want to generate a list of Smokeping slaves as a parameter for 
Puppet-generated Smokeping targets. Ie Puppet already generates configs for 
the targets and the slaves and I want to populate the target config with a 
set of slaves.

 facter --version
1.7.2

puppet --version
3.2.4


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] where do I configure 'max pool size'?

2013-07-13 Thread Steve Wray
Jul 14 02:36:51 puppet puppet-master[9566]: could not obtain a database 
connection within 5 seconds.  The max pool size is currently 5; consider 
increasing it.
Jul 14 02:37:14  puppet-master[9566]: last message repeated 12 times

MySQL is configured for 300 connections. I have 72 hosts managed with 
Puppet. I don't think the error message is about the MySQL configuration, I 
think theres an undocumented Puppet configuration.

On Sunday, 14 July 2013 01:26:48 UTC+8, Ramin K wrote:
>
> On 7/13/2013 8:18 AM, Steve Wray wrote: 
> > Getting this error; 
> > The max pool size is currently 5; consider increasing it 
> > 
> > using MySQL. 
> > 
> > Surprisingly, I haven't been able to find exactly where I make the 
> > configuration change that Puppet suggests. 
> > 
> > Any clues? 
>
> Where is the error coming from? Also paste the full text of the error. 
> Not nearly enough information here to even suggest what to do next. 
>
> Ramin 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] where do I configure 'max pool size'?

2013-07-13 Thread Steve Wray
Getting this error;
The max pool size is currently 5; consider increasing it

using MySQL.

Surprisingly, I haven't been able to find exactly where I make the 
configuration change that Puppet suggests.

Any clues?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] 0.25.2 available via git?

2010-01-12 Thread Steve Wray

Nigel Kersten wrote:

And I just noticed that 0.25.3 is out, so you should be using that if possible.


Thanks for the help, its been great.

I'm trying to figure out what I should do if I have followed the 
instructions enclosed for 0.25.2 and then wanted to continue with 0.25.3.


As it stands, when I used the command:

git checkout -b upstream 0.25.3

it told me that there was already an 'upstream' branch.

What I actually did was I just deleted the puppet directory and worked 
through it from scratch with 0.25.3 instead of 0.25.2, just to get things 
moving.


This is really a git question so, understandably, not sending it to the list :)







On Tue, Jan 12, 2010 at 9:34 AM, Nigel Kersten  wrote:

On Mon, Jan 11, 2010 at 2:29 PM, Silviu Paragina  wrote:

When you apt-get source the package you get a few files. A tar.gz (bz2 not
sure), a diff, and few more (not interesting for this problem). The tar one
is the original source code, the diff is the difference from the debian
package (including the debian dir). So all you need to do is apply that
patch. If the gap between 0.25.1 0.25.2 isn't that big it should work. ;)

It should be simpler to use git-buildpackage.

# apt-get install git-buildpackage
$ git clone git://git.debian.org/git/pkg-puppet/puppet.git
$ cd puppet
$ git remote add reductive git://github.com/reductivelabs/puppet.git
$ git remote update
$ git checkout -b upstream 0.25.2
$ git checkout master
$ dch -i
add something like:

--
puppet (0.25.2-1) unstable; urgency=low

 * 0.25.2 internal release

 -- Nigel Kersten   Tue, 12 Jan 2010 09:29:49 -0800
--
(at least bump the version to 0.25.2, you should probably suffix it
with an internal ~mycorp or something to distinguish it from real
upstream builds or whatever your internal processes are)

$ git add debian/changelog
$ git commit -m "0.25.2 changelog update"
$ git-buildpackage

That should result in a 0.25.2 deb in the parent directory.

The advantage of doing it this way is that you can pull in *any*
puppet git branch as "upstream". If you're more familiar with
git-buildpackage, you can point it at any git branch as upstream, but
this seemed a simpler path to follow.





Silviu

Steve Wray wrote:

James Turnbull wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/01/10 6:57 AM, Steve Wray wrote:

Hi there

I'd like to build packages of 0.25.2 for Debian but I'm finding that the
git repositories are still on 0.25.1

I am not sure how that's happening because they aren't. :)


I'm not sure of how I should get 0.25.2 from git.

At the moment I'm using the commandline:

git clone git://github.com/reductivelabs/puppet

$ git clone git://github.com/reductivelabs/puppet.git
$ cd puppet
$ git branch --track 0.25.x origin/0.25.x
$ git checkout 0.25.x

$ cat lib/puppet.rb | grep 'PUPPET'
PUPPETVERSION = '0.25.2'

Regards

Thanks, and yes I actually figured that part out myself :)

The problem is that I want to be able to use git-buildpackage, and the
reductive labs version doesn't have the debian subdirectory.

Its ok though, I understand that this is moving along and will probably be
all fine later this week.





James Turnbull

- -- Author of:
* Pro Linux System Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBS0uZ9iFa/lDkFHAyAQL+0wgAxwPKiE5rV73VRONgY6dexx5cab7s4CWX
cDVHWEyfoAYl1ndyLTbYtu9ng+W2k9VqviUJHH2/5Jc2sVMmYrO7YweuTCvAdIMy
MwCNf8uO6FF8WqNG0qw69Sz+N129noUqsOmc8k+V0y8CZy6QjVLWoJnUOL2SB/rC
Mhtto8d9yixtiPL0lYLfbx5M16jyUJ3VS8od6aeCHbxbzmvTGIkfLJBXyorTZZdI
Ixr6AtBl3CCOWBHVq6CN+rytY8Ee3CSgeaTIawD/B8jKNth5bgqlj23klPogB5J8
6wxC3qvsR7TfJqJVQjZoHwkfbMipoQSPL9CtJtNx9tqQ/xdNUAzvXQ==
=Dhix
-END PGP SIGNATURE-





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







--
nigel








--
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.


If you need to send confidential information in an email you need to use 
e

Re: [Puppet Users] 0.25.2 available via git?

2010-01-11 Thread Steve Wray

James Turnbull wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/01/10 6:57 AM, Steve Wray wrote:

Hi there

I'd like to build packages of 0.25.2 for Debian but I'm finding that the 
git repositories are still on 0.25.1


I am not sure how that's happening because they aren't. :)


I'm not sure of how I should get 0.25.2 from git.

At the moment I'm using the commandline:

git clone git://github.com/reductivelabs/puppet


$ git clone git://github.com/reductivelabs/puppet.git
$ cd puppet
$ git branch --track 0.25.x origin/0.25.x
$ git checkout 0.25.x

$ cat lib/puppet.rb | grep 'PUPPET'
PUPPETVERSION = '0.25.2'

Regards


Thanks, and yes I actually figured that part out myself :)

The problem is that I want to be able to use git-buildpackage, and the 
reductive labs version doesn't have the debian subdirectory.


Its ok though, I understand that this is moving along and will probably be 
all fine later this week.







James Turnbull

- -- 
Author of:

* Pro Linux System Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBS0uZ9iFa/lDkFHAyAQL+0wgAxwPKiE5rV73VRONgY6dexx5cab7s4CWX
cDVHWEyfoAYl1ndyLTbYtu9ng+W2k9VqviUJHH2/5Jc2sVMmYrO7YweuTCvAdIMy
MwCNf8uO6FF8WqNG0qw69Sz+N129noUqsOmc8k+V0y8CZy6QjVLWoJnUOL2SB/rC
Mhtto8d9yixtiPL0lYLfbx5M16jyUJ3VS8od6aeCHbxbzmvTGIkfLJBXyorTZZdI
Ixr6AtBl3CCOWBHVq6CN+rytY8Ee3CSgeaTIawD/B8jKNth5bgqlj23klPogB5J8
6wxC3qvsR7TfJqJVQjZoHwkfbMipoQSPL9CtJtNx9tqQ/xdNUAzvXQ==
=Dhix
-END PGP SIGNATURE-




--
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.


If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.
-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] 0.25.2 available via git?

2010-01-11 Thread Steve Wray

Hi there

I'd like to build packages of 0.25.2 for Debian but I'm finding that the 
git repositories are still on 0.25.1


I'm not sure of how I should get 0.25.2 from git.

At the moment I'm using the commandline:

git clone git://github.com/reductivelabs/puppet

Please advise

Thanks!


--
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.


If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.
-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] puppet packaging in Debian

2010-01-07 Thread Steve Wray

Quoting Nigel Kersten :


On Wed, Jan 6, 2010 at 6:16 PM, Steve Wray  wrote:

Hi there

I am about to embark on a project to implement puppet for server management
and I'm noticing that the version currently in Debian testing is 0.25.1-3
while the latest stable version is 0.25.2

I'm not seeing any indication on the Debian project page about 0.25.2 so I
thought I'd check here to see if anyone knew if 0.25.2 is going to be
packaged for Debian anytime soon? If it is soon then I'll just hold off for
a bit.


Hi Steve.

Normally we'd have the 0.25.2 package done by now, but two of us who
work here are really flat out with work things at the moment, and so
we've slipped.  I'm planning to email the other maintainers tonight to
see if anyone has spare cycles to help out.

Are you familiar with git-buildpackage ? You can always use it to
produce your own debs by pointing to the reductivelabs git repo as the
"upstream" branch, I may have even pasted more detailed instructions
to the list in the past.


I've gotten started on this and hit a few problems:

1. git-buildpackage bailed when it wanted someone elses secret key. I  
did a 'debchange -i' and added myself, generated keys and ran it  
again. Had to tell git-buildpackage to ignore the fact that I'd  
changed things and not committed them. This seems a bit odd.


2. When I finally did get it to build a package I found it was 0.25.1

I've tried two git repositories and both give me 0.25.1, these are:

git clone git://github.com/reductivelabs/puppet

git clone git://git.debian.org/pkg-puppet/puppet.git









I'm referring to:

http://packages.debian.org/search?searchon=sourcenames&keywords=puppet

and

http://packages.qa.debian.org/p/puppet.html


Thanks!


--
Please remember that an email is just like a postcard; it is not
confidential nor private nor secure and can be read by many other people
than the intended recipient. A postcard can be read by anyone at the mail
sorting office and expecting what is written on it to be private and secret
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use
encryption. PGP is Pretty good for this.

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








--
nigel





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




[Puppet Users] puppet packaging in Debian

2010-01-06 Thread Steve Wray

Hi there

I am about to embark on a project to implement puppet for server management 
and I'm noticing that the version currently in Debian testing is 0.25.1-3 
while the latest stable version is 0.25.2


I'm not seeing any indication on the Debian project page about 0.25.2 so I 
thought I'd check here to see if anyone knew if 0.25.2 is going to be 
packaged for Debian anytime soon? If it is soon then I'll just hold off for 
a bit.



I'm referring to:

http://packages.debian.org/search?searchon=sourcenames&keywords=puppet

and

http://packages.qa.debian.org/p/puppet.html


Thanks!


--
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.


If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.
-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] Reductive Labs people

2009-12-03 Thread Steve Wray
Luke Kanies wrote:
> Hi all,
> 
> I've been hesitant to send Reductive Labs updates to the community  
> lists, but I've been told that not knowing who works for us makes some  
> communication difficult.
> 
[snip]
> Rein started out in the design world but quickly discovered an  
> affinity for development. He's fond of talking to people about
> patterns and practices and other ideas that can help write better  
> software. He occasionally writes software of his own in an attempt to
> put those practices into practice, so to speak. Rein is most fond of  
> Ruby, but has found endearing qualities in a number of languages, from
> Haskell to Smalltalk to Intercal, and even Perl, and enjoys the new  
> perspective he gains by learning an unfamiliar language.


Does this mean we will get Intercal support in Puppet soon?

Perhaps Intercal could ultimately replace Ruby?

I hear that Intercal is destined to be the language of choice for Quantum 
Computing, having advanced non-deterministic/spooky-action-at-a-distance 
features such as 'comefrom' instead of 'goto'.

;)

--

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




[Puppet Users] nagios? naginator?

2009-08-10 Thread Steve Wray

Hi there

I was reading the type reference, which seems to be autogenerated. It seems 
current (last generated on Mon Mar 30 02:57:00 + 2009)

It mentions some types for supporting nagios.

If I recall correctly, from last time I tried to use this feature, it 
wasn't producing nagios configurations that actually worked in the current 
nagios release.

We are now on nagios 3.0.6

I'd like to know whether the current nagios code in puppet is working well now?

Thanks!


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: puppet ignoring /etc/hosts?

2009-08-10 Thread Steve Wray

jcbollinger wrote:
> 
> 
> On Aug 6, 9:03 pm, Steve Wray  wrote:
>> Steve Wray wrote:
> 
> [...]
> 
>>> something seems wrong...
>>> This is all running under Debian Lenny.
>>> r...@tec-lb1:/etc# puppetd --version
>>> dnsdomainname: Unknown host
>>> 0.24.5
>> I just got the lenny-backport package.
>>
>> Same problem:
>>
>> r...@tec-lb1:/etc/apt# puppetd --version
>> dnsdomainname: Unknown host
>> 0.24.8
>>
>>
>>
>>> So.. from the 'dnsdomainname' ref there, it would seem to my untrained eye
>>> that despite my best efforts in nsswitch.conf and host.conf, puppet is
>>> trying DNS anyway...?
> 
> Try running the dnsdomainname program (or hostname --fqdn) from a
> shell.  I'd bet dollars to donuts that it gives you the same message.
> If it does, then this is not a Puppet issue: it means that the system
> resolver cannot resolve the system's own host name.  I get similar
> behavior with my puppet clients that acquire their hostname and IP
> address via DHCP.
> 
> The diagnostic message is issued by facter (which you can test by
> running facter directly from a shell prompt), and it is non-fatal, at
> least for me.  The effect on Puppet is simply that the 'dnsdomainname'
> fact will not be available for the node.

Ah well

It turned out that although the message was displaying on the *client* it 
was coming from the *server*.

The server had a slightly incorrect /etc/hosts file.

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



[Puppet Users] Re: puppet ignoring /etc/hosts?

2009-08-06 Thread Steve Wray

Steve Wray wrote:
> Hi there,
> 
> I have a small isolated group of servers. I don't want to set up DNS 
> infrastructure for this.
> 
> I have an /etc/hosts file that looks like:
> 
> 
> 127.0.0.1   localhost.localdomain localhost
> 192.168.50.70   tec-puppet.tec.cwa.co.nztec-puppet
> 
> 
> I can ping tec-puppet fine:
> 
> r...@tec-lb1:/etc# ping tec-puppet
> PING tec-puppet.tec.cwa.co.nz (192.168.50.70) 56(84) bytes of data.
> 64 bytes from tec-puppet.tec.cwa.co.nz (192.168.50.70): icmp_seq=1 ttl=64 
> time=0.077 ms
> 
> I can ping the FQDN just fine:
> 
> r...@tec-lb1:/etc# ping tec-puppet.tec.cwa.co.nz
> PING tec-puppet.tec.cwa.co.nz (192.168.50.70) 56(84) bytes of data.
> 64 bytes from tec-puppet.tec.cwa.co.nz (192.168.50.70): icmp_seq=1 ttl=64 
> time=0.068 ms
> 
> I have this in /etc/puppet/puppet.conf:
> 
> 
> [puppetd]
> server=tec-puppet.tec.cwa.co.nz
> runinterval=300
> 
> 
> I have this in /etc/nsswitch.conf:
> 
> 
> hosts: files
> networks:   files
> 
> 
> and this in /etc/host.conf:
> 
> 
> order hosts
> 
> 
> They do have an /etc/resolv.conf file and they should (and normally do) use 
> DNS for queries outside their little world; I just made these nsswitch.conf 
> and host.conf refer exclusively to /etc/hosts files in order to prove that 
> something seems to be ignoring the resolver library configuration.
> 
> 
> When I run puppetd -vt I get:
> 
> 
> dnsdomainname: Unknown host
> 
> 
> something seems wrong...
> 
> This is all running under Debian Lenny.
> 
> r...@tec-lb1:/etc# puppetd --version
> dnsdomainname: Unknown host
> 0.24.5

I just got the lenny-backport package.

Same problem:

r...@tec-lb1:/etc/apt# puppetd --version
dnsdomainname: Unknown host
0.24.8



> 
> So.. from the 'dnsdomainname' ref there, it would seem to my untrained eye 
> that despite my best efforts in nsswitch.conf and host.conf, puppet is 
> trying DNS anyway...?
> 
> 
> 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] puppet ignoring /etc/hosts?

2009-08-06 Thread Steve Wray

Hi there,

I have a small isolated group of servers. I don't want to set up DNS 
infrastructure for this.

I have an /etc/hosts file that looks like:


127.0.0.1   localhost.localdomain localhost
192.168.50.70   tec-puppet.tec.cwa.co.nztec-puppet


I can ping tec-puppet fine:

r...@tec-lb1:/etc# ping tec-puppet
PING tec-puppet.tec.cwa.co.nz (192.168.50.70) 56(84) bytes of data.
64 bytes from tec-puppet.tec.cwa.co.nz (192.168.50.70): icmp_seq=1 ttl=64 
time=0.077 ms

I can ping the FQDN just fine:

r...@tec-lb1:/etc# ping tec-puppet.tec.cwa.co.nz
PING tec-puppet.tec.cwa.co.nz (192.168.50.70) 56(84) bytes of data.
64 bytes from tec-puppet.tec.cwa.co.nz (192.168.50.70): icmp_seq=1 ttl=64 
time=0.068 ms

I have this in /etc/puppet/puppet.conf:


[puppetd]
server=tec-puppet.tec.cwa.co.nz
runinterval=300


I have this in /etc/nsswitch.conf:


hosts: files
networks:   files


and this in /etc/host.conf:


order hosts


They do have an /etc/resolv.conf file and they should (and normally do) use 
DNS for queries outside their little world; I just made these nsswitch.conf 
and host.conf refer exclusively to /etc/hosts files in order to prove that 
something seems to be ignoring the resolver library configuration.


When I run puppetd -vt I get:


dnsdomainname: Unknown host


something seems wrong...

This is all running under Debian Lenny.

r...@tec-lb1:/etc# puppetd --version
dnsdomainname: Unknown host
0.24.5

So.. from the 'dnsdomainname' ref there, it would seem to my untrained eye 
that despite my best efforts in nsswitch.conf and host.conf, puppet is 
trying DNS anyway...?



-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] reducing logging

2009-05-04 Thread Steve Wray

Hi there,

I'd like to reduce log traffic by stopping entries such as:

Starting configuration run

Finished configuration run in 1.23 seconds

What is the appropriate config option to disable this?

Thanks!



-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: strange log messages...

2009-03-17 Thread Steve Wray

Nigel Kersten wrote:
> On Tue, Mar 17, 2009 at 12:48 PM, Steve Wray  wrote:
>> Nigel Kersten wrote:
>>> On Mon, Mar 16, 2009 at 12:44 PM, Steve Wray  wrote:
>>>> I'm seeing these errors on many servers:
>>>>
>>>> Could not run Puppet::Client::MasterClient: undefined method `-' for
>>>> #
>>>>
>>>>
>>>> This does not seem to happen when puppetd -vt is run manually. It shows
>>>> every half an hour or so.
>>>>
>>>> Any ideas?
>>> It doesn't happen with -t because that ignores the cache.
>>>
>>> This was a bug fixed upstream.
>> Is there a workaround, any way to get the automatic runs ignore the cache?
>>
>> I'm not in a position to upgrade puppet at this time on these servers...
> 
> It's a tiny patch on the server. It's going to be by far the easiest
> way to resolve this, unless you modify all your clients to ignore the
> cache.

If you mean the patch at
http://github.com/nigelkersten/puppetmaster/commit/65ce150b04e46cfb572d9d2682bf5d9a3b37da68
which is referred to at http://projects.reductivelabs.com/issues/show/1551
then its a broken link :(


>>
>>
>>> http://projects.reductivelabs.com/issues/show/1551
>>>
>>> What version is your server on? This was fixed in 0.24.6 I believe.
>>>
>>
>> --
>> Please remember that an email is just like a postcard; it is not
>> confidential nor private nor secure and can be read by many other people
>> than the intended recipient. A postcard can be read by anyone at the mail
>> sorting office and expecting what is written on it to be private and secret
>> is not realistic. Please hold no higher expectation of email.
>>
>> If you need to send confidential information in an email you need to use
>> encryption. PGP is Pretty good for this.
>>
> 
> 
> 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: strange log messages...

2009-03-17 Thread Steve Wray

Nigel Kersten wrote:
> On Mon, Mar 16, 2009 at 12:44 PM, Steve Wray  wrote:
>> I'm seeing these errors on many servers:
>>
>> Could not run Puppet::Client::MasterClient: undefined method `-' for
>> #
>>
>>
>> This does not seem to happen when puppetd -vt is run manually. It shows
>> every half an hour or so.
>>
>> Any ideas?
> 
> It doesn't happen with -t because that ignores the cache.
> 
> This was a bug fixed upstream.

Is there a workaround, any way to get the automatic runs ignore the cache?

I'm not in a position to upgrade puppet at this time on these servers...



> http://projects.reductivelabs.com/issues/show/1551
> 
> What version is your server on? This was fixed in 0.24.6 I believe.
> 
> > 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] strange log messages...

2009-03-16 Thread Steve Wray

I'm seeing these errors on many servers:

Could not run Puppet::Client::MasterClient: undefined method `-' for 
#


This does not seem to happen when puppetd -vt is run manually. It shows 
every half an hour or so.

Any ideas?

Thanks!


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: More fun with conditionals and structure...

2009-03-15 Thread Steve Wray

Peter Meier wrote:
> Hi
> 
>> Any comment or advice? Is this going to do something unexpected?
> 
> looks fine to me. But didn't test it. You can put into a file and test
> it with:
> 
> puppet --parseonly foo.pp
> for any syntax problems.

I am more concerned about logic problems :)

Syntax problems are easy to spot!



-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: More fun with conditionals and structure...

2009-03-15 Thread Steve Wray

Peter Meier wrote:
> Hi
> 
>> Ok well, of neccessity, I am running in a mixed environment.
> 
> I can understand that, on the otherside I would recommend to run a
> unique puppet environment and the custom packaging time you have to do
> for that is really worth the time.

Thats the objective.

In order to converge on uniformity it will be nice to have puppets help...
but in order to get puppet to help I have to get it to help in a diverse 
environment. Catch 22 kind of.

I came up with this but I'm not really sure how correct it is:

   package { ntp-simple:
 ensure => $lsbdistcodename? {
   'sarge' => present,
   default =>
   $virtual? {
 'xenu' => absent,
 'xen0' => present,
 'openvz' => absent,
 'physical' => present,
 default => present
   }
 }

Any comment or advice? Is this going to do something unexpected?



>> Is there a nice way to get what I am trying to achieve in a mixed 
>> environment?
>>
>> Ie: a conditional with boolean conditionals ie something logically 
>> equivalent of:
>>
>> "if (a or b) then c"
> 
> with ugly statements: yes, with nice statements: not that I know. These
> new language features are exactly for that. :) I'm currently happily
> getting rid of these ugly statements.
> 
> cheers pete
> 
> > 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: More fun with conditionals and structure...

2009-03-15 Thread Steve Wray

Peter Meier wrote:
> Hi
> 
>> Thats odd, last week I had thought this was working, now monday morning is 
>> here and I get:
>>
>> err: Could not retrieve configuration: Could not parse for environment 
>> production: Syntax error at '('; expected ')' at 
>> /etc/puppet/manifests/classes/local_services.pp:12
>>
>> It looks as if theres something wrong with the conditional still
> 
> 
> this error tells me that you aren't running on 0.24.6, as I get the same
> with 0.24.5 but not on 0.24.7 .
> 
> Please note that:
> http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#if-else
> mentions that such more complex boolean expressions are only support >=
> 0.24.6

Ok well, of neccessity, I am running in a mixed environment.

Is there a nice way to get what I am trying to achieve in a mixed environment?

Ie: a conditional with boolean conditionals ie something logically 
equivalent of:

"if (a or b) then c"



> 
> cheers pete
> 
> > 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: More fun with conditionals and structure...

2009-03-15 Thread Steve Wray

Joshua Anderson wrote:
> Case statements don't work inside of resource definitions. There are  
> three ways I can think of do what you're doing:
> 
> 1. Use multiple inline selectors. (Very long and ugly.)
> 2. Write four different definitions of the NTP service and wrap them  
> in a case statement (Not as long, but still ugly.)
> 3. Use if statements to set some variables, then use those in a single  
> NTP service definition. (Shorter, maybe less ugly.)
> 
> Here's an example of number 3:
> 
> case $lsbdistcodename {
>"sarge": {
>  $ntp = "ntp-server"
>}
>default: {
>  $ntp = "ntp"
>}
> }
> 
> if ($virtual == "physical") or ($virtual == "xen0") {
>$ntp_enable = "true"
>$ntp_ensure = "running"
> }
> 
> if ($virtual == "xenu") or ($virtual == "openvz") {
>$ntp_enable = "false"
>$ntp_ensure = "stopped"
> }
> 
> service { $ntp:
>ensure => $ntp_ensure,
>enable => $ntp_enable,
>pattern => "ntpd"
> }


Thats odd, last week I had thought this was working, now monday morning is 
here and I get:

err: Could not retrieve configuration: Could not parse for environment 
production: Syntax error at '('; expected ')' at 
/etc/puppet/manifests/classes/local_services.pp:12

It looks as if theres something wrong with the conditional still


My code looks like this, which is same as yours but in a class:

class local_services {

   case $lsbdistcodename {
 "sarge": {
   $ntp = "ntp-server"
 }
 default: {
   $ntp = "ntp"
 }
   }

   if ($virtual == "physical") or ($virtual == "xen0") {
 $ntp_enable = "true"
 $ntp_ensure = "running"
   }

   if ($virtual == "xenu") or ($virtual == "openvz") {
 $ntp_enable = "false"
 $ntp_ensure = "stopped"
   }

   service { $ntp:
 ensure => $ntp_ensure,
 enable => $ntp_enable,
 pattern => "ntpd"
   }

}

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



[Puppet Users] Re: More fun with conditionals and structure...

2009-03-09 Thread Steve Wray

Joshua Anderson wrote:
> Case statements don't work inside of resource definitions. There are  
> three ways I can think of do what you're doing:
> 
> 1. Use multiple inline selectors. (Very long and ugly.)
> 2. Write four different definitions of the NTP service and wrap them  
> in a case statement (Not as long, but still ugly.)
> 3. Use if statements to set some variables, then use those in a single  
> NTP service definition. (Shorter, maybe less ugly.)
> 
> Here's an example of number 3:
> 
[snip]
> 
> This isn't great, but if  you have multiple services that differ in a  
> similar fashion, you can define all the variables you need in a few  
> statements at the top of your class and have one short definition for  
> each service.


A

A lot of things in puppet now make more sense, thanks heaps!


> 
> -Josh
> 
> On Mar 9, 2009, at 4:59 PM, Steve Wray wrote:
> 
>> I want to stop ntpd on all domU and openvz virtual machines while  
>> enabling
>> it on all dom0 and physical machines.
>>
>> I've been trying to get my head around this and searched through
>> documentation and examples but cannot find anything like this so far.
>>
>> If its running Debian Sarge then the init script is /etc/init.d/ntp- 
>> server
>>
>> If its running Etch or Lenny then its /etc/init.d/ntp
>>
>> I'd thought that the "name" variable of 'service' was supposed to  
>> indicate
>> this? Or have I got my conditionals way wrong? Because the code I've
>> included doesn't seem to do anything at all. Not even a syntax  
>> error...
>>
>>
>> class services {
>>
>>   service { "ntp_service":
>>
>> name => $lsbdistcodename ? {
>>   'sarge' => "ntp-server",
>>   'etch'  => "ntp",
>>   'lenny' => "ntp",
>> },
>>
>> case $virtual {
>>   'xenu','openvz':
>> {
>>   ensure  => stopped,
>>   enable  => false,
>>   pattern => "ntpd"
>> }
>>   'xen0','physical':
>> {
>>   ensure  => running,
>>   enable  => true,
>>   pattern => "ntpd"
>> }
>> }
>>   }
>> }
>>
>> -- 
>> Please remember that an email is just like a postcard; it is not
>> confidential nor private nor secure and can be read by many other  
>> people
>> than the intended recipient. A postcard can be read by anyone at the  
>> mail
>> sorting office and expecting what is written on it to be private and  
>> secret
>> is not realistic. Please hold no higher expectation of email.
>>
>> If you need to send confidential information in an email you need to  
>> use
>> encryption. PGP is Pretty good for this.
>>
> 
> 
> > 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: More fun with conditionals and structure...

2009-03-09 Thread Steve Wray

RijilV wrote:
> 
> 2009/3/9 Steve Wray mailto:steve.w...@cwa.co.nz>>
> 
> 
> I want to stop ntpd on all domU and openvz virtual machines while
> enabling
> it on all dom0 and physical machines.
> 
> I've been trying to get my head around this and searched through
> documentation and examples but cannot find anything like this so far.
> 
> If its running Debian Sarge then the init script is
> /etc/init.d/ntp-server
> 
> If its running Etch or Lenny then its /etc/init.d/ntp
> 
> I'd thought that the "name" variable of 'service' was supposed to
> indicate
> this? Or have I got my conditionals way wrong? Because the code I've
> included doesn't seem to do anything at all. Not even a syntax error...
> 
> 
> class services {
> 
>   service { "ntp_service":
> 
> name => $lsbdistcodename ? {
>   'sarge' => "ntp-server",
>   'etch'  => "ntp",
>   'lenny' => "ntp",
> },
> 
> case $virtual {
>   'xenu','openvz':
> {
>   ensure  => stopped,
>   enable  => false,
>   pattern => "ntpd"
> }
>   'xen0','physical':
> {
>   ensure  => running,
>   enable  => true,
>   pattern => "ntpd"
> }
> }
>   }
> }
> 
> 
> 
> Kicks an error for me:
> 
> $ puppet --parseonly test.pp
> err: Could not parse for environment production: Syntax error at 'case'; 
> expected '}' at /raid/boaz/home/rijilv/test.pp:11
> 
> 
> How are you testing your manifests?

So far, by running them in puppet in a test environment.

In fact I grew suspicious that I wasn't getting any errors or anything... 
so I did some other tests.

What I did was take my code and comment out great chunks of it to see what 
would happen. So far the only thing that makes any difference is the first 
line. If I comment that out then I get errors from puppet, but nothing else 
seems to matter.


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] More fun with conditionals and structure...

2009-03-09 Thread Steve Wray

I want to stop ntpd on all domU and openvz virtual machines while enabling 
it on all dom0 and physical machines.

I've been trying to get my head around this and searched through 
documentation and examples but cannot find anything like this so far.

If its running Debian Sarge then the init script is /etc/init.d/ntp-server

If its running Etch or Lenny then its /etc/init.d/ntp

I'd thought that the "name" variable of 'service' was supposed to indicate 
this? Or have I got my conditionals way wrong? Because the code I've 
included doesn't seem to do anything at all. Not even a syntax error...


class services {

   service { "ntp_service":

 name => $lsbdistcodename ? {
   'sarge' => "ntp-server",
   'etch'  => "ntp",
   'lenny' => "ntp",
 },

 case $virtual {
   'xenu','openvz':
 {
   ensure  => stopped,
   enable  => false,
   pattern => "ntpd"
 }
   'xen0','physical':
 {
   ensure  => running,
   enable  => true,
   pattern => "ntpd"
 }
 }
   }
}

-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: conditionals?

2009-03-09 Thread Steve Wray

I have found something like this works:

   package { libc6-xen:
   ensure => $lsbdistcodename? {
 'sarge' => absent,
default =>
   $virtual? {
 'xenu' => present,
 'xen0' => present,
 'openvz' => absent,
 'physical' => absent,
 default => present
 }
 }
   }


but its so ugly I can't believe I've stumbled upon the correct way of doing 
this :)

Also, the 'package' thing... I need it to be totally ignored on sarge 
machines; as it stands when puppetd runs I get an error on sarge servers:

"No packages found matching libc6-xen.'

which is right... there is no libc6-xen on sarge.

I'm a little surprised as it seems that 'absent' actually checks whether 
the package is available at all? Or is my conditional faulty?



Steve Wray wrote:
> Avi Miller wrote:
>> Steve Wray wrote:
>>> I prefer the second one but cannot fathom why the syntax is wrong.
>> Inline syntax is a little different:
>>
>> package { ntp:
>>ensure => $lsbdistcodename ? {
>>   sarge   => present,
>>   default => absent,
>>},
>> }
>>
>> Hope that helps,
> 
> 
> How about multiple conditions? Eg if I want ntp to not be installed on 
> virtual machines unless they are running sarge?
> 
> This gets me installed if its sarge:
> 
>package { ntp-simple:
>  ensure => $lsbdistcodename? { 'sarge' => present, default => absent }
>}
> 
> This gets me installed if its xen:
>package { ntp-simple:
>  ensure => $virtual? {
> 'xenu' => present,
> 'xen0' => present,
> default => absent
>  }
>}
> 
> How do I combine these? I've tried various permutations and had no luck. 
> and I don't see any obvious examples of what I'm trying to do.
> 
> 
> > 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: custom facts not working

2009-03-09 Thread Steve Wray

Trevor Hemsley wrote:
> I think your facter version is rather old. On facter 1.5.4 (and probably
> before), as long as I have dmidecode installed, facter presents several
> variables that can be used to identify VM's without any coding.

yeah I know its kind of old. Eventually when we have converged on the 
latest stable release it'll be fine. Until then I have to work with what 
I've got.

I suspect that its a problem with the package maintainer having forgotten 
to configure facter to look in the right place, although strace seems to 
show it looking at the ruby code, it just doesn't seem to do anything 
interesting with it.


> 
> manufacturer => VMware, Inc.
> virtual => vmware
> 
> manufacturer => Xen
> virtual => physical
> 
> It appears that $virtual doesn't work on Xen :(
> 
> Steve Wray wrote:
>> FYI I've butchered this into place now by dropping my custom facts into 
>> /usr/lib/ruby/1.8/facter/
>>
>> Obviously this isn't ideal but its all I've found that works.
>> :(
>>
>> Joshua Anderson wrote:
>>   
>>> You have to run facter with the "-p" argument if you want to see facts  
>>> distributed by Puppet.
>>>
>>> -Josh
>>>
>>> On Mar 9, 2009, at 1:50 PM, Steve Wray wrote:
>>>
>>> 
>>>> Hi there,
>>>>
>>>> I'm trying to use a fact to tell whether the machine is virtualised.
>>>>
>>>> I found this and, in testing, its been ok:
>>>> http://reductivelabs.com/trac/puppet/wiki/Recipes/VirtualMachine
>>>>
>>>> However, trying to roll this new fact out has been difficult.
>>>>
>>>> 1. Debian has got facter looking in /var/puppet/facts while the  
>>>> package
>>>> maintainer has other puppet var stuff in /var/lib/puppet/ I used  
>>>> puppet to
>>>> create a symlink to work around this.
>>>>
>>>> 2. Following the instructions in
>>>> http://reductivelabs.com/trac/puppet/wiki/AddingFacts
>>>> I can test this properly from the commandline by setting environment
>>>> variables etc so I know that the ruby code is working.
>>>>
>>>> Ie:
>>>> mkdir -p ~/lib/ruby/facter
>>>> export RUBYLIB=~/lib/ruby
>>>> cp /var/lib/puppet/facts/virtual.rb $RUBYLIB/facter
>>>> facter virtual
>>>>
>>>> does return the expected output.
>>>>
>>>>
>>>> 3. When I run facter from the commandline, without directing  
>>>> $RUBYLIB to my
>>>> home directory, I don't get the expected output.
>>>>
>>>> When I run facter from strace I can see:
>>>>
>>>> open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
>>>> close(4)= 0
>>>> sigprocmask(SIG_BLOCK, NULL, [])= 0
>>>> open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
>>>> close(4)= 0
>>>> open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
>>>> fstat64(4, {st_mode=S_IFREG|0755, st_size=1435, ...}) = 0
>>>> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,  
>>>> -1, 0) =
>>>> 0xb7f67000
>>>> read(4, "Facter.add(\"virtual\") do\n  confi"..., 4096) = 1435
>>>>
>>>> so I can tell that facter is reading this new fact file.
>>>>
>>>> But when, from the commandline, I run "facter" or "facter virtual" I  
>>>> don't
>>>> get the expected output.
>>>>
>>>>
>>>>
>>>> -- 
>>>> Please remember that an email is just like a postcard; it is not
>>>> confidential nor private nor secure and can be read by many other  
>>>> people
>>>> than the intended recipient. A postcard can be read by anyone at the  
>>>> mail
>>>> sorting office and expecting what is written on it to be private and  
>>>> secret
>>>> is not realistic. Please hold no higher expectation of email.
>>>>
>>>> If you need to send confidential information in an email you need to  
>>>> use
>>>> encryption. PGP is Pretty good for this.
>>>>
>>>>   
>>> 
>>
>>   
> 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: custom facts not working

2009-03-09 Thread Steve Wray

FYI I've butchered this into place now by dropping my custom facts into 
/usr/lib/ruby/1.8/facter/

Obviously this isn't ideal but its all I've found that works.
:(

Joshua Anderson wrote:
> You have to run facter with the "-p" argument if you want to see facts  
> distributed by Puppet.
> 
> -Josh
> 
> On Mar 9, 2009, at 1:50 PM, Steve Wray wrote:
> 
>> Hi there,
>>
>> I'm trying to use a fact to tell whether the machine is virtualised.
>>
>> I found this and, in testing, its been ok:
>> http://reductivelabs.com/trac/puppet/wiki/Recipes/VirtualMachine
>>
>> However, trying to roll this new fact out has been difficult.
>>
>> 1. Debian has got facter looking in /var/puppet/facts while the  
>> package
>> maintainer has other puppet var stuff in /var/lib/puppet/ I used  
>> puppet to
>> create a symlink to work around this.
>>
>> 2. Following the instructions in
>> http://reductivelabs.com/trac/puppet/wiki/AddingFacts
>> I can test this properly from the commandline by setting environment
>> variables etc so I know that the ruby code is working.
>>
>> Ie:
>> mkdir -p ~/lib/ruby/facter
>> export RUBYLIB=~/lib/ruby
>> cp /var/lib/puppet/facts/virtual.rb $RUBYLIB/facter
>> facter virtual
>>
>> does return the expected output.
>>
>>
>> 3. When I run facter from the commandline, without directing  
>> $RUBYLIB to my
>> home directory, I don't get the expected output.
>>
>> When I run facter from strace I can see:
>>
>> open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
>> close(4)= 0
>> sigprocmask(SIG_BLOCK, NULL, [])= 0
>> open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
>> close(4)= 0
>> open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
>> fstat64(4, {st_mode=S_IFREG|0755, st_size=1435, ...}) = 0
>> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,  
>> -1, 0) =
>> 0xb7f67000
>> read(4, "Facter.add(\"virtual\") do\n  confi"..., 4096) = 1435
>>
>> so I can tell that facter is reading this new fact file.
>>
>> But when, from the commandline, I run "facter" or "facter virtual" I  
>> don't
>> get the expected output.
>>
>>
>>
>> -- 
>> Please remember that an email is just like a postcard; it is not
>> confidential nor private nor secure and can be read by many other  
>> people
>> than the intended recipient. A postcard can be read by anyone at the  
>> mail
>> sorting office and expecting what is written on it to be private and  
>> secret
>> is not realistic. Please hold no higher expectation of email.
>>
>> If you need to send confidential information in an email you need to  
>> use
>> encryption. PGP is Pretty good for this.
>>
> 
> 
> > 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: conditionals?

2009-03-09 Thread Steve Wray

Avi Miller wrote:
> Steve Wray wrote:
>> I prefer the second one but cannot fathom why the syntax is wrong.
> 
> Inline syntax is a little different:
> 
> package { ntp:
>ensure => $lsbdistcodename ? {
>   sarge   => present,
>   default => absent,
>},
> }
> 
> Hope that helps,


How about multiple conditions? Eg if I want ntp to not be installed on 
virtual machines unless they are running sarge?

This gets me installed if its sarge:

   package { ntp-simple:
 ensure => $lsbdistcodename? { 'sarge' => present, default => absent }
   }

This gets me installed if its xen:
   package { ntp-simple:
 ensure => $virtual? {
'xenu' => present,
'xen0' => present,
default => absent
 }
   }

How do I combine these? I've tried various permutations and had no luck. 
and I don't see any obvious examples of what I'm trying to do.


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



[Puppet Users] Re: custom facts not working

2009-03-09 Thread Steve Wray

Joshua Anderson wrote:
> You have to run facter with the "-p" argument if you want to see facts  
> distributed by Puppet.

facter -p
/usr/bin/facter: invalid option -- p
/usr/lib/ruby/1.8/getoptlong.rb:265:in `set_error': invalid option -- p 
(GetoptLong::InvalidOption)
 from /usr/lib/ruby/1.8/getoptlong.rb:434:in `get_option'
 from /usr/lib/ruby/1.8/getoptlong.rb:458:in `each'
 from /usr/lib/ruby/1.8/getoptlong.rb:457:in `loop'
 from /usr/lib/ruby/1.8/getoptlong.rb:457:in `each'
 from /usr/bin/facter:70


facter -v
1.3.5

This is Debian Etch and Sarge. The -p works fine in Lenny with facter 1.5.1


> -Josh
> 
> On Mar 9, 2009, at 1:50 PM, Steve Wray wrote:
> 
>> Hi there,
>>
>> I'm trying to use a fact to tell whether the machine is virtualised.
>>
>> I found this and, in testing, its been ok:
>> http://reductivelabs.com/trac/puppet/wiki/Recipes/VirtualMachine
>>
>> However, trying to roll this new fact out has been difficult.
>>
>> 1. Debian has got facter looking in /var/puppet/facts while the  
>> package
>> maintainer has other puppet var stuff in /var/lib/puppet/ I used  
>> puppet to
>> create a symlink to work around this.
>>
>> 2. Following the instructions in
>> http://reductivelabs.com/trac/puppet/wiki/AddingFacts
>> I can test this properly from the commandline by setting environment
>> variables etc so I know that the ruby code is working.
>>
>> Ie:
>> mkdir -p ~/lib/ruby/facter
>> export RUBYLIB=~/lib/ruby
>> cp /var/lib/puppet/facts/virtual.rb $RUBYLIB/facter
>> facter virtual
>>
>> does return the expected output.
>>
>>
>> 3. When I run facter from the commandline, without directing  
>> $RUBYLIB to my
>> home directory, I don't get the expected output.
>>
>> When I run facter from strace I can see:
>>
>> open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
>> close(4)= 0
>> sigprocmask(SIG_BLOCK, NULL, [])= 0
>> open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
>> close(4)= 0
>> open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
>> fstat64(4, {st_mode=S_IFREG|0755, st_size=1435, ...}) = 0
>> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,  
>> -1, 0) =
>> 0xb7f67000
>> read(4, "Facter.add(\"virtual\") do\n  confi"..., 4096) = 1435
>>
>> so I can tell that facter is reading this new fact file.
>>
>> But when, from the commandline, I run "facter" or "facter virtual" I  
>> don't
>> get the expected output.
>>
>>
>>
>> -- 
>> Please remember that an email is just like a postcard; it is not
>> confidential nor private nor secure and can be read by many other  
>> people
>> than the intended recipient. A postcard can be read by anyone at the  
>> mail
>> sorting office and expecting what is written on it to be private and  
>> secret
>> is not realistic. Please hold no higher expectation of email.
>>
>> If you need to send confidential information in an email you need to  
>> use
>> encryption. PGP is Pretty good for this.
>>
> 
> 
> > 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] custom facts not working

2009-03-09 Thread Steve Wray

Hi there,

I'm trying to use a fact to tell whether the machine is virtualised.

I found this and, in testing, its been ok:
http://reductivelabs.com/trac/puppet/wiki/Recipes/VirtualMachine

However, trying to roll this new fact out has been difficult.

1. Debian has got facter looking in /var/puppet/facts while the package 
maintainer has other puppet var stuff in /var/lib/puppet/ I used puppet to 
create a symlink to work around this.

2. Following the instructions in 
http://reductivelabs.com/trac/puppet/wiki/AddingFacts
I can test this properly from the commandline by setting environment 
variables etc so I know that the ruby code is working.

Ie:
mkdir -p ~/lib/ruby/facter
export RUBYLIB=~/lib/ruby
cp /var/lib/puppet/facts/virtual.rb $RUBYLIB/facter
facter virtual

does return the expected output.


3. When I run facter from the commandline, without directing $RUBYLIB to my 
home directory, I don't get the expected output.

When I run facter from strace I can see:

open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
close(4)= 0
sigprocmask(SIG_BLOCK, NULL, [])= 0
open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
close(4)= 0
open("/var/puppet/facts/virtual.rb", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0755, st_size=1435, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb7f67000
read(4, "Facter.add(\"virtual\") do\n  confi"..., 4096) = 1435

so I can tell that facter is reading this new fact file.

But when, from the commandline, I run "facter" or "facter virtual" I don't 
get the expected output.



-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: creating symlinks?

2009-03-09 Thread Steve Wray

Thanks for verifying that I have the correct syntax, it pointed to another 
error I'd made.



Trevor Hemsley wrote:
> I always prefer the syntax
> 
> file {"/var/puppet":
> ensure => symlink,
> target => "/var/lib/puppet"
> }
> 
> as it seems to me to be more accurate in describing what I want it to
> do. It should achieve the same thing though.
> 
> Steve Wray wrote:
>> Based on the documentation I had thought that this:
>>
>>file { "/var/puppet":
>>  ensure => "/var/lib/puppet"
>>}
>>
>>
>> should create a symlink /var/puppet which points to the directory 
>> /var/lib/puppet
>>
>> It doesn't seem to be working :-/
>>
>> Any ideas?
>>
>> Thanks!
>>
>>
>>   
> 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] creating symlinks?

2009-03-09 Thread Steve Wray

Based on the documentation I had thought that this:

   file { "/var/puppet":
 ensure => "/var/lib/puppet"
   }


should create a symlink /var/puppet which points to the directory 
/var/lib/puppet

It doesn't seem to be working :-/

Any ideas?

Thanks!


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] lsb_release misleading..

2009-03-08 Thread Steve Wray

Hi there,

I understand we have a variable $lsbdistcodename which gets its info from 
the output of the lsb_release command but I've just found that this is not 
very reliable.

I have several Debian Etch servers for which lsb_release reports that they 
are running sarge :(

So far I've been unable to find out how to correct this or where to start 
in correcting it!

Any ideas?

Thanks!


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: conditionals?

2009-03-08 Thread Steve Wray

Avi Miller wrote:
> Steve Wray wrote:
>> I prefer the second one but cannot fathom why the syntax is wrong.
> 
> Inline syntax is a little different:
> 
> package { ntp:
>ensure => $lsbdistcodename ? {
>   sarge   => present,
>   default => absent,
>},
> }
> 
> Hope that helps,
> Avi

Ohh I see
:)

Thanks!


> 
> > 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] conditionals?

2009-03-08 Thread Steve Wray

Hi there,
we have a mixed deployment of sarge, etch and now lenny servers.

The first example works:

   case $lsbdistcodename {
 sarge: { package { ntp: ensure => present } }
 default: { package { ntp: ensure => absent } }
   }


This does not:

   package { ntp:
 case $lsbdistcodename {
   sarge: { ensure => present }
   default: { ensure => absent }
 }


I prefer the second one but cannot fathom why the syntax is wrong.

They seem functionally identical and I'm sure I have enough {}'s and in the 
right places...

Thanks!


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Re: Debian sarge packages?

2009-03-08 Thread Steve Wray

Hannes Nagl wrote:
> Hello Steve!
> 
> There is already one: http://packages.debian.org/etch/puppet
> But if it is possible I suggest you to pin the package from lenny (or 
> newer).

This pinning isn't working out, not finding any puppet package.

I imagine that I should replace 'experimental' with 'etch'? I've also tried 
'stable'.

I get:

Package puppet is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

I have a standard etch source listed in sources.list:

deb ftp://ftp.nz.debian.org/debian etch main contrib non-free

:(

I want to get puppet installed on our Sarge servers in preparation for 
upgrades.


> This can be done through adding the repository to your sources list and 
> the following to your /etc/apt/preferences:
> 
> Package: *
> Pin: release a=experimental
> Pin-Priority: 1
> 
> Package: puppet
> Pin: release a=experimental
> Pin-Priority: 1001
> 
> Package: puppetmaster
> Pin: release a=experimental
> Pin-Priority: 1001
> 
> 
> sincerely
> Hannes
> 
> 
> Steve Wray schrieb:
>> Hi there,
>>
>> I was wondering if anyone might know of a repository or other source for 
>> puppet packages for Debian Sarge? (and supporting packages for ruby etc)
>>
>> Thanks!
>>
>>
> 
> > 


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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



[Puppet Users] Debian sarge packages?

2009-03-05 Thread Steve Wray

Hi there,

I was wondering if anyone might know of a repository or other source for 
puppet packages for Debian Sarge? (and supporting packages for ruby etc)

Thanks!


-- 
Please remember that an email is just like a postcard; it is not 
confidential nor private nor secure and can be read by many other people 
than the intended recipient. A postcard can be read by anyone at the mail 
sorting office and expecting what is written on it to be private and secret 
is not realistic. Please hold no higher expectation of email.

If you need to send confidential information in an email you need to use 
encryption. PGP is Pretty good for this.

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