fix setting hostname for Debian guests #7318

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants
@evgeni

evgeni commented May 16, 2016

Without that setting config.vm.hostname for debian/jessie64 and similar boxes will fail:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

hostname -f

Stdout from the command:



Stderr from the command:

sudo: unable to resolve host jessie.raw
stdin: is not a tty
hostname: Name or service not known

While this should also be fixed in the box itself, the Debian guests plugin should be more tolerant to badly set-up machines.

While at it:

  • don't use sudo for just calling hostname
  • don't consider localhost a valid hostname
@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo May 16, 2016

Contributor

Hi @evgeni

Thank you for the PR - is there an associated issue as well? There doesn't have to be, but we like to cross-link so they close when we merge.

Contributor

sethvargo commented May 16, 2016

Hi @evgeni

Thank you for the PR - is there an associated issue as well? There doesn't have to be, but we like to cross-link so they close when we merge.

@evgeni

This comment has been minimized.

Show comment
Hide comment
@evgeni

evgeni May 16, 2016

@sethvargo no, I did not open an issue for that, went straight for the patch :)

evgeni commented May 16, 2016

@sethvargo no, I did not open an issue for that, went straight for the patch :)

@sethvargo sethvargo added this to the 1.8.2 milestone May 29, 2016

@evgeni

This comment has been minimized.

Show comment
Hide comment

evgeni commented Jun 1, 2016

@sethvargo ping? :)

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Jun 1, 2016

Contributor

Hi @evgeni

I am working to get through the Vagrant issues as quickly as possible. Thanks

Contributor

sethvargo commented Jun 1, 2016

Hi @evgeni

I am working to get through the Vagrant issues as quickly as possible. Thanks

@sethvargo sethvargo closed this in #7393 Jun 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment