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

Unable to set hostname in Ubuntu 12.04 (and any version without hostnamectl) #5934

Closed
aidanhs opened this issue Jul 11, 2015 · 6 comments · Fixed by #5937
Closed

Unable to set hostname in Ubuntu 12.04 (and any version without hostnamectl) #5934

aidanhs opened this issue Jul 11, 2015 · 6 comments · Fixed by #5937
Milestone

Comments

@aidanhs
Copy link
Contributor

aidanhs commented Jul 11, 2015

Broken by #5753 I assume.

Probably should be return super unless vivid?.

@aidanhs
Copy link
Contributor Author

aidanhs commented Jul 11, 2015

Error:

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

hostnamectl set-hostname 'myhostname'

Stdout from the command:



Stderr from the command:

stdin: is not a tty
bash: line 3: hostnamectl: command not found

@dhoppe
Copy link
Contributor

dhoppe commented Jul 11, 2015

I am facing the same issue and using return super unless vivid?solved the problem.

aidanhs added a commit to aidanhs/vagrant that referenced this issue Jul 11, 2015
@sethvargo sethvargo added this to the 1.7.4 milestone Jul 11, 2015
@stucki
Copy link

stucki commented Jul 14, 2015

Happens in Ubuntu 14.04 as well, but your patch covers it too.
Still, can you please update the bug title to match that version as well? Thanks!

@aidanhs aidanhs changed the title Unable to set hostname in 12.04 Unable to set hostname in Ubuntu 12.04 and 14.04 Jul 15, 2015
@aidanhs
Copy link
Contributor Author

aidanhs commented Jul 15, 2015

Updated.

@aidanhs aidanhs changed the title Unable to set hostname in Ubuntu 12.04 and 14.04 Unable to set hostname in Ubuntu 12.04 (and any version without hostnamectl) Jul 15, 2015
@aidanhs
Copy link
Contributor Author

aidanhs commented Jul 15, 2015

Actually, not sure why it would happen on 14.04. According to #5947, "hostnamectl was introduced to ubuntu after 13.04". Re-tweaked issue title.

@stucki
Copy link

stucki commented Jul 15, 2015

The program belongs to systemd-services which was not required until Ubuntu switched to systemd by default in 15.04. So in 14.04 the package might be missing on some systems. In my case, I'm using vagrant-lxc with the default image by @fgrehm fgrehm/trusty64, which does not contain the package.

Anyway, thanks for updating the bug description!

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.

4 participants