Merge lp:~julian-edwards/maas/doc-capability-staticip into lp:~maas-committers/maas/trunk

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: 3227
Proposed branch: lp:~julian-edwards/maas/doc-capability-staticip
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 87 lines (+61/-0)
3 files modified
docs/capabilities.rst (+7/-0)
docs/index.rst (+1/-0)
docs/static-ips.rst (+53/-0)
To merge this branch: bzr merge lp:~julian-edwards/maas/doc-capability-staticip
Reviewer Review Type Date Requested Status
Graham Binns (community) Approve
Review via email: mp+237727@code.launchpad.net

Commit message

Add capability documentation for static IPs, and a separate section entirely explaining more about static IPs and the API.

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) :
review: Approve
Revision history for this message
Christian Reis (kiko) wrote :

This is great. I have an inline comment, but my wider question is I thought it was possible to specify the IP address for a node ahead of time via the API. Is that true? If that is what Sticky IPs are for, I think that section should be rewritten.

Approved for landing with the changes described.

Revision history for this message
Julian Edwards (julian-edwards) wrote :
Download full text (4.5 KiB)

Thanks for the review, both.

On Thursday 09 Oct 2014 17:34:53 you wrote:
> This is great. I have an inline comment, but my wider question is I thought
> it was possible to specify the IP address for a node ahead of time via the
> API. Is that true? If that is what Sticky IPs are for, I think that section
> should be rewritten.

That is indeed what sticky IPs are for.

>
> Approved for landing with the changes described.
>
> Diff comments:
> > === modified file 'docs/capabilities.rst'
> > --- docs/capabilities.rst 2014-09-17 02:17:35 +0000
> > +++ docs/capabilities.rst 2014-10-09 09:53:08 +0000
> > @@ -30,6 +30,13 @@
> >
> > nodes are in, including network interfaces, subnets, VLAN tags, and
> > connectivity between them. See :ref:`networks` for more information.
> >
> > +.. _cap-static-ipaddresses:
> > +
> > +``static-ipaddresses``
> > + Static IP address allocation to nodes, including user-reserved IPs and
> > admin- + allocated 'sticky' IPs. Available since version 1.6. See
> > :ref:`static-ips` + for more information.
> > +
> >
> > .. _cap-ipv6-deployment-ubuntu:
> >
> > ``ipv6-deployment-ubuntu``
> >
> > === modified file 'docs/index.rst'
> > --- docs/index.rst 2014-09-17 02:37:00 +0000
> > +++ docs/index.rst 2014-10-09 09:53:08 +0000
> > @@ -54,6 +54,7 @@
> >
> > install
> > configure
> > cluster-configuration
> >
> > + static-ips
> >
> > ipv6
> > bootsources
> > nodes
> >
> > === added file 'docs/static-ips.rst'
> > --- docs/static-ips.rst 1970-01-01 00:00:00 +0000
> > +++ docs/static-ips.rst 2014-10-09 09:53:08 +0000
> > @@ -0,0 +1,51 @@
> > +.. _static-ips:
> > +
> > +Static IPs
> > +==========
> > +
> > +.. note::
> > +
> > + This feature is available in MAAS versions 1.6 and above.
> > + If you're writing a client application, you can check if MAAS
> > + supports this feature via the web API; see the documentation for the
> > + ``static-ipaddresses`` capability :ref:`here<cap-static-ipaddresses>`.
> > +
> > +Previously, MAAS relied on the DHCP server to allocate its own IP
> > +addresses to nodes, using the IP range defined on the relevant cluster
> > +interface. This was found to be unreliable since the IPs were only known
> > +once the node had booted and requested an address, and had race
> > conditions
> > +when the lease expired and another machine was looking for its own IP.
> > +
> > +MAAS now defines an additional range on the cluster for static IPs that
> > +are allocated by MAAS itself (see :doc:`cluster-configuration` for more
> > +information about this).
> > +
> > +Normally, MAAS will allocate a static IP automatically to any node
> > network
> > +interfaces where it knows on which cluster interface that node interface
>
> Maybe "MAAS will automatically choose and allocate a static IP" will make it
> easier to understand that subtlety.

