Docker nova name = hostname [closed]

asked 2014-01-27 09:01:59 -0600

Nuriel gravatar image


It is possible to pass a hostname to Docker upon creation of a container. However, I noticed that when booting a Docker container with openstack, the container gets assigned a hostname in the format "instance-0000002a" and the nova name has nothing to do with it.

Is it possible to implement this into the Docker nova driver so that the nova instance name also becomes the actual hostname on that instance? Having the "instance-000000..." format does not make much sense.


edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by Nuriel
close date 2014-01-29 05:32:37.717391

1 answer

Sort by ยป oldest newest most voted

answered 2014-01-29 02:29:49 -0600

Nuriel gravatar image

updated 2014-01-29 02:34:39 -0600

Well, I know this is very unorthodox modification to do, but I really had to have this accomplished.


instance['name'] = instance['hostname']

just above :

args = {
  'Hostname': instance['name'],
  'Image': image_name,
  'Memory': self._get_memory_limit_bytes(instance)

at "def spawn":


and restarted nova-compute.

edit flag offensive delete link more


doesn't work. not with icehouse nor with juno...

Jason90 gravatar imageJason90 ( 2015-02-04 10:00:08 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-01-27 09:01:59 -0600

Seen: 181 times

Last updated: Jan 29 '14