ggiamarchi / vagrant-openstack-provider

Use Vagrant to manage OpenStack Cloud instances.
MIT License
245 stars 102 forks source link

SMB credential for shared folders #357

Open paulnguyendotcom opened 6 years ago

paulnguyendotcom commented 6 years ago

My host is Win7. I kept got prompt for SMB credential although I set disabled = true. I tried with my windows domain user in different format : , <domain\user>, user@domain and neither works. Error: **base-ubuntu-16-04: Preparing SMB shared folders... base-ubuntu-16-04: You will be asked for the username and password to use for the SMB base-ubuntu-16-04: folders shortly. Please use the proper username/password of your base-ubuntu-16-04: account. base-ubuntu-16-04: base-ubuntu-16-04: Username: xxx base-ubuntu-16-04: Password (will be hidden): Error! Your console doesn't support hiding input. We'll ask for input again below, but we WILL NOT be able to hide input. If this is a problem for you, ctrl-C to exit and fix your stdin. base-ubuntu-16-04: Password (will be hidden): yyy An unknown error happened in Vagrant OpenStack provider

My Vagrantfile :

_user_config = JSON.parse(File.read("config.json")) nodes_config = (JSON.parse(File.read("nodes.json")))['nodes']

Vagrant.configure("2") do |config| config.vm.synced_folder ".", "/vagrant", disabled: true nodes_config.each do |node|

node_name   = node[0] # name of node
node_values = node[1] # content of node

short_hostname = node_values[':short_hostname']
if short_hostname.nil?
  real_hostname = "#{node_name}.puppetci.local"
else
  real_hostname = "#{short_hostname}.puppetci.local"
end

config.vm.define node_name do |config|

 if user_config['provider'] == 'openstack'
    openstack_user = user_config['openstack_user']
    openstack_hostname = "#{openstack_user}-#{node_name}.puppetci.local"

    config.vm.hostname = openstack_hostname

    config.vm.provider :openstack do |os, override|
      override.vm.box = 'dummy.box'
      override.ssh.username = node_values[':openstack_ssh_user']

      os.openstack_auth_url   = 'xxx'
      os.username             = user_config['openstack_user']
      os.password             = user_config['openstack_password']
      os.flavor               = node_values[':openstack_flavor']
      os.identity_api_version = '3'
      os.floating_ip_pool     = user_config['openstack_floating_ip_pool']
      os.project_name         = user_config['openstack_project_name']
      os.domain_name          = 'yyy'
      os.image                = node_values[':openstack_image']
      os.server_name          = openstack_hostname
      os.user_data            = "#!/bin/bash\nsed -i -- 's/^Defaults\s*requiretty/#Defaults requiretty/g' /etc/sudoers"
    end

    config.vm.provision :shell, :path => node_values[':bootstrap'], :args => "'#{real_hostname}' 'Europe/London'"
  end

  config.vm.provision :puppet do |puppet|
    puppet.hiera_config_path = "conf/hiera.yaml"
    puppet.facter = {
      "role" => node_values[':role']
    }
    puppet.manifests_path = "environments/development/manifests"
    puppet.manifest_file = "init.pp"
    puppet.environment_path = "environments"
    puppet.environment = "development"
    puppet.options = "--verbose"
  end
end

end end_

and config.json _{ "provider": "openstack", "openstack_user": "xxxx", "openstack_password": "yyyy", "openstack_project_name": "zzzz", "openstack_floating_ippool": "nnnn" }

Why does it keep asking for SMB credential? What is the default user/passwd for SMB shared folders? I can't find anything on Google about this error.

FilBot3 commented 5 years ago

I'm also being prompted for an SMB password on my MacOS device when attempting to create instances.

dnsmichi commented 5 years ago

Try https://github.com/puphpet/puphpet/pull/2805 for a solution.