Merge "Fix container hostname for RFC 1034/1035"

This commit is contained in:
Jenkins
2016-04-20 16:10:32 +00:00
committed by Gerrit Code Review
3 changed files with 39 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ openstack_repo_git_url: "http://{{ internal_lb_vip_address }}:{{ repo_server_por
## LXC options
lxc_container_domain: "openstack.local"
lxc_container_caches:
- url: "https://rpc-repo.rackspace.com/container_images/rpc-trusty-container.tgz"
name: "trusty.tgz"

View File

@@ -30,6 +30,29 @@
delay: 1
tags:
- lxc-container-wait-for-ssh
- name: Create domain config
lineinfile:
dest: "/etc/hosts"
regexp: "^127.0.1.1"
line: "127.0.1.1 {{ inventory_hostname | replace('_', '-') }}.{{ lxc_container_domain }} {{ inventory_hostname | replace('_', '-') }}"
owner: "root"
group: "root"
mode: "0644"
tags:
- lxc-container-hostname
- name: Create hostname
copy:
dest: "/etc/hostname"
content: "{{ inventory_hostname | replace('_', '-') }}"
owner: "root"
group: "root"
mode: "0644"
tags:
- lxc-container-hostname
- name: Setup hostname
command: hostname -F /etc/hostname
tags:
- lxc-container-hostname
vars:
is_metal: "{{ properties.is_metal|default(false) }}"
lxc_container_release: "{{ properties.container_release|default('trusty') }}"

View File

@@ -0,0 +1,15 @@
---
features:
- LXC containers will now have a proper RFC1034/5 hostname set during post
build tasks. A localhost entry for 127.0.1.1 will be created by converting
all of the "_" in the ``inventory_hostname`` to "-". Containers will be
created with a default domain of *openstack.local*.
This domain name can be customized to meet your deployment needs by
setting the option ``lxc_container_domain``.
upgrade:
- LXC containers will now have a proper RFC1034/5 hostname set during post
build tasks. A localhost entry for 127.0.1.1 will be created by converting
all of the "_" in the ``inventory_hostname`` to "-". Containers will be
created with a default domain of *openstack.local*.
This domain name can be customized to meet your deployment needs by
setting the option ``lxc_container_domain``.