ok, i found out what pastebin is.  All on my own!!  :-)  But puppet agent
--trace doesn't give me very much output.  Only:
[root@gmatzpupnode ~]# puppet agent --trace
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/daemon.rb:47:in `create_pidfile'
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/util.rb:38:in `synchronize_on'
/opt/puppet/lib/ruby/1.8/sync.rb:230:in `synchronize'
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/util.rb:38:in `synchronize_on'
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/daemon.rb:46:in `create_pidfile'
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/daemon.rb:22:in `daemonize'
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:255:in
`setup'
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/application.rb:286:in `run'
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/application.rb:393:in
`exit_on_fail'
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/application.rb:286:in `run'
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:55:in
`execute'
/usr/local/bin/puppet:4
Could not prepare for execution: Could not create PID file:
/var/run/pe-puppet/agent.pid


it looks like it's failing, actually . . .

thanks,
guy

On Thu, Sep 15, 2011 at 6:50 PM, Adrien Thebo <adr...@puppetlabs.com> wrote:

> Could you provide the output of puppet agent --trace in a pastebin to
> accompany this?
>
> On Thu, Sep 15, 2011 at 1:22 PM, Guy Matz <gm...@matz.org> wrote:
>
>> hi!  Does anyone have any advice on debugging a new custom type?
>>
>> Any thoughts would be greatly appreciated . . .
>>
>> BTW, I'm getting the error:
>> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
>> Could not render to pson: undefined method `merge' for []:Array
>>
>> with some very rough code.
>>
>> The Type (vncserver.rb):
>> module Puppet
>>   newtype(:vncserver) do
>>
>>     ensurable
>>
>>     newproperty(:port) do
>>       desc "The vnc servers port assignment.  Will be +5900 on the server"
>>         validate do |value|
>>           unless value.is_i?
>>             raise Puppet::Error, "Invalid Port number"
>>           end
>>         end
>>     end
>>
>>     newproperty(:username) do
>>       desc "The user who will own the VNC session."
>>       isnamevar
>>       validate do |value|
>>         unless value !~ /\s/
>>           raise Puppet::Error, "Must be a valid username. No spaces,
>> please."
>>         end
>>       end
>>     end
>>
>>     newproperty(:geometry) do
>>       desc "Resolution for VNC, in XxY, e.g. 1024x768."
>>       validate do |value|
>>         unless value !~ /^\d*x\d*$/
>>           raise Puppet::Error, "Must be a valid geometry. e.g., 1024x768."
>>         end
>>       end
>>     end
>>
>>     newparam(:password) do
>>       desc "Password to be put into users .vnc/passwd."
>>       validate do |value|
>>         unless hostpart =~ /^([\d\w]+|[\d\w][\d\w\-]+[\d\w])$/
>>           raise Puppet::Error, "Invalid host name"
>>         end
>>       end
>>     end
>>
>>     newparam(:args) do
>>       desc "Optional arguments to be added to the vncserver command-line."
>>       end
>>     end
>>
>>     @doc = "Installs and manages entries for vncservers.  For Redhat-bases
>>       systems, and likely many others, these entries will be in
>>       /etc/sysconfig/vncservers."
>>
>> end
>>
>>
>> The Provider (parsed.rb):
>> require 'puppet/provider/parsedfile'
>>
>> vncservers = "/etc/sysconfig/vncservers"
>>
>> Puppet::Type.type(:vncserver).provide(:parsed,
>>                                       :parent =>
>> Puppet::Provider::ParsedFile,
>>                                       :default_target => vncservers,
>>                                       :filetype => :flat
>>                                       ) do
>>
>>   desc "The vncserver provider that uses the ParsedFile class"
>>
>>   confine :exists => vncservers
>>   text_line :comment, :match => /^#/;
>>   text_line :blank, :match => /\s*$/;
>>
>>   text_line :blank, :match => /\s*$/;
>>
>>   record_line :parsed, :fields => %w{vncservers}, :match =>
>> /^VNCSERVERS="(.*)"/
>>
>> end
>>
>>
>> And The Manifest:
>> class vncserver {
>>
>>   include common::vnc
>>
>>
>>   package {
>>     'tigervnc-server':
>>       ensure => 'installed';
>>   }
>>
>>   vncserver {
>>     'gmatz':
>>       port => '92',
>>       geometry => '1024x768',
>>       password => 'gmatz';
>>   }
>> }
>>
>> --
>> 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.
>>
>
>
>
> --
> Adrien Thebo
> adr...@puppetlabs.com
>
>  --
> 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.
>

-- 
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.

Reply via email to