OpenStack Compute (Nova)

Change in hostname exposition renders EC2 API unusable

Reported by Thierry Carrez on 2011-12-08
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Wishlist
Dave Walker

Bug Description

The following commit changed the way hostnames are exposed through the EC2 API, but hides IP addresses in euca-describe-instances as a result:

http://github.com/openstack/nova/commit/88acbe869a22075306999b095ba87a4069a3beac

More comments from smoser on that bug:

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.

Thierry Carrez (ttx) on 2011-12-08
tags: added: ec2
Thierry Carrez (ttx) wrote :

DescribeInstances shows two fields: privateDnsName and dnsName.

Prior to the incriminated commit, code in cloud.py would use:
    privateDnsName = fixed_ip
    dnsName = floating_ip or fixed_ip

With the incriminated commit, it now shows:
    privateDnsName = server_name
    dnsName = floating_ip or server_name

My proposed fix is to use:
    privateDnsName = server_name
    dnsName = floating_ip or fixed_ip

so that the (private) server name is exposed, but the IP address still shows.

Changed in nova:
assignee: nobody → Thierry Carrez (ttx)
status: Confirmed → In Progress
Thierry Carrez (ttx) on 2011-12-08
Changed in nova:
importance: Critical → High
Thierry Carrez (ttx) wrote :

<vishy> ttx: I think I'd like to leave it for now
<vishy> ttx: we can revert for essex if euca doesn't merge smoser's patch
<vishy> (and the dns support from wikimedia doesn't make it in)
<ttx> vishy: ok, will abandon and downgrade prio then

Abandoned for the time being: https://review.openstack.org/#change,2168
See https://blueprints.launchpad.net/nova/+spec/public-and-private-dns

Changed in nova:
importance: High → Wishlist
milestone: essex-2 → none
status: In Progress → Triaged
Scott Moser (smoser) wrote :

I've marked bug 932998 as a dupe of this bug. Some additional info:

 * That bug was filed after an upgrade to essex release for a private cloud ("Canonistack") that Andrew and others maintain, so the bug represents an actual user finding the change unsatisfactory.
 * Essex level of openstack started filling the 'public_dns_name' and 'private_dns_name' fields in a EC2 DescribeInstances response with the hostname values. Previously, the response would contain an ipv4 value. The result is that a user *used* to be able to use the output of 'euca-describe-instances' to get to an instance, but now, they cannot, as the hostname returned is not resolvable.
 * Ubuntu's euca2ools has a '--ipv4' patch that allows https://code.launchpad.net/~smoser/euca2ools/describe-ipv4/+merge/84881

Fix proposed to branch: master
Review: https://review.openstack.org/4690

Changed in nova:
assignee: Thierry Carrez (ttx) → Dave Walker (davewalker)
status: Triaged → In Progress

Reviewed: https://review.openstack.org/4690
Committed: http://github.com/openstack/nova/commit/42a0d3a4b0e7228a28675fc6a6315654914f8c10
Submitter: Jenkins
Branch: master

commit 42a0d3a4b0e7228a28675fc6a6315654914f8c10
Author: Dave Walker (Daviey) <email address hidden>
Date: Wed Feb 29 13:48:56 2012 +0000

    Option expose IP instead of dnshost in ec2 desc'

    As documented in bug 901594, previous nova releases, the IP address
    was exposed as the DNS hostname, which worked well with euca-tools.
    This is unfortunately not always ideal for private clouds.

    Whilst it is expected to be able to euca-describe-instances --ipv4
    in newer euca2ools releases, this behaviour is not always desired.

    This patchset allows the nova admin to set a global flag of:
    --ec2_private_dns_show_ip=True, to restore legacy nova behaviour.

    This does not change the current default behaviour of nova.

    Change-Id: I7c71ffe63929d90d45d9c724ab3409dcdee52b44

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-03-20
Changed in nova:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers