Merge lp://staging/~lifeless/pyjuju/bug-945505 into lp://staging/pyjuju

Proposed by Robert Collins
Status: Work in progress
Proposed branch: lp://staging/~lifeless/pyjuju/bug-945505
Merge into: lp://staging/pyjuju
Diff against target: 70 lines (+7/-7)
3 files modified
juju/providers/ec2/machine.py (+1/-1)
juju/providers/ec2/tests/test_getmachines.py (+4/-4)
juju/providers/ec2/tests/test_machine.py (+2/-2)
To merge this branch: bzr merge lp://staging/~lifeless/pyjuju/bug-945505
Reviewer Review Type Date Requested Status
Gustavo Niemeyer Disapprove
Martin Packman (community) Abstain
Review via email: mp+111754@code.staging.launchpad.net

Description of the change

This changes the EC2 Machine provider to supply the public IP rather than the public DNS to the Machine instance. Machines don't have ip and dns, only one contact field, but that is stringifie pretty much everywhere, so putting ip addresses in it works fine.

I think we should probably rename the public and private names to endpoints, or something similar, to avoid confusion, but thats clearly orthogonal to this patch, which merely changes how its populated.

We don't, as far as I can tell, need to do this for internal names, as the inside-openstack dnsmasq instance handles them, its only the public ones, for the client machine, that need to avoid depending on DNS.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

So, it's a little perverse putting ip_address in an attribute named dns_name but it's what I do with the openstack provider too.

Having this as a flag-day revision rather than continuing with the old behaviour for previous txaws releases I'm a bit wary of, given the lack of a txaws release that actually includes the required change.

Updating juju/machine/__init__.py or at least the comment there would be good.

review: Abstain
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Actually txaws 0.2.3 includes ipAddress.

Revision history for this message
Martin Packman (gz) wrote :

Confusing, is there any record of when 0.2.3 was released or what changes it contains? I'm failing via the normal methods of looking at the release page, tags on the branch, log of when the version was changed... some means other than inspecting the tarball?

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

I'm -1 on changing this as suggested. If a DNS name is available, it should be provided instead of the IP address, and we shouldn't be changing such an API without better reasoning. What's breaking at the moment? Do we have cases where the DNS name does not exist? If so, we could fallback to the IP adddress.

review: Disapprove
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

this appears to be a common issue with private with private clouds where
the dns given is invalid outside of the cloud network, ie. not pubilcly
accessible dns names. which is problematic even connecting juju client to
the env.

-k

On Tue, Jun 26, 2012 at 1:07 PM, Gustavo Niemeyer <email address hidden>wrote:

> The proposal to merge lp:~lifeless/juju/bug-945505 into lp:juju has been
> updated.
>
> Status: Needs review => Work in progress
>
> For more details, see:
> https://code.launchpad.net/~lifeless/juju/bug-945505/+merge/111754
> --
> https://code.launchpad.net/~lifeless/juju/bug-945505/+merge/111754
> You are subscribed to branch lp:juju.
>

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

I'm instinct is that if the API is reporting a public DNS name that is not public, that isn't an issue with juju. We could argue equally that the public IP may well be private too, and be inaccessible.

I'm happy to understand more about the use case, though. Who can I talk to that is having this issue right now?

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

the bug reporter, there are a few others who have similiar issues as well..

On Tue, Jun 26, 2012 at 1:24 PM, Gustavo Niemeyer <email address hidden>wrote:

> I'm instinct is that if the API is reporting a public DNS name that is not
> public, that isn't an issue with juju. We could argue equally that the
> public IP may well be private too, and be inaccessible.
>
> I'm happy to understand more about the use case, though. Who can I talk to
> that is having this issue right now?
>
> --
> https://code.launchpad.net/~lifeless/juju/bug-945505/+merge/111754
> You are subscribed to branch lp:juju.
>

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

> the bug reporter, there are a few others who have similiar issues as well..

Okay, so hopefully we'll hear from him.

Revision history for this message
Robert Collins (lifeless) wrote :

You can talk to me, you can talk to everyone using canonistack. I'd be
delighted to step you through whats going on, including exactly what
private openstack instances hand out and what the challenges are. I
will note that Martin Packman has used IP in the openstack provider
*for exactly this reason*. So if you are -1 on this proposal because
of the way it uses DNS, it would be consistent to be -1 on the
openstack provider for the same reason.

This is whats going on - I thought I detailed it elsewhere already,
but apparently not :)

Openstack hands out DNS entries of the form 'Server-N' (see Ted
Gould's post to canonical-tech, for instance). for *both* its public
and private dns entries.

Thats not resolvable at all, unless you manually expose dnsmasq on
your nova-network controller *and* add that as your primary DNS
server. Which won't work at all when dealing with multi-region
openstack.

It is extensible by writing a custom 'public dns api provider' for
nova, which brokers DNS names, either setting them to be like the ec2
ones (which embed the IP address in them so that amazon can bulk-load
their entire zone at once for a region), or letting you do arbitrary
custom funky stuff like using an LDAP backed DNS server. There is no
sensible-default shipped, or (that I know of) publically available.
Certainly a helper for bind to do amazon's trick would be useful for
folk, but not very useful for people that throw maas at 5 machines
under their desk and bring up openstack on top of that.

The private dns name isn't extensible at all today. And its also just
'server-N' not 'server-N.$customzone'. euca-describe-instances for
canonistack, for instance:
INSTANCE i-00000080 ami-000000bf server-128
server-128 running 0 m1.small
2012-06-27T03:09:18.000Z nova
monitoring-disabled 10.55.63.14 10.55.63.14
instance-store

Note that the only way to tell that this is canonistack2 vs
canonistack1 is the ip address.

This gets worse though (and my patch doesn't help with the next bit -
though its on my list (to let juju ssh $unit work for private
openstack clouds): The machines themselves report hostnames that are
only resolvable within the cloud itself without special configuration:
'server-128.canonistack2' (hostname == server128', but unless you have
specially configured DNS (or for Canonistack users, ~/.ssh.config),
thats not resolvable at all.

Using IP addresses would provide a single point to configure to let
this work, and work with vpns, ssh etc with equal ease. I don't think
the same can be said for dns.

-Rob

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Thanks Rob.

I'm copy & pasting this to the bug and following up there.

Unmerged revisions

545. By Robert Collins

Use the EC2 IP address rather than public DNS name. Openstack clouds do
not have out of the box sane DNS mapping implementations (vs EC2 which
just has the ip address statically mapped in DNS), so the public name
returned by openstack is 'server-N' rather than something sensible like
'10-0-0-3.openstack.domain'. Further complicating matters, folk running
private openstack deploys will often not have local DNS setup at all, and
using the IP address avoids all of that complexity.

This requires txaws rev 134, which is in quantal and will be backported to
precise in an SRU shortly.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: