rancher: Rancher breaking "hostname -f"

Rancher Version: 1.2.0

Docker Version: Docker version 1.12.5, build 7392c3b

OS and where are the hosts located? (cloud, bare metal, etc): Ubuntu 16.04 LTS

Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB) single node rancher with internal DB

Environment Type: (Cattle/Kubernetes/Swarm/Mesos) Cattle

Steps to Reproduce: Create a Rancher stack with the following composer content:

test:
  image: ubuntu:14.04
  hostname: mail
  domainname: example.com
  stdin_open: true
  tty: true

Execute shell and type the following command: hostname -f

Results: You will see something like: hostname: Name or service not known

(this happens because rancher doesnt update /etc/hosts proper)

Expected:

I would expect to see something like mail.example.com

(If you run the same composer file with docker-compose it works)

Alot of scripts / docker images rely that this command works and use it to configure services and other things.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

Cool! Thanks for the instructions. I was doing things differently, now I am able to reproduce the problem.

Reopening the issue.