Coder Social home page Coder Social logo

Errno::ENAMETOOLONG about chef-zero HOT 10 CLOSED

chef avatar chef commented on July 27, 2024
Errno::ENAMETOOLONG

from chef-zero.

Comments (10)

sethvargo avatar sethvargo commented on July 27, 2024

I've also gotten this error. In Ruby, filenames are limited to 255 characters, because <reasons>. I think we'll need to look into SHAing files or something. In the meantime, you can shorten the name of your Test Kitchen suite.

from chef-zero.

cstewart87 avatar cstewart87 commented on July 27, 2024

Can't seem to replicate it anymore, however, I had forgotten to run berks update after updating the metadata.rb and that seemed to resolve things. Strange error for that sort of thing, I'll keep any eye out for anything else like that.

In regard to the filename being to long, you'll notice that the filename it was trying to use was actually the contents of the node data (hard to see because I cut off some of the stacktrace).

from chef-zero.

sethvargo avatar sethvargo commented on July 27, 2024

@cstewart87 it wasn't; that's just a bad stacktrace. This is a real error that we need to deal with at some point.

from chef-zero.

stevendanna avatar stevendanna commented on July 27, 2024

@sv As a heads up, it isn't just a Ruby limitation. Ext3 and Ext4 both have a max filename length of 255 bytes. I'm unsure about other filesystems.

from chef-zero.

sethvargo avatar sethvargo commented on July 27, 2024

@stevendanna how does the Chef Server handle this limitation /cc @seth

from chef-zero.

stevendanna avatar stevendanna commented on July 27, 2024

Does anyone have a reproduction case of this? If so, can you post the details here and/or post the full stack trace?

from chef-zero.

sethvargo avatar sethvargo commented on July 27, 2024

@stevendanna @paulmooring had something yesterday

from chef-zero.

HighwayofLife avatar HighwayofLife commented on July 27, 2024
[2014-02-01T20:10:05-08:00] ERROR: #<Errno::ENAMETOOLONG: File name too long - {
         "name": "fm_services",
         "description": "Shared Services components coobook",
         "long_description": "",
         "maintainer": "David Lewis",
         "maintainer_email": "<snip>",
         "license": "Proprietary",
         "platforms": {
           "centos": ">= 0.0.0",
           "redhat": ">= 0.0.0"
         },
         "dependencies": {
           "fm_nexus": ">= 0.0.0",
           "fm_tomcat": ">= 0.0.0",
           "java": ">= 0.0.0",
           "fm-base": ">= 0.0.0",
           "fm_logstash_agent": ">= 0.0.0",
           "openssl": ">= 0.0.0",
           "minitest-handler": ">= 0.0.0"
         },
         "recommendations": {
         },
         "suggestions": {
         },
         "conflicting": {
         },
         "providing": {
         },
         "replacing": {
         },
         "attributes": {
         },
         "groupings": {
         },
         "recipes": {
         },
         "version": "2.0.22"
       }
       >
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-zero-1.7.2/lib/chef_zero/cookbook_data.rb:77:in `read'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-zero-1.7.2/lib/chef_zero/cookbook_data.rb:77:in `from_json'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-zero-1.7.2/lib/chef_zero/cookbook_data.rb:42:in `metadata_from'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/chef_fs/chef_fs_data_store.rb:366:in `get_single_cookbook_version'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/chef_fs/chef_fs_data_store.rb:181:in `list'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-zero-1.7.2/lib/chef_zero/rest_base.rb:55:in `list_data'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-zero-1.7.2/lib/chef_zero/endpoints/environment_cookbook_versions_endpoint.rb:24:in `block in post'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-zero-1.7.2/lib/chef_zero/endpoints/environment_cookbook_versions_endpoint.rb:16:in `each'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-zero-1.7.2/lib/chef_zero/endpoints/environment_cookbook_versions_endpoint.rb:16:in `post'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-zero-1.7.2/lib/chef_zero/rest_base.rb:29:in `call'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-zero-1.7.2/lib/chef_zero/rest_router.rb:23:in `call'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-zero-1.7.2/lib/chef_zero/server.rb:335:in `block in make_app'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/server.rb:412:in `call'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/server.rb:412:in `handle_request'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/server.rb:306:in `process_client'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/server.rb:215:in `block in run'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/thread_pool.rb:94:in `call'
       /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/thread_pool.rb:94:in `block in spawn_thread'

from chef-zero.

HighwayofLife avatar HighwayofLife commented on July 27, 2024

The version of chef_zero in chef chef-11.8.2-1 that was downloaded to the Vagrant VM via Chef Omnibus (latest) was asking for a filename, however the latest version in master is asking for a json string. There is a bug in the current "stable" version, but the current version of master appears to work fine.
The question I have is... from the .kitchen.yml file, how would I specify it pull the latest version of chef_zero from master?

from chef-zero.

sethvargo avatar sethvargo commented on July 27, 2024

@HighwayofLife that is not currently possible. I'll see about cutting a new release.

from chef-zero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.