node_aws issue: undefined method

149 views
Skip to first unread message

Colin Cullinan

unread,
Jan 2, 2014, 4:23:40 PM1/2/14
to puppet...@googlegroups.com
Hello,

I am attempting to manage EC2 instances using Puppet's node_aws but everytime I run 
~$ sudo puppet node_aws list

I get the following response
Error: undefined method `reject' for #<Symbol:0x00000001c1df0e>
Error: Try 'puppet help node_aws list' for usage

I have installed Puppet Enterprise Master 3.3.1 on an AWS EC2 Ubuntu 12.04 x64 instance in the ap-southeast-2 region (following the instructions in the first video here to produce an installation answer file
I have also installed Ruby 2.0.0p353, Gem version: 2.1.11 and run the Cloud Provisioner install as outlined here.

I also configured my ~/.fog file
:default:
 :aws_access_key_id:MYKEY
 :aws_secret_access_key:MYSECRETKEY

I successfully ran sudo puppet agent -t on the server to have its agent check and appear in the console.

Any help would be greatly appreciated.

Col

Justin Stoller

unread,
Jan 2, 2014, 4:50:54 PM1/2/14
to puppet...@googlegroups.com
On Thu, Jan 2, 2014 at 1:23 PM, Colin Cullinan <ccul...@gmail.com> wrote:
Hello,

I am attempting to manage EC2 instances using Puppet's node_aws but everytime I run 
~$ sudo puppet node_aws list

I get the following response
Error: undefined method `reject' for #<Symbol:0x00000001c1df0e>
Error: Try 'puppet help node_aws list' for usage

I have installed Puppet Enterprise Master 3.3.1 on an AWS EC2 Ubuntu 12.04 x64 instance in the ap-southeast-2 region (following the instructions in the first video here to produce an installation answer file
I have also installed Ruby 2.0.0p353, Gem version: 2.1.11 and run the Cloud Provisioner install as outlined here.

You should follow the installation guide here as cloud provisioner comes with PE:

It seems you have CP installed as a module with a system wide ruby & gems and then it is being used as a plugin by puppet (which has its own ruby). I would try blowing away your CP install and then running the PE installer and selecting the "Install Cloud Provisioner" option.

HTH,
Justin
 
I also configured my ~/.fog file
:default:
 :aws_access_key_id:MYKEY
 :aws_secret_access_key:MYSECRETKEY

I successfully ran sudo puppet agent -t on the server to have its agent check and appear in the console.

Any help would be greatly appreciated.

Col

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f5ef9764-a003-433f-b037-79d1d82442cb%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Colin Cullinan

unread,
Jan 2, 2014, 8:30:29 PM1/2/14
to puppet...@googlegroups.com
Thanks for the quick response Justin,

I had received the same error before I tried adding the CP as its own gem. For completeness, I started from scratch, using Ubuntu 12.04.3 Puppet Ent 3.1.1 and used only the CP included within the Puppet installer defined by q_puppet_cloud_install=y in the install answer file.

I launched an AWS Ubuntu Server 12.04.3 LTS Server micro instance and ran the following which resulted in the same error
I also received a new error when attempting to get the server agent node to report to itself in using puppet agent -t. This seems to be caused by the pe-puppetdb service not starting. Going backwards here...

tar -xzf puppet-enterprise-3.1.1-ubuntu-12.04-amd64.tar.gz

cd puppet-enterprise-3.1.1-ubuntu-12.04-amd64/


Add fog file

vim ~/.fog

:default:

:aws_access_key_id:mykey

:aws_secret_access_key:mysecretkey


Add swap space for AWS micro instance

sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024

sudo /sbin/mkswap /var/swap.1

sudo /sbin/swapon /var/swap.1

Add AWS internal hostname to hosts file

sudo vim /etc/hosts

127.0.0.1 ip-172-31-15-16


sudo shutdown -r now


sudo puppet agent -t

Warning: Unable to fetch my node definition, but the agent run will continue:

Warning: Error 400 on SERVER: Could not retrieve facts for ec2-54-206-53-139.ap-southeast-2.compute.amazonaws.com: Failed to find facts from PuppetDB at ec2-54-206-53-139.ap-southeast-2.compute.amazonaws.com:8081: Connection refused - connect(2)


sudo puppet node_aws list

Error: undefined method `reject' for #<Symbol:0x00000001c1e70e>

Error: Try 'puppet help node_aws list' for usage

Cheers,

Colin

Ankita kumari

unread,
Apr 15, 2014, 12:45:26 AM4/15/14
to puppet...@googlegroups.com
I am getting similar error. How did u resolve it?
Reply all
Reply to author
Forward
0 new messages