Ok done.

> > +is connected. However, the :doc:`api` contains additional functions to
> > +manipulate static IPs.
> > +
>
> As I said above, I'm not sure if this refers to IPs which the end-user can
> specify (and which stay sticky). If that's what sticky IPs are, then why
> not say "additional functions that allow the user to stat...

Read more...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/capabilities.rst'
2--- docs/capabilities.rst 2014-09-17 02:17:35 +0000
3+++ docs/capabilities.rst 2014-10-10 01:10:54 +0000
4@@ -30,6 +30,13 @@
5 nodes are in, including network interfaces, subnets, VLAN tags, and
6 connectivity between them. See :ref:`networks` for more information.
7
8+.. _cap-static-ipaddresses:
9+
10+``static-ipaddresses``
11+ Static IP address allocation to nodes, including user-reserved IPs and admin-
12+ allocated 'sticky' IPs. Available since version 1.6. See :ref:`static-ips`
13+ for more information.
14+
15 .. _cap-ipv6-deployment-ubuntu:
16
17 ``ipv6-deployment-ubuntu``
18
19=== modified file 'docs/index.rst'
20--- docs/index.rst 2014-10-03 17:13:26 +0000
21+++ docs/index.rst 2014-10-10 01:10:54 +0000
22@@ -54,6 +54,7 @@
23 install
24 configure
25 cluster-configuration
26+ static-ips
27 ipv6
28 bootsources
29 nodes
30
31=== added file 'docs/static-ips.rst'
32--- docs/static-ips.rst 1970-01-01 00:00:00 +0000
33+++ docs/static-ips.rst 2014-10-10 01:10:54 +0000
34@@ -0,0 +1,53 @@
35+.. _static-ips:
36+
37+Static IPs
38+==========
39+
40+.. note::
41+
42+ This feature is available in MAAS versions 1.6 and above.
43+ If you're writing a client application, you can check if MAAS
44+ supports this feature via the web API; see the documentation for the
45+ ``static-ipaddresses`` capability :ref:`here<cap-static-ipaddresses>`.
46+
47+Previously, MAAS relied on the DHCP server to allocate its own IP
48+addresses to nodes, using the IP range defined on the relevant cluster
49+interface. This was found to be unreliable since the IPs were only known
50+once the node had booted and requested an address, and had race conditions
51+when the lease expired and another machine was looking for its own IP.
52+
53+MAAS now defines an additional range on the cluster for static IPs that
54+are allocated by MAAS itself (see :doc:`cluster-configuration` for more
55+information about this).
56+
57+In normal operation, MAAS will automatically choose and allocate a static IP to
58+any node network interfaces where it knows on which cluster interface that node
59+interface is connected.
60+
61+The :doc:`api` contains functions to request additional static IPs, which are
62+summarised here:
63+
64+Sticky IPs
65+----------
66+Synopsis:
67+ ``POST /api/1.0/nodes/{system_id}/`` ``op=claim_sticky_ip_address``
68+
69+Normally, IPs are released back into the pool of available IPs once a node
70+is released by a user. A "Sticky" IP is one which is allocated to an interface
71+on a node that does not change unless the sticky IP is removed. This enables
72+more predictable IPs at the cost of wasting IPs when the node is not in use.
73+
74+Unmanaged User-allocated IPs
75+----------------------------
76+Synopsis:
77+ ``GET /api/1.0/ipaddresses/``
78+
79+ ``POST /api/1.0/ipaddresses/`` ``op=release``
80+
81+ ``POST /api/1.0/ipaddresses/`` ``op=reserve``
82+
83+This API allows users to request an ad-hoc IP address for use in any way they
84+see fit. The IP is not tied to any node in MAAS and is guaranteed not to be
85+in use by MAAS itself.
86+
87+See the full :doc:`api` documentation for precise technical details.