coreos / bugs

Issue tracker for CoreOS Container Linux
https://coreos.com/os/eol/
147 stars 30 forks source link

Vagrant-Coreos: Every vagrant cli command raises "Installing vagrant-ignition" #2494

Open kzpm opened 5 years ago

kzpm commented 5 years ago

Issue Report

Bug

Container Linux Version

Not able to execute vagrant ssh, so no means to extract version on guest system.

$ cat /etc/os-release
NAME="Debian GNU/Linux"
VERSION="9 (stretch)"
...
BUG_REPORT_URL="https://issues.coreos.com"

Environment

What hardware/cloud provider/hypervisor is being used to run Container Linux?

Expected Behavior

vagrant up command should result in creation of 3 machines

Actual Behavior

Reproduction Steps

execute "vagrant up" on cli

Other Information

I have included my Vagrantfile, config.rb and user-data. If you need more info I'm glad to provide!

config.rb.txt user-data.txt Vagrantfile.txt

lucab commented 5 years ago

@kzpm please check the node console in virtualbox. The user-data you attached is not an ignition JSON config, so it is possible that the nodes are simply stuck due to failed provisioning.

For more information, see https://github.com/coreos/coreos-vagrant/#provisioning-with-ignition-virtualbox-provider-default.

kzpm commented 5 years ago

Thanks to the tip from Nuxy in the thread https://github.com/hashicorp/vagrant/issues/8055 the iteration stops and proceeds seemingly normal. Now it is possible to issue vagrant commands again.

I replaced in Vagrantfile:

plugins_to_install = required_plugins.select { |plugin| not Vagrant.has_plugin? plugin }

if not plugins_to_install.empty?
  puts "Installing plugins: #{plugins_to_install.join(' ')}"
  if system "vagrant plugin install #{plugins_to_install.join(' ')}"
    exec "vagrant #{ARGV.join(' ')}"
  else
    abort "Installation of one or more plugins has failed. Aborting."
  end
end

with:

required_plugins = %w[vagrant-plugin-1 vagrant-plugin-2 vagrant-plugin-3]

return if !Vagrant.plugins_enabled?

plugins_to_install = required_plugins.select { |plugin| !Vagrant.has_plugin? plugin }

if plugins_to_install.any?
  system "vagrant plugin install #{plugins_to_install.join(' ')}"
  exit system 'vagrant up'
end
lucab commented 5 years ago

@kzpm glad that you solved it. Reading the other bug report, it sounds like an issue mostly related to the host environment. Which OS/release are you using?