voxpupuli / facterdb

A Database of OS facts provided by Facter

Home Page:http://voxpupuli.org/facterdb/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to add new OS support due to errors when `vagrant up --provision`

weijianwen opened this issue · comments

I'm trying to add OpenEuler 23 as a supported OS by Puppet. But I failed in vagrant up --provision when following instructions to add more OS facter into facterdb.

voxpupuli/puppet-yum#322

I tried this on OpenEuler 22.03 (x86_64) + VirtualBox 6.1 + Vagrant 2.3.7 . Steps to reproduce this issue are:

  1. Install VirtualBox and Vagrant.
  2. Clone facterdb by git clone https://github.com/voxpupuli/facterdb.git .
  3. Try to start the VM by cd facterdb/facts && vagrant up --provision then get the following messages. Please find the full log file attached.
    debian-10-x86_64: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.                                                                                      
    debian-10-x86_64:                                                                                                                                                         
    debian-10-x86_64: current directory:                                                                                                                                      
    debian-10-x86_64: /home/vagrant/vendor/bundler/ruby/2.7.0/gems/ffi-1.16.3/ext/ffi_c                                                                                       
    debian-10-x86_64: /opt/puppetlabs/puppet/bin/ruby -I /opt/puppetlabs/puppet/lib/ruby/2.7.0 -r                                                                             
    debian-10-x86_64: ./siteconf20231011-3649-1oes40w.rb extconf.rb                                                                                                           
    debian-10-x86_64: checking for ffi.h... *** extconf.rb failed ***                                                                                                         
    debian-10-x86_64: Could not create Makefile due to some reason, probably lack of necessary                                                                                
    debian-10-x86_64: libraries and/or headers.  Check the mkmf.log file for more details.  You may                                                                           
    debian-10-x86_64: need configuration options.                                                     
...

vagrantlog.txt

Rerun vagrant gives different error messages.

    debian-10-x86_64: Installing sys-filesystem 1.4.4                                                                                                                         
    debian-10-x86_64: Bundle complete! 4 Gemfile dependencies, 7 gems now installed.                                                                                          
    debian-10-x86_64: Bundled gems are installed into `./vendor/bundler`                                                                                                      
    debian-10-x86_64: Fetching gem metadata from https://rubygems.org/........                                                                                                
    debian-10-x86_64: Resolving dependencies...                                                                                                                               
    debian-10-x86_64: Could not find compatible versions                                                                                                                      
    debian-10-x86_64:                                                                                                                                                         
    debian-10-x86_64: Because facter >= 4.0.7.pre, < 4.2.0 depends on Ruby ~> 2.3                                                                                             
    debian-10-x86_64: and facter >= 4.0.0, < 4.0.7.pre could not be found in rubygems repository                                                                              
    debian-10-x86_64: https://rubygems.org/ or installed locally,                                                                                                             
    debian-10-x86_64:   facter >= 4.0.0, < 4.2.0 requires Ruby ~> 2.3.                                                                                                        
    debian-10-x86_64: So, because Gemfile depends on facter ~> 4.0.0                                                                                                          
    debian-10-x86_64:   and current Ruby version is = 3.2.2,                                                                                                                  
    debian-10-x86_64:   version solving has failed.                                                                                                                           
    debian-10-x86_64: bundle update failed for facter version: 4.0.0                                                                                                          
    debian-10-x86_64: Fetching gem metadata from https://rubygems.org/........                                                                                                
    debian-10-x86_64: Resolving dependencies...                                                                                                                               
    debian-10-x86_64: Could not find compatible versions                                                                                                                      
    debian-10-x86_64:                                                                                                                                                         
    debian-10-x86_64: Because facter >= 4.0.7.pre, < 4.2.0 depends on Ruby ~> 2.3                                                                                             
    debian-10-x86_64:   and Gemfile depends on facter ~> 4.1.0,                                                                                                               
    debian-10-x86_64:   Ruby ~> 2.3 is required.
    debian-10-x86_64: So, because current Ruby version is = 3.2.2,
    debian-10-x86_64:   version solving has failed.
    debian-10-x86_64: bundle update failed for facter version: 4.1.0
    debian-10-x86_64: Fetching gem metadata from https://rubygems.org/........
    debian-10-x86_64: Resolving dependencies...
    debian-10-x86_64: Fetching facter 4.2.14 (was 4.5.0)
    debian-10-x86_64: Installing facter 4.2.14 (was 4.5.0)
    debian-10-x86_64: Bundle updated!
    debian-10-x86_64: Fetching gem metadata from https://rubygems.org/........
    debian-10-x86_64: Resolving dependencies...
    debian-10-x86_64: Fetching facter 4.3.1 (was 4.2.14)
    debian-10-x86_64: Installing facter 4.3.1 (was 4.2.14)
    debian-10-x86_64: Bundle updated!
    debian-10-x86_64: Fetching gem metadata from https://rubygems.org/........
    debian-10-x86_64: Resolving dependencies...
    debian-10-x86_64: Fetching facter 4.4.3 (was 4.3.1)
    debian-10-x86_64: Installing facter 4.4.3 (was 4.3.1)
    debian-10-x86_64: Bundle updated!
==> debian-10-x86_64: Running provisioner: shell...
    debian-10-x86_64: Running: inline script
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

Do you need to run every OS in the Vagrantfile just to generate facts for one new OS? Seems like there must be a better way.

You can run just a single image via:

vagrant up --provision $img_name

where the img_name is the bit in quotes after the config.vm.define in the Vagrantfile.

In order to add facterdb facts for OpenEuler, you'll need to alter Vagrantfile and potentially the facts/get_facts.sh script.

facterdb no longer supports Debian 10. Please reopen if this is an issue with a different OS.