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

Debian guest is not detected after changing /etc/issue #7826

Closed
ganto opened this issue Sep 26, 2016 · 0 comments
Closed

Debian guest is not detected after changing /etc/issue #7826

ganto opened this issue Sep 26, 2016 · 0 comments

Comments

@ganto
Copy link
Contributor

ganto commented Sep 26, 2016

Vagrant version

Vagrant 1.8.5

Host operating system

Gentoo

Guest operating system

Debian Jessie

Vagrantfile

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

ENV["VAGRANT_DEFAULT_PROVIDER"] = "lxc"

Vagrant.configure(2) do |config|

  config.vm.define "webmail" do |webmail|
    webmail.vm.hostname = "webmail.example.com"
  end
  config.vm.define "mail" do |mail|
    mail.vm.hostname = "mail.example.com"
  end

  config.vm.box = "debian/jessie64"

  config.vm.provision "shell", inline: <<-SHELL
    sudo apt-get update
    sudo apt-get -y upgrade
  SHELL

  config.vm.provision "ansible" do |ansible|
    ansible.galaxy_role_file = "requirements.txt"
    ansible.playbook = "vagrant_debops_mailer.yml"
    ansible.extra_vars = {
      vagrant_debops__debops__update_method: 'async'
    }
    ansible.groups = {
      "debops_master" => [ "webmail" ],
      "debops_all_hosts" => [ "webmail", "mail" ],
      "debops_all_hosts:vars" => {
         "console_sysctl_kernel_shm_values" => "{}",
         "dhparam__bits" => "[ '1024' ]",
         "ferm__enabled" => "False",
         "nullmailer__relayhost" => "mail.example.com",
         "users_list" => "[ { 'name': 'user1' }, { 'name': 'user2' } ]"
      },
      "debops_service_dovecot" => [ "mail" ],
      "debops_service_dovecot:vars" => {
         "dovecot_protocols" => "[ 'imap', 'managesieve' ]",
         "dovecot_mail_location" => "maildir:~/Maildir"
      },
      "debops_service_postfix" => [ "mail" ],
      "debops_service_postfix:vars" => {
         "postfix" => "[ 'local', 'network', 'mx', 'submission', 'client', 'auth', 'test' ]",
         "postfix_default_local_alias_recipients" => "[ 'user1' ]",
         "postfix_mydestination" => "[ 'example.com' ]",
         "postfix_mynetworks" => "[ '{{ ansible_default_ipv4.network }}/{{ (\"0.0.0.0/\" + ansible_default_ipv4.netmask) | ipaddr(\"prefix\") }}' ]",
         "postfix_local_maincf" => "home_mailbox = Maildir/"
      },
      "debops_service_roundcube" => [ "webmail" ],
      "debops_service_roundcube:vars" => {
         "roundcube__domain" => "[ 'webmail.example.com' ]",
         "roundcube__default_host" => "tls://mail.example.com",
         "roundcube__smtp_host" => "tls://mail.example.com",
         "roundcube__smtp_port" => "587"
      }
    }
  end

  # This requires the Vagrant hostmanager plugin to be installed.
  config.hostmanager.enabled = true
  config.hostmanager.manage_host = true
  config.hostmanager.manage_guest = true
end

Error Message

After the initial setup of the machines, I ran the debops command inside the machines which would modify /etc/issue. After shutting down the machine, a vagrant up resulted in an error:

$ vagrant up  webmail
Bringing machine 'webmail' up with 'lxc' provider...
==> webmail: Checking if box 'debian/jessie64' is up to date...
==> webmail: Setting up mount entries for shared folders...
    webmail: /vagrant => /home/ganto/vagrant/vagrant-projects/debops-jessie64-mailer-lxc
==> webmail: Starting container...
==> webmail: Waiting for machine to boot. This may take a few minutes...
    webmail: SSH address: 192.168.123.254:22
    webmail: SSH username: vagrant
    webmail: SSH auth method: private key
==> webmail: Machine booted and ready!
==> webmail: Setting hostname...
==> webmail: An error occurred. The error will be shown after all tasks complete.
An error occurred while executing multiple actions in parallel.
Any errors that occurred are shown below.

An error occurred while executing the action on the 'webmail'
machine. Please handle this error then try again:

Vagrant attempted to execute the capability 'change_host_name'
on the detect guest OS 'linux', but the guest doesn't
support that capability. This capability is required for your
configuration of Vagrant. Please either reconfigure Vagrant to
avoid this capability or fix the issue by creating the capability.

An error occurred while executing the action on the 'mail'
machine. Please handle this error then try again:

Vagrant attempted to execute the capability 'change_host_name'
on the detect guest OS 'linux', but the guest doesn't
support that capability. This capability is required for your
configuration of Vagrant. Please either reconfigure Vagrant to
avoid this capability or fix the issue by creating the capability.

Expected behavior

Machine should properly be detected as Debian Linux.

Actual behavior

The OS detection mechanism of Vagrant failed because /etc/issue within the machine is not the original file shipped by Debian anymore:

--- /etc/issue.orig  2016-09-12 06:09:59.000000000 +0200
+++ /etc/issue      2016-09-26 12:40:48.534441577 +0200
@@ -1,2 +1,7 @@
-Debian GNU/Linux 8 \n \l
+
+      /\\       \n.\O
+     /  \\      Example
+    DebOps
+     \\  /      \l / \U
+      \\/       \s \r

Steps to reproduce

  1. Create a Debian machine
  2. Adjust /etc/issue in the machine that it won't contain the word Debian anymore
  3. Shutdown the machine
  4. Startup the machine
@chrisroberts chrisroberts added this to the 1.8 milestone Oct 4, 2016
@ganto ganto closed this as completed Jan 19, 2017
briancain added a commit to briancain/vagrant that referenced this issue Aug 29, 2017
This commit introduces the salt_arg option that allows a user to pass
additional command line flags to the `salt` tool when provisioning with
a master setup.

It also adds additional config validation to ensure that both
`salt_args` and `salt_call_args` is an array.
briancain added a commit to briancain/vagrant that referenced this issue Aug 29, 2017
This commit introduces the salt_arg option that allows a user to pass
additional command line flags to the `salt` tool when provisioning with
a master setup.

It also adds additional config validation to ensure that both
`salt_args` and `salt_call_args` is an array.
@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants