projectatomic / vagrant-service-manager

To provide the user a CLI to configure the ADB/CDK for different use cases and to provide glue between ADB/CDK and the user's developer environment.
GNU General Public License v2.0
18 stars 16 forks source link

wrong indication geenrated by vagrant service-manager env when there is a space to vagrant home path #456

Open apupier opened 7 years ago

apupier commented 7 years ago

Vagrant version

1.7.4

Host operating system

Windows 10

Guest operating system

RHEL

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile for single node k8s setup
Vagrant.configure(2) do |config|
  config.vm.box = "cdkv2"

  config.registration.username = ENV['SUB_USERNAME']
  config.registration.password = ENV['SUB_PASSWORD']

  config.vm.provider "libvirt" do |libvirt, override|
    libvirt.driver = "kvm"
    libvirt.memory = 1024
    libvirt.cpus = 2
  end

  config.vm.provider "virtualbox" do |vbox, override|
    vbox.memory = 1024
    vbox.cpus = 2

    # Enable use of more than one virtual CPU in a virtual machine.
    vbox.customize ["modifyvm", :id, "--ioapic", "on"]
  end
  config.vm.network "private_network", type: "dhcp"

  config.vm.provision "shell", inline: <<-SHELL
     sudo mkdir -p /etc/pki/kube-apiserver/
     sudo openssl genrsa -out /etc/pki/kube-apiserver/serviceaccount.key 2048
     sudo sed -i.back '/KUBE_API_ARGS=*/c\KUBE_API_ARGS="--service_account_key_file=/etc/pki/kube-apiserver/serviceaccount.key"' /etc/kubernetes/apiserver
     sudo sed -i.back '/KUBE_CONTROLLER_MANAGER_ARGS=*/c\KUBE_CONTROLLER_MANAGER_ARGS="--service_account_private_key_file=/etc/pki/kube-apiserver/serviceaccount.key"' /etc/kubernetes/controller-manager

     sudo systemctl enable etcd kube-apiserver kube-controller-manager kube-scheduler
     sudo systemctl start etcd kube-apiserver kube-controller-manager kube-scheduler

     sudo systemctl enable kube-proxy kubelet
     sudo systemctl start kube-proxy kubelet
     sudo systemctl restart docker
  SHELL
end

Please note, if you are using Homestead or a different Vagrantfile format, we may be unable to assist with your issue. Try to reproduce the issue using a vanilla Vagrantfile first.

Debug output

Provide a link to a GitHub Gist containing the complete debug output: https://www.vagrantup.com/docs/other/debugging.html. Do NOT paste the debug output in the issue, just paste the link to the Gist.

Expected behavior

What should have happened? Path should be escaped in double-quote

$ vagrant service-manager env
# Showing the status of providers in the vagrant box:
# Copying TLS certificates to C:/Users/Aurelien Pupier/cdk/components/rhel/misc/rhel-k8s-singlenode-setup/.vagrant/machines/default/virtualbox                                          /docker
# Set the following environment variables to enable access to the
# docker daemon running inside of the vagrant virtual machine:
setx DOCKER_HOST tcp://172.28.128.4:2376
setx DOCKER_CERT_PATH C:\Users\Aurelien Pupier\cdk\components\rhel\misc\rhel-k8s-singlenode-setup\.vagrant\machines\default\virtualbox\docker\
setx DOCKER_TLS_VERIFY 1
setx DOCKER_MACHINE_NAME a9576fb
### Actual behavior
What actually happened?
$ vagrant service-manager env
# Showing the status of providers in the vagrant box:
# Copying TLS certificates to C:/Users/Aurelien Pupier/cdk/components/rhel/misc/rhel-k8s-singlenode-setup/.vagrant/machines/default/virtualbox                                          /docker
# Set the following environment variables to enable access to the
# docker daemon running inside of the vagrant virtual machine:
setx DOCKER_HOST tcp://172.28.128.4:2376
setx DOCKER_CERT_PATH "C:\Users\Aurelien Pupier\cdk\components\rhel\misc\rhel-k8s-singlenode-setup\.vagrant\machines\default\virtualbox\docker"
setx DOCKER_TLS_VERIFY 1
setx DOCKER_MACHINE_NAME a9576fb

Steps to reproduce

  1. launch vagrant service-manager env in a system where user naem contains space 2. 3.

    References

Are there any other GitHub issues (open or closed) that should be linked here? For example: