Could not find data item

15 views
Skip to first unread message

John K

unread,
Sep 8, 2016, 10:49:17 AM9/8/16
to SIMP Q&A Forum
Morning All

  I've run into an oddity and have been unable to find satisfaction with Dr. Google, so I thought I'd ask the experts.

I added a defaults yaml for my project (bdp_def.yaml), in which I have some default classes and variables for those classes.
My first class sets up a repo for my project using variables from the defaults file.

Basically it applies a bdp_yum class to all the nodes, and bdp_yum does a hiera lookup for an "enabled" option.  The class application and the variable definitions are in the same file.

If I do a hiera call on the command line, I get the expected response:

 [root@puppet hieradata]# hiera bdp_yum::enable_bdp_repo ::environment=simp -c /etc/puppet/hiera.yaml
WARN: 2016-09-08 14:35:13 +0000: Not using Hiera::Puppet_logger. It does not report itself to be suitable.
1

However, when puppet runs, it finds the class assignment, but doesn't resolve the variable (I've aliased puppetd to 'puppet agent' ):

[root@puppet hieradata]# puppetd -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find data item bdp_yum::enable_bdp_repo in any Hiera data file and no default supplied at /etc/puppet/modules/bdp_yum/manifests/init.pp:2 on node puppet.rdk.test
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
[root@puppet hieradata]#

It is very strange that both items come from the same file, but puppet isn't finding the variables.

Any help would be appreciated

John
Message has been deleted

John K

unread,
Sep 8, 2016, 11:17:38 AM9/8/16
to SIMP Q&A Forum
Trevor told me to reload puppet, I did and that worked.  It is strange that it found the class but not the variable, I'm happy it is working though, thanks Trevor.

for reference, I ran:  /usr/local/sbin/puppetserver_reload

Trevor Vaughan

unread,
Sep 9, 2016, 5:53:52 AM9/9/16
to John K, SIMP Q&A Forum
If you add new files to Hiera, the Puppetserver won't pick them up by default.

Thanks,

Trevor

On Thu, Sep 8, 2016 at 11:17 AM, John K <ggl...@gmail.com> wrote:
Trevor told me to reload puppet, I did and that worked.  It is strange that it found the class but not the variable, I'm happy it is working though, thanks Trevor.

for reference, I ran:  /usr/local/sbin/puppetserver_reload

--
You received this message because you are subscribed to the Google Groups "SIMP Q&A Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simp+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/simp/5cc27bcd-37c9-4958-998c-364ff5e6d483%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Trevor Vaughan
Vice President, Onyx Point, Inc

-- This account not approved for unencrypted proprietary information --

Trevor Vaughan

unread,
Sep 9, 2016, 5:53:52 AM9/9/16
to John K, SIMP Q&A Forum
My guess is that you need to reload your puppetserver.

You can either restart the service or you can use our puppetserver_reload script.

Thanks,

Trevor

--
You received this message because you are subscribed to the Google Groups "SIMP Q&A Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simp+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages