[chef] Re: Using machine_file resource for upload


Chronological Thread 
  • From: John Keiser < >
  • To:
  • Subject: [chef] Re: Using machine_file resource for upload
  • Date: Tue, 27 Jan 2015 20:36:21 -0800

"no implicit conversion of nil into String" is a bug any which way you slice it (even if it's just "bad error message").  Can you post the stacktrace (there should be a line near the end of the error output where it tells you the file the stack trace got written to) and the resource declaration?  The fact that machine succeeds (nice job getting an alternative btw) means machine_file *should* be able to succeed.

The stack trace will probably reveal what version of chef-provisioning (and what driver) you are using, but just in case--what driver are you using and what version of chef-provisioning?  (Obtainable via gem list chef-provisioning.)

Thanks!


On Tue, Jan 27, 2015 at 7:09 PM, Christine Draper < " target="_blank"> > wrote:
Hi,

I am trying to upload a file using chef provisioning machine_file. I am getting the error below. Am I doing something wrong or is there a bug?


The following works OK so I'm not desperate, just curious/keen to learn.

machine 'appserver' do
  files(
        '/twi/pkg/INT/ypo.tar.gz' => '/twi/pkg/INT/ypo.tar.gz',
       )
end

--------------------------------------------------------------------------------

 * machine_file[/twi/pkg/INT/ypo.tar.gz] action upload[2015-01-27T21:05:12-06:00] INFO: Processing machine_file[/twi/pkg/INT/ypo.tar.gz] action upload (@recipe_files::/home/christine/test/provision/deploy.rb line 3)
[2015-01-27T21:05:14-06:00] INFO: Executing sudo ls -d /twi/pkg/INT/ypo.tar.gz on " target="_blank">
[2015-01-27T21:05:17-06:00] INFO: Completed ls -d /twi/pkg/INT/ypo.tar.gz on " target="_blank"> : exit status 0
[2015-01-27T21:05:17-06:00] INFO: Executing sudo md5sum -b /twi/pkg/INT/ypo.tar.gz on " target="_blank">
[2015-01-27T21:05:18-06:00] INFO: Completed md5sum -b /twi/pkg/INT/ypo.tar.gz on " target="_blank"> : exit status 0
       ================================================================================
    Error executing action `upload` on resource 'machine_file[/twi/pkg/INT/ypo.tar.gz]'
    ================================================================================
   
    TypeError
    ---------
    no implicit conversion of nil into String
   
    Resource Declaration:
    ---------------------
    # In /home/christine/test/provision/deploy.rb
   
      3: machine_file '/twi/pkg/INT/ypo.tar.gz' do
      4:  machine 'appserver'
      5:   path '/twi/pkg/INT/ypo.tar.gz'
      6:   action :upload
      7: end
      8:
----------------------------------------------------------------

Regards,
Christine




Archive powered by MHonArc 2.6.16.

§