neither EC2 api nor openstack API expose the hostname

Bug #897164 reported by Jimmy Bergman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
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
description: updated
Chuck Short (zulcss)
tags: added: ec2
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/1916
Committed: http://github.com/openstack/nova/commit/88acbe869a22075306999b095ba87a4069a3beac
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

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
Revision history for this message
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 10.0.0.4 10.0.0.4 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 '10.0.0.4', rendering the system basically unreachable.

Revision history for this message
Thierry Carrez (ttx) wrote :

Filed bug 901594 to track this regression

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.