Ask Your Question
0

Create docker instance with the same hostname as the instance name in horizon [closed]

asked 2015-02-04 09:35:49 -0500

Jason90 gravatar image

When you start a docker instance in openstack it creates a hostname like : instance-000000xy Is it possible to create the docker instance with the same hostname as the instance name in horizon?

We use Openstack Juno on Ubuntu 12.04 with latest docker (1.4.1)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Jason90
close date 2015-02-06 02:36:29.079579

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-02-04 23:16:03 -0500

larsks gravatar image

Not without changing the driver source code, no. The driver explicitly sets the container hostname to this generated instance name. You could patch the code to use the instance hostname instead; the actual changes to the code should be minimal.

edit flag offensive delete link more

Comments

I did that, but when you change it to use the hostname in the driver the network is not working.

Jason90 gravatar imageJason90 ( 2015-02-05 02:30:16 -0500 )edit

You would of course need to update the other sections of code that rely on the hostname to locate the container (e.g., in _find_container_by_name, and anything that calls it). So, maybe not minimal after all.

larsks gravatar imagelarsks ( 2015-02-05 07:57:58 -0500 )edit

Thank you, changed everywhere and it works.

Jason90 gravatar imageJason90 ( 2015-02-05 09:02:23 -0500 )edit

Could u pls elaborate what all modifications you did? I want to fix same issue in openstack kilo.

NeetiM gravatar imageNeetiM ( 2015-08-26 04:28:09 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2015-02-04 09:35:49 -0500

Seen: 347 times

Last updated: Feb 04 '15