[chef] Using UNC path was Re: Re: Re: Re: A question about chef-splunk cookbook


Chronological Thread 
  • From: o haya < >
  • To:
  • Cc:
  • Subject: [chef] Using UNC path was Re: Re: Re: Re: A question about chef-splunk cookbook
  • Date: Fri, 10 Jul 2015 09:12:51 -0700

Hi,

Sorry it's taken so long to try this, but so far, I haven't been able to make 
it work:


 splunk]# chef-client -o 'recipe[chef-splunk::install_server]'
Starting Chef Client, version 12.4.0
[2015-07-10T12:05:52-04:00] WARN: Run List override has been provided.
[2015-07-10T12:05:52-04:00] WARN: Original Run List: []
[2015-07-10T12:05:52-04:00] WARN: Overridden Run List: 
[recipe[chef-splunk::install_server]]
resolving cookbooks for run list: ["chef-splunk::install_server"]
Synchronizing Cookbooks:
  - chef-vault
  - chef-splunk
Compiling Cookbooks...
Converging 2 resources
Recipe: chef-splunk::install_server
  * remote_file[/var/chef/cache/splunk-6.0.7-241889-linux-2.6-x86_64.rpm] 
action create_if_missing[2015-07-10T12:05:52-04:00] WARN: 
remote_file[/var/chef/cache/splunk-6.0.7-241889-linux-2.6-x86_64.rpm] cannot 
be downloaded from 
file://192.168.0.236/h/INSTALL-FILES-CENTOS6-and-CHEF/SPLUNK/splunk-6.0.7-241889-linux-2.6-x86_64.rpm:
 No such file or directory @ rb_sysopen - 
/h/INSTALL-FILES-CENTOS6-and-CHEF/SPLUNK/splunk-6.0.7-241889-linux-2.6-x86_64.rpm


    
================================================================================
    Error executing action `create_if_missing` on resource 
'remote_file[/var/chef/cache/splunk-6.0.7-241889-linux-2.6-x86_64.rpm]'
    
================================================================================

    Errno::ENOENT
    -------------
    No such file or directory @ rb_sysopen - 
/h/INSTALL-FILES-CENTOS6-and-CHEF/SPLUNK/splunk-6.0.7-241889-linux-2.6-x86_64.rpm

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/chef-splunk/definitions/splunk_installer.rb

     26:   remote_file cached_package do
     27:     source params[:url]
     28:     action :create_if_missing
     29:   end
     30:

    Compiled Resource:
    ------------------
    # Declared in 
