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

Trailing newlines in metadata_url are not ignored #10947

Open
markus456 opened this issue Jul 3, 2019 · 6 comments
Open

Trailing newlines in metadata_url are not ignored #10947

markus456 opened this issue Jul 3, 2019 · 6 comments

Comments

@markus456
Copy link

Vagrant version

Vagrant 2.2.4

Host operating system

Fedora 30

Guest operating system

CentOS 7

Vagrantfile

Vagrant.configure(2) do |config|
  config.vm.network "private_network", type: "dhcp"
  config.vm.boot_timeout = 60

  config.vm.define 'testing_vm' do |box|
    box.vm.box = 'centos/7'
    box.vm.hostname = 'testing-vm'
    box.vm.provider :libvirt do |qemu|
      qemu.driver = 'kvm'
      qemu.cpu_mode = 'host-passthrough'
      qemu.cpus = 8
      qemu.memory = 2048
    end
  end
end

Debug output

$ vagrant box update
==> testing_vm: Checking for updates to 'centos/7'
    testing_vm: Latest installed version: 1710.01
    testing_vm: Version constraints: 
    testing_vm: Provider: libvirt
There was an error while downloading the metadata for this box.
The error message is shown below:

URL using bad/illegal format or missing URL

Expected behavior

vagrant box update should work and ignore trailing whitespace.

Actual behavior

The command returns URL using bad/illegal format or missing URL.

Steps to reproduce

  1. vagrant up with the provided Vagrantfile
  2. Add a trailing newline to metadata_url of the box
  3. vagrant box update

References

@briancain
Copy link
Member

Hi @markus456 - I just added a trailing whitespace to my metadata_url file and vagrant was able to run a vagrant box update just fine without issue. Do you have a full debug log showing this behavior? Also what your metadata_url file looks like? Don't forget to omit your Vagrant Cloud token...thanks!

@markus456
Copy link
Author

markus456 commented Jul 9, 2019

Here's the hexdump of the current and old metadata_url files, the debug output of vagrant box update and the system curl versions.

hexdump-output.txt
debug-output.txt
curl-versions.txt

Maybe it's a problem with how the arguments are passed to curl and/or the curl version installed on the system?

@briancain
Copy link
Member

Worth asking.... @markus456 - how did you install Vagrant on Fedora?

@markus456
Copy link
Author

from the system repositories:

$ dnf info vagrant
Last metadata expiration check: 0:00:24 ago on Wed 10 Jul 2019 07:58:38 PM EEST.
Installed Packages
Name         : vagrant
Version      : 2.2.4
Release      : 2.fc30
Architecture : noarch
Size         : 2.1 M
Source       : vagrant-2.2.4-2.fc30.src.rpm
Repository   : @System
From repo    : updates
Summary      : Build and distribute virtualized development environments
URL          : http://vagrantup.com
License      : MIT
Description  : Vagrant is a tool for building and distributing virtualized development
             : environments.

@briancain
Copy link
Member

OK @markus456 - ...we've had trouble with how fedora packages Vagrant. I recommend installing from the officially supported installers and see if that fixes it for you: https://www.vagrantup.com/downloads.html

@markus456
Copy link
Author

I'd say if the latest official packages doesn't have this problem, it's a Fedora problem in which case this issue can be closed.

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

3 participants