Puppet Error 400 On Server Failed To Realize Virtual Resources
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
Puppet "failed To Realize Virtual Resources" User
this site About Us Learn more about Stack Overflow the company Business puppet realize Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Puppet and realize virtual resources up vote 0 down vote favorite i'working on a puppetmodule for mongodb Here is what I have (stripped down to the basics): modules/mongodb/manifests/virtual.pp: class mongodb::virtual { @package {['mongo-10gen-server','mongo-10gen']: ensure => installed } modules/mongodb/manifests/replicaset.pp: define mongodb::replicaset { realize( Package['mongo-10gen-server','mongo-10gen'] ) } quite simple, but when I do a puppetrun on the client: Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/custom_facts.rb Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to realize virtual resources Package[mongo-10gen-server], Package[mongo-10gen] on node mongonode Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Any idea whats wrong with my setup? linux puppet share|improve this question asked Mar 6 '13 at 9:46 Dakkar 61621016 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote Have to answer my own question :S It was a typical layer8 error: I forgot to include the ::virtual class in replicaset.pp share|improve this answer answered Mar 6 '13 at 10:11 Dakkar 61621016 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged linux puppet or ask your own question. asked 3 years ago viewed 3240 times a
edit puppet virtual_resources duplicate package asked 2016-07-04 08:54:06 -0500 Imagin0s 1 ●3 ●4 updated 2016-07-04 16:22:28 -0500 lupin 678 ●2 ●5 ●14 Hello, I'm a bit new on puppet and I have some issues on realizing virtual resources. Here are my manifests below : manifests/init.pp : class addmount ($list = undef, $default_nfs_options = undef, $default_cifs_options = undef ) { file { "/etc/fstab": ensure => present, http://stackoverflow.com/questions/15243831/puppet-and-realize-virtual-resources owner => root, group => root } define addmount::mountpoint ($share_server, $share_name, $share_type, $share_mountoptions, $dumpandpass) { file { "$name": ensure => 'directory', } if ($share_type == 'cifs' ) { include addmount::mod::cifs_pack **realize(addmount::mod::cifs_pack:Package["${addmount::package_share_CIFS}"])** if ($share_mountoptions == false) { $share_mountoptions = "$addmount::default_cifs_options" } file_line { "${name}": path => '/etc/fstab', line => template('addmount/mount_CIFS.erb'), match => "//$share_server/$share_name.*$name.*" https://ask.puppet.com/question/26997/problem-on-virtual-resource/ } } elsif ($share_type == 'nfs' ) { include addmount::mod::nfs_pack realize(addmount::mod::nfs_pack:Package["${addmount::package_share_NFS}"]) if ($share_mountoptions == false) { $share_mountoptions = "$addmount::default_nfs_options" } file_line { "${name}": path => '/etc/fstab', line => template('addmount/mount_NFS.erb'), match => "$share_server:/$share_name.*$name.*" } } } create_resources(addmount::mountpoint,hiera_hash('addmount::list')) } manifests/mod/nfs_pack.pp : class addmount::mod::nfs_pack { @package { "${addmount::package_share_NFS}": ensure => present, } } manifests/mod/cifs_pack.pp : class addmount::mod::cifs_pack { @package { "${addmount::package_share_CIFS}": ensure => present, } } hieradata/nodes/ducrmde001.yaml --- addmount::list: '/mnt/test': share_server: 'nashomologation.boursorama.fr' share_name: 'batch_middle/crmfr_dev' share_mountoptions: 'uid=800,gid=1006,dir_mode=0775,file_mode=0775,domain=boursorama.fr,username=batch,password=xxxxxx' dumpandpass: '0 0' share_type: cifs '/mnt/test2': share_server: 'nashomologation.boursorama.fr' share_name: 'batch_middle/crmde_dev' share_mountoptions: 'defaults' dumpandpass: '0 0' share_type: nfs '/mnt/test3': share_server: 'nashomologation.boursorama.fr' share_name: 'batch_middle/frmfr_dev' dumpandpass: '0 0' share_type: cifs I've got the following error when I do puppet agent -t on the client : ducrmde001 ~ :( # puppet agent -t Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at ':'; expected ')' at /etc/puppet/environments/staging/modules/addmount/manifests/init.pp:27 on node du
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss http://serverfault.com/questions/420283/cant-use-groups-in-a-virtual-user the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign failed to up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Cant use groups in a virtual user up vote 0 down vote favorite I am trying to set up some virtual users in puppet. The basic users work fine, but for some reason when I failed to realize try to add "groups" to the user definition the run fails. Here is the basic virtual user config... class users::virtual { define localuser ($uid,$gid) { user { $title: ensure => "present", uid => $uid, gid => $gid, shell => "/bin/bash", home => "/home/$title", comment => $realname, managehome => true, } } } and here is a user called out... class my::users { include users::virtual @users::virtual::localuser { "jdehnert": uid => "504", gid => "users", groups => ["wheel", "rvm"], require => Group["rvm"], } } the init.pp is... class people { include my::users realize ( Users::Virtual::Localuser["jdehnert"], ) } When I run a test --noop on a client, I get this message on the client... # puppetd --test --noop err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter groups at /etc/puppet/manifests/users/users.pp:7 on node dev-web-1. and this one on the server... Aug 23 04:29:38 centos63 puppet-master[21713]: Invalid parameter groups at /etc/puppet/manifests/users/users.pp:7 on node dev-web-1 If I pull the "groups" line out, this config works just fine. I also discovered that if I just make