/var/chef/cache/cookbooks/chef-splunk/definitions/splunk_installer.rb:26:in 
`block in from_file'

    remote_file("/var/chef/cache/splunk-6.0.7-241889-linux-2.6-x86_64.rpm") do
      params 
{:url=>"file://192.168.0.236/h/INSTALL-FILES-CENTOS6-and-CHEF/SPLUNK/splunk-6.0.7-241889-linux-2.6-x86_64.rpm",
 :name=>"splunk"}
      provider Chef::Provider::RemoteFile
      action :create_if_missing
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      path "/var/chef/cache/splunk-6.0.7-241889-linux-2.6-x86_64.rpm"
      backup 5
      atomic_update true
      source 
["file://192.168.0.236/h/INSTALL-FILES-CENTOS6-and-CHEF/SPLUNK/splunk-6.0.7-241889-linux-2.6-x86_64.rpm"]
      use_etag true
      use_last_modified true
      declared_type :remote_file
      cookbook_name "chef-splunk"
      recipe_name "install_server"
    end


Running handlers:
[2015-07-10T12:05:52-04:00] ERROR: Running exception handlers
Running handlers complete
[2015-07-10T12:05:52-04:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 1.425198167 seconds
[2015-07-10T12:05:52-04:00] FATAL: Stacktrace dumped to 
/var/chef/cache/chef-stacktrace.out
[2015-07-10T12:05:52-04:00] ERROR: 
remote_file[/var/chef/cache/splunk-6.0.7-241889-linux-2.6-x86_64.rpm] 
(chef-splunk::install_server line 26) had an error: Errno::ENOENT: No such 
file or directory @ rb_sysopen - 
/h/INSTALL-FILES-CENTOS6-and-CHEF/SPLUNK/splunk-6.0.7-241889-linux-2.6-x86_64.rpm
[2015-07-10T12:05:52-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef 
run process exited unsuccessfully (exit code 1)

 splunk]#


I've tried it using both directly like above using 
"file://192.168.0.236/h/INSTALL-FILES-CENTOS6-and-CHEF/SPLUNK/splunk-6.0.7-241889-linux-2.6-x86_64.rpm"
 in the chef-splunk attributes, and also tried creating a mount at 
/mnt/shareit (and confirming I can see the RPMs at the mount) and get the 
same error.

Is there something else I need to do with the file:// URL?

Thanks,
Jim


--------------------------------------------
On Tue, 7/7/15, Steven Murawski 
< >
 wrote:

 Subject: [chef] Re: Re: Re: A question about chef-splunk cookbook
 To: 

 Cc: "o haya" 
< >
 Date: Tuesday, July 7, 2015, 6:14 PM
 
 
                                         Also, as of 12.4.0,
 remote_file can use UNC paths!
 Steve
 Steven MurawskiCommunity Software Development Engineer @
 ChefMicrosoft MVP - PowerShell
 http://stevenmurawski.com
                                        On 7/7/2015 5:07:44
 PM, o haya 
< >
 wrote:Hi Tensibai,
 
 
 
 Thanks.  I will give that a try as soon as
 I figure out another problem I just started having (with
 Chef and CENTOS).
 
 
 
 Jim
 
 
 
 
 
 --------------------------------------------
 
 On Tue, 7/7/15, Tensibai Zhaoying  wrote:
 
 
 
  Subject: [chef] Re: A question about
 chef-splunk cookbook
 
  To: 

 
  Date: Tuesday, July 7, 2015, 5:52 PM
 
  
 
  I don't know for the
 
  slunk cookbook itself (didn't use it)
 but assuming it
 
  takes advantage of remote_file resource
 I'm sure yes as
 
  my sole contribution to chef was on the
 file:// url code and
 
  I did test for this kind of path for Unix
 and Windows ;)
 
  
 
  T.l.;d.r Should be yes but may
 
  work with a UNC path
 file://server/share/file.rpm too if the
 
  share is browsable as anonymous (everyone
 read permission in
 
  share and NTFS acl)
 
  
 
  Le 7
 
  juil. 2015 22:49, o haya  a
 
  écrit :
 
  >
 
  > Hi, 
 
  >
 
  > I'm starting to
 
  look at using the chef-splunk cookbook: 
 
  >
 
  >
 https://github.com/chef-cookbooks/chef-splunk
 
  
 
  >
 
  > I'm not
 
  sure if there is somewhere else more
 appropriate for
 
  questions, so I'm posting here. 
 Hopefully that's
 
  ok (otherwise please point me to the
 correct place?)? 
 
  >
 
  >
 
  >
 
  Anyway, the question I have is whether
 this can support
 
  using file:// type URLs for the location
 of the Splunk
 
  server and Splunk forwarder RPMs? 
 
  >
 
  >
 
  > If possible, we would
 
  like to setup a CIFs mount, say at
 /mnt/splunk_rpms,
 
  pointing to a Windows share, and then use
 something like
 
 
 "file:///mnt/splunk_rpms/the_splunkserver.rpm" in
 
  the attribute.  
 
  >
 
  >
 
  Will something like that work? 
 
  >
 
  > Thanks, 
 
  > Jim 
 
  >
 
  
 
 
                                       
 
                                        




Archive powered by MHonArc 2.6.16.

§