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

Network is unrealiable in generic/ubuntu1804 box #11256

Closed
Wenzel opened this issue Dec 15, 2019 · 3 comments
Closed

Network is unrealiable in generic/ubuntu1804 box #11256

Wenzel opened this issue Dec 15, 2019 · 3 comments

Comments

@Wenzel
Copy link

Wenzel commented Dec 15, 2019

Vagrant version

Vagrant 2.2.6

Host operating system

Windows 10 build 1909

Guest operating system

generic/ubuntu1804

Vagrantfile

Please look at the following repository:
https://github.com/Wenzel/vagrant-oswatcher

Provider: Hyper-V

Vagrant.configure("2") do |config|
    config.vm.box = "generic/ubuntu1804"
    config.vm.box_version = "2.0.6"
    config.vm.define "oswatcher"
    # OSWatcher local git repo
    oswatcher_path = "/path/to/oswatcher"

    config.vm.provider "hyper-v" do |hyperv|
        hyperv.vmname = "oswatcher"
        hyperv.cpus = 2
        hyperv.memory = 2048
        # allow nested virtualization
        hyperv.enable_virtualization_extensions = true
    end

    config.vm.synced_folder ".", "/vagrant"
    # make oswatcher local path accessible as /vagrant/oswatcher
    config.vm.synced_folder oswatcher_path, "/vagrant/oswatcher"

    config.vm.provision "ansible_local" do |ansible|
        ansible.compatibility_mode = "2.0"
        ansible.playbook = "ansible/playbook.yml"
        ansible.extra_vars = {
          'oswatcher_path': "/vagrant/oswatcher",
        }
    end
end

Debug output

I don't believe Vagrant's debug log are useful here,
since the box configuration seems to be the root cause of this issue.

Expected behavior

The box should have been provisionned without any issues.

Actual behavior

The Ansible playbook systematically fails because of a network issue:

  • Temporary failure resolving us.archive.ubuntu.com
  • 400 bad request
  • 404 not found

Or even before the Ansible playbook is executed, the network fails.
dns1
dns2
dns3

And if it manages to execute the playbook, it systematically fails here:
dns4

I had to add a retry statement in my Ansible task to force retry until the network is reachable:

    - name: install OSWatcher system dependencies
      package:
        name: "{{ item }}"
      with_items:
        - virtualenv
        - python3-virtualenv
        - libguestfs0
        - libguestfs-dev
        - python3-guestfs
        - python3-dev
        - pkg-config
        - libvirt-dev
      register: result
      until: result is succeeded
      retries: 3
      delay: 10

Result:
retry

Steps to reproduce

  1. git clone https://github.com/Wenzel/vagrant-oswatcher
  2. git clone https://github.com/Wenzel/oswatcher
  3. Edit vagrant-oswatcher/Vagrantfile and set the local path to oswatcher's repo
  4. vagrant up --provider hyperv

Note: I suppose the Vagrant team manages generic boxes on Vagrant's Cloud.

Thanks !

@briancain
Copy link
Member

Hey there @Wenzel - Since you mentioned you didn't think it was Vagrant but the box configuration you are using, please open an issue with the Generic group who maintains those boxes. You can find the repository here: https://github.com/lavabit/robox

If it's actually an issue with Vagrant feel free to ping us on here or open a new issue, thanks!

@Wenzel
Copy link
Author

Wenzel commented Dec 16, 2019

@briancain thanks for the link, will open an issue there !

@ghost
Copy link

ghost commented Jan 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants