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

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

Closed
weijianwen opened this issue Oct 11, 2023 · 4 comments
Closed

Comments

@weijianwen
Copy link

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

@weijianwen
Copy link
Author

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.

@kenyon
Copy link
Member

kenyon commented Oct 12, 2023

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.

@hbrown-uiowa
Copy link
Contributor

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.

yakatz added a commit to yakatz/facterdb that referenced this issue May 16, 2024
It usually doesn't make sense to try to rebuild all facts at once, so make users specify the machines they want.

Helps clear up situations like voxpupuli#288
yakatz added a commit to yakatz/facterdb that referenced this issue May 16, 2024
It usually doesn't make sense to try to rebuild all facts at once, so make users specify the machines they want.

Helps clear up situations like voxpupuli#288
yakatz added a commit to yakatz/facterdb that referenced this issue May 16, 2024
It usually doesn't make sense to try to rebuild all facts at once, so make users specify the machines they want.

Helps clear up situations like voxpupuli#288
@yakatz
Copy link
Contributor

yakatz commented May 27, 2024

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

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

No branches or pull requests

5 participants