[chef] Re: Re: Using machine_file resource for upload


Chronological Thread 
  • From: "Villa, Juan" < >
  • To: " " < >
  • Subject: [chef] Re: Re: Using machine_file resource for upload
  • Date: Wed, 28 Jan 2015 22:10:31 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;

I am having this exact same issue in Mac OS X 10.10.1. 

After installing ChefDK 0.3.6 onto a clean system I get the same error when running “chef verify”. 

Here’s my `chef gem list`:

*** LOCAL GEMS ***

activesupport (4.2.0, 3.2.21)
addressable (2.3.6)
akami (1.2.2)
app_conf (0.4.2)
appbundler (0.4.0)
archive (0.0.6)
archive-tar-minitar (0.5.2)
aruba (0.6.2)
ast (2.0.0)
astrolabe (1.3.0)
aws-sdk-v1 (1.61.0)
axiom-types (0.1.1)
azure (0.6.4)
berkshelf (3.2.3)
berkshelf-api-client (1.2.1)
bigdecimal (1.2.4)
buff-config (1.0.1)
buff-extensions (1.0.0)
buff-ignore (1.1.1)
buff-ruby_engine (0.1.0)
buff-shell_out (0.2.0)
builder (3.2.2)
bundler (1.7.5)
cane (2.6.2)
celluloid (0.16.0)
celluloid-io (0.16.1)
CFPropertyList (2.3.0)
chef (12.0.3, 11.18.0)
chef-dk (0.3.6)
chef-provisioning (0.17)
chef-provisioning-aws (0.1.3)
chef-provisioning-azure (0.1)
chef-provisioning-fog (0.11)
chef-provisioning-vagrant (0.8.1)
chef-vault (2.2.4)
chef-zero (3.2.1, 2.2.1, 1.5.6)
cheffish (0.9.1)
chefspec (4.2.0.beta.1)
childprocess (0.5.5)
cleanroom (1.0.0)
codeclimate-test-reporter (0.4.5)
coderay (1.1.0)
coercible (1.0.0)
columnize (0.8.9)
commander (4.2.1)
cookbook-omnifetch (0.2.0)
countloc (0.4.0)
crack (0.4.2)
cucumber (1.3.18)
dep-selector-libgecode (1.0.2)
dep_selector (1.0.3)
descendants_tracker (0.0.4)
diff-lcs (1.2.5)
diffy (3.0.7)
docile (1.1.5)
equalizer (0.0.9)
erubis (2.7.0)
excon (0.43.0)
fakefs (0.6.4)
faraday (0.9.1)
fauxhai (2.2.0)
ffi (1.9.6)
ffi-yajl (1.3.1)
finstyle (1.4.0)
fission (0.5.0)
fog (1.27.0)
fog-atmos (0.1.0)
fog-aws (0.0.6)
fog-brightbox (0.7.1)
fog-core (1.27.3)
fog-ecloud (0.0.2)
fog-json (1.0.0)
fog-profitbricks (0.0.1)
fog-radosgw (0.0.3)
fog-sakuracloud (0.1.2)
fog-serverlove (0.1.1)
fog-softlayer (0.3.30)
fog-storm_on_demand (0.1.0)
fog-terremark (0.0.3)
fog-vmfusion (0.0.1)
fog-voxel (0.0.2)
fog-xml (0.1.1)
foodcritic (4.0.0)
form_data (0.1.0)
formatador (0.2.5)
fuubar (1.3.3)
gherkin (2.12.2)
git (1.2.9.1)
grape (0.10.1)
grape-msgpack (0.1.2)
gssapi (1.0.3)
guard (2.11.1)
guard-compat (1.2.1)
guard-rspec (4.5.0)
gyoku (1.2.2)
hashie (2.1.2)
highline (1.6.21)
hitimes (1.2.2)
http (0.7.1)
http_parser.rb (0.6.0)
httpclient (2.6.0.1, 2.5.3.3)
httpi (0.9.7)
i18n (0.7.0)
ice_nine (0.11.1)
inflecto (0.0.2)
inifile (2.0.2)
io-console (0.4.2)
ipaddress (0.8.0)
json (1.8.2, 1.8.1)
kitchen-vagrant (0.15.0)
knife-container (0.2.4)
knife-spork (1.4.2)
libyajl2 (1.2.0)
listen (2.8.5)
little-plugger (1.1.3)
logging (1.8.2)
lumberjack (1.0.9)
macaddr (1.7.1)
maruku (0.7.2)
metaclass (0.0.4)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.6.2, 0.6.0)
minitar (0.5.4)
minitest (5.5.1, 4.7.5)
mixlib-authentication (1.3.0)
mixlib-cli (1.5.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0)
mixlib-shellout (2.0.1, 1.6.1)
mocha (1.1.0)
moneta (0.6.0)
msgpack (0.5.10)
multi_json (1.10.1)
multi_test (0.1.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
nenv (0.2.0)
net-dhcp (1.3.2)
net-http-persistent (2.9.4)
net-scp (1.2.1)
net-ssh (2.9.2)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.0)
nio4r (1.1.0)
nokogiri (1.6.5, 1.6.3.1)
nori (1.1.5)
notiffany (0.0.3)
octokit (3.7.0)
ohai (8.0.1, 8.0.0, 7.4.1)
open4 (1.3.4)
parallel (1.3.3)
parser (2.2.0.2, 2.1.9)
plist (3.1.0)
polyglot (0.3.5)
powerpack (0.0.9)
pry (0.10.1)
psych (2.0.5)
puma (1.6.3)
rack (1.6.0, 1.5.2)
rack-accept (0.4.5)
rack-mount (0.8.3)
rainbow (2.0.0)
rake (10.4.2, 10.1.1, 10.1.0, 0.9.6)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
rbx-require-relative (0.0.9)
rdoc (4.1.0)
reel (0.5.0)
rest-client (1.6.7)
retryable (2.0.0)
rhc (1.32.2)
ridley (4.1.2)
rspec (3.1.0, 3.0.0, 2.14.1)
rspec-core (3.1.7, 3.0.4, 2.14.8)
rspec-expectations (3.1.2, 3.0.4, 2.14.5)
rspec-mocks (3.1.3, 3.0.4, 2.14.6)
rspec-support (3.1.2, 3.0.4)
rspec_junit_formatter (0.1.6)
rubocop (0.28.0, 0.18.1)
ruby-progressbar (1.7.1)
ruby-shadow (2.4.1)
ruby_gntp (0.3.4)
rubyntlm (0.1.1)
rufus-lru (1.0.5)
safe_yaml (1.0.4)
savon (0.9.5)
sawyer (0.6.0)
semverse (1.2.1)
shellany (0.0.1)
simplecov (0.9.1)
simplecov-html (0.8.0)
slop (3.6.0)
solve (1.2.1)
spork (0.9.2)
systemu (2.6.4)
test-kitchen (1.3.1)
test-unit (2.1.4.0)
thor (0.19.1)
thread_safe (0.3.4)
timers (4.0.1)
treetop (1.4.15)
tzinfo (1.2.2)
uuid (2.3.7)
uuidtools (2.1.5)
varia_model (0.4.0)
virtus (1.0.4)
wasabi (1.0.0)
webmock (1.20.4)
websocket_parser (0.1.6)
winrm (1.2.0)
wmi-lite (1.0.0)
yajl-ruby (1.2.1)
yard (0.8.7.6)


"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.

§