neither EC2 api nor openstack API expose the hostname

Bug #897164 reported by Jimmy Bergman on 2011-11-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Jimmy Bergman

Bug Description

It would be great if there was a way to retrieve the generated hostname for an instance (i.e. the content of the hostname column of the instances table), preferably in both the EC2 and the openstack API.

I guess for the EC2 api, we could change:
privateDnsName to have the hostname instead of fixed_ip since the IPs are available anyway.

For the openstack api, I think the following would be the cleanest solution:
diff --git a/nova/api/openstack/v2/schemas/v1.1/server.rng b/nova/api/openstack/v2/schemas/v1.1/server.rng
index 2e86ccf..b3d0a7d 100644
--- a/nova/api/openstack/v2/schemas/v1.1/server.rng
+++ b/nova/api/openstack/v2/schemas/v1.1/server.rng
@@ -7,6 +7,7 @@
   <attribute name="updated"> <text/> </attribute>
   <attribute name="created"> <text/> </attribute>
   <attribute name="hostId"> <text/> </attribute>
+ <attribute name="hostname"> <text/> </attribute>
   <attribute name="accessIPv4"> <text/> </attribute>
   <attribute name="accessIPv6"> <text/> </attribute>
   <attribute name="status"> <text/> </attribute>

Tags: ec2 Edit Tag help
description: updated
Chuck Short (zulcss) on 2011-11-29
tags: added: ec2
Thierry Carrez (ttx) on 2011-12-02
Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed

Submitter: Jenkins
Branch: master

 status fixcommitted

commit 88acbe869a22075306999b095ba87a4069a3beac
Author: Jimmy Bergman <email address hidden>
Date: Mon Nov 28 12:33:58 2011 +0100

    Fix for EC2 API part of bug 897164

    Change-Id: I96344eaccd2f42b70223b3c155a4793ab00d09d5

Changed in nova:
status: Confirmed → Fix Committed
Scott Moser (smoser) wrote :

This change makes devstack nearly unusable.

Now, a euca-describe-instances shows:
$ euca-describe-instances i-00000003
RESERVATION r-jwxxgohs 2 default
INSTANCE i-00000003 ami-00000007 server-3 server-3 running mykey 1 m1.small 2011-12-08T01:40:06Z nova

previously, it would show:
$ euca-describe-instances i-00000003
RESERVATION r-jwxxgohs 2 default
INSTANCE i-00000003 ami-00000007 running mykey 1 m1.small 2011-12-08T01:40:06Z nova

The reason this is bad, is that I have no way of turning 'server-3' into '', rendering the system basically unreachable.

Thierry Carrez (ttx) wrote :

Filed bug 901594 to track this regression

Thierry Carrez (ttx) on 2011-12-14
Changed in nova:
milestone: none → essex-2
status: Fix Committed → Fix Released
Mark McLoughlin (markmc) on 2012-04-03
Changed in nova:
assignee: nobody → Jimmy Bergman (jimmy-sigint)
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-2 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers