Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL: NoMethodError: undefined method `python' for Chef Node #87

Open
d4rkd0s opened this issue Dec 27, 2018 · 0 comments
Open

FATAL: NoMethodError: undefined method `python' for Chef Node #87

d4rkd0s opened this issue Dec 27, 2018 · 0 comments

Comments

@d4rkd0s
Copy link

d4rkd0s commented Dec 27, 2018

When running multinodes on Virtualbox my master1 node fails with a message that appears to be related to Chef and Python.

Using:

   Static hostname: ********
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 5e4e**************************f6130
           Boot ID: 315b*******************************f799
  Operating System: Manjaro Linux
            Kernel: Linux 4.19.12-2-MANJARO
      Architecture: x86-64

Version's of software I'm using:

  • vagrant 2.2.1
  • virtualbox 5.2.22-1
  • chef-dk 3.5.13-1

Vagrant plugins:

  • vagrant-berkshelf (5.1.2, global)
  • vagrant-cachier (1.2.1, global)
  • vagrant-hosts (2.8.3, global)
  • vagrant-omnibus (1.5.0, global)

Here is my cluster.yml (had to upload as .txt for some reason GitHub complains about .yml uploads)
cluster.yml.txt

When running multinodes on Virtualbox I get the following on master1:

==> master1: - ark (4.0.0)
==> master1: Installing Cookbook Gems:
==> master1: Compiling Cookbooks...
==> master1: 
==> master1: ================================================================================
==> master1: Recipe Compile Error in /var/chef/cache/cookbooks/python/attributes/default.rb
==> master1: ================================================================================
==> master1: 
==> master1: 
==> master1: NoMethodError
==> master1: -------------
==> master1: undefined method `python' for #<Chef::Node::Attribute:0x0000000004d62438>
==> master1: 
==> master1: 
==> master1: Cookbook Trace:
==> master1: ---------------
==> master1:   /var/chef/cache/cookbooks/python/attributes/default.rb:23:in `from_file'
==> master1: 
==> master1: 
==> master1: Relevant File Content:
==> master1: ----------------------
==> master1: /var/chef/cache/cookbooks/python/attributes/default.rb:
==> master1: 
==> master1: 
==> master1: 
==> master1:  16:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
==> master1: 
==> master1:  17:  # See the License for the specific language governing permissions and
==> master1: 
==> master1:  18:  # limitations under the License.
==> master1: 
==> master1:  19:  #
==> master1: 
==> master1:  20:  
==> master1: 
==> master1:  21:  default['python']['install_method'] = 'package'
==> master1: 
==> master1:  22:  
==> master1: 
==> master1:  23>> if python['install_method'] == 'package'
==> master1: 
==> master1:  24:    case platform
==> master1: 
==> master1:  25:    when "smartos"
==> master1: 
==> master1:  26:      default['python']['prefix_dir']         = '/opt/local'
==> master1: 
==> master1:  27:    else
==> master1: 
==> master1:  28:      default['python']['prefix_dir']         = '/usr'
==> master1: 
==> master1:  29:    end
==> master1: 
==> master1:  30:  else
==> master1: 
==> master1:  31:    default['python']['prefix_dir']         = '/usr/local'
==> master1: 
==> master1:  32:  end
==> master1: 
==> master1: 
==> master1: 
==> master1: System Info:
==> master1: ------------
==> master1: chef_version=14.8.12
==> master1: 
==> master1: platform=ubuntu
==> master1: 
==> master1: platform_version=14.04
==> master1: 
==> master1: ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
==> master1: 
==> master1: program_name=/usr/bin/chef-solo
==> master1: 
==> master1: executable=/opt/chef/bin/chef-solo
==> master1: 
==> master1: 
==> master1: 
==> master1: Running handlers:
==> master1: [2018-12-27T19:03:32+00:00] ERROR: Running exception handlers
==> master1: Running handlers complete
==> master1: 
==> master1: [2018-12-27T19:03:32+00:00] ERROR: Exception handlers complete
==> master1: Chef Client failed. 0 resources updated in 03 seconds
==> master1: [2018-12-27T19:03:32+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> master1: [2018-12-27T19:03:32+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
==> master1: [2018-12-27T19:03:32+00:00] FATAL: NoMethodError: undefined method `python' for #<Chef::Node::Attribute:0x0000000004d62438>

Note: /var/chef/cache/chef-stacktrace.out did not exist on my host machine, and I've since destroyed the VMs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant