Ask Your Question
0

Facing issues with File resouce with folder name called "environment"

asked 2016-03-01 22:53:16 -0500

yoga gravatar image

updated 2016-03-02 06:57:35 -0500

I am trying to recursively transfer files from puppet master to my agents with inbuilt fileservers.

I am having directory name called "configuration" which having few files and directories.One of that directories called "environment" which is not been transferred to my agents.but I able to transfer all other files with the following errors.

     Error: Could not set 'file' on ensure: Error 404 on SERVER: {"message":"Not Found: file1.txt is not a known environment","issue_kind":"RESOURCE_NOT_FOUND"}
     Error: Could not set 'file' on ensure: Error 404 on SERVER: {"message":"Not Found: file1.txt is not a known environment","issue_kind":"RESOURCE_NOT_FOUND"}
     Wrapped exception:
     Error 404 on SERVER: {"message":"Not Found: file1.txt is not a known environment","issue_kind":"RESOURCE_NOT_FOUND"}
     Error: /Stage[main]/Platform::Configuration::Test1/File[/opt/pe-platform-test/test2/file1.txt]/ensure: change from absent to file failed: Could not set 'file' on ensure: Error 404 on SERVER: {"message":"Not Found: file1.txt is not a known environment","issue_kind":"RESOURCE_NOT_FOUND"}

here

   class platform::configuration::test1
    {
     file{"/opt/pe-platform-test/test2":
     ensure=>"directory",
     source=> "puppet://puppetmaster.sample.net/puppet_plat_shared/configuration",
     source_permissions=>"use",
     replace=>"true",
     recurse=>"remote",
       }
     }

In my code

       "puppet_plat_shared" denotes "/home/SharedData/Shared"
edit retag flag offensive close merge delete

Comments

Update showing your actual code, thanks.

Alex Harvey gravatar imageAlex Harvey ( 2016-03-02 00:00:55 -0500 )edit

I updated my code in question.

yoga gravatar imageyoga ( 2016-03-02 04:06:47 -0500 )edit

Ah, OK. You're using a file server to serve a custom mount point? Then you should update with your file server configuration. That's probably where the issue is.

Alex Harvey gravatar imageAlex Harvey ( 2016-03-02 07:07:21 -0500 )edit

[puppet_plat_shared] path /home/SharedData/Shared allow * above is my configuration in file server for " puppet_plat_shared".

yoga gravatar imageyoga ( 2016-03-03 01:32:09 -0500 )edit

Can you update your post showing the command line you are running to generate that error message, and the content of your puppet.conf file.

Alex Harvey gravatar imageAlex Harvey ( 2016-03-03 03:43:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-03-02 05:01:42 -0500

The issue must be in your puppet master set up.

I do notice that your file path is incorrect. From the documentation:

The normal form of a puppet: URI is:

puppet:///modules/<MODULE NAME>/<FILE PATH>

This will fetch a file from a module on the Puppet master (or from a local module when using Puppet apply). Given a modulepath of /etc/puppetlabs/code/modules, the example above would resolve to /etc/puppetlabs/code/modules/<MODULE NAME>/files/<FILE PATH>.

Getting that wrong shouldn't cause the specific error you're seeing however.

Otherwise the code you've shown us works.

I wonder if your file server is not configured properly? See here.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-03-01 22:53:16 -0500

Seen: 91 times

Last updated: Mar 02 '16