Skip to content
galthaus edited this page Dec 14, 2011 · 6 revisions

See all, Barclamp List

This is a Creole document

Overview

The Network barclamp provides two functions for the system. The first is a common role to instantiate network interfaces on the crowbar managed systems. The other function is address pool management.

Roles

The Network Barclamp provides a single role: network. This role provides the recipe access to instantiate the specified interfaces for the allocated IP addresses.

Scripts

The barclamp provides a single network cookbook. The cookbook is used for interface manipulation.

The standard CLI script has been extended to allow for the allocation of IP addresses.

Parameters

The barclamp has the following parameters:

Name Default Description
start_up_delay 30 A number in seconds that the chef recipe should wait to let the networks settle.
mode single A string value of either single, dual, or team. This specifies the default network interface construction model.
teaming map A map of values specific to teaming
interface_map list A list of map of values to help order network interfaces
conduit_map map A map of values to define conduits into the box
networks map A map of networks that this barclamp should manage

The mode specifies a base line goal of the system. Single means to use the first interface (usually eth0) as the only interface for all networks. VLANs and bridges will be added on top of this single interface. Dual means that the first interface should be used as the admin interface and the second interface should be used for the other interfaces. Team means that the first two interfaces should be bonded together and all VLANs run over it.

With the addition of conduit and interface maps, the mode can be custom generated to meet the environments needs. More on this below.

Operations

At create proposal time, the barclamp will create and initialize the IP address allocation data bags for each network from the default config package. This is WRONG and needs to move to the new pre-chef call. DE10.

The barclamp has a transition function that listens for the "installed" state. The function makes sure that the node has the network role associated with it.

The barclamp also uses the pre-chef apply role call out to make sure that all the allocated addresses match the appropriate mode per the configuration. This will reconfigure the node's interfaces if the mode changes.

The API extension is as follows:

Name URL Method Description
Allocate IP /crowbar/network/<version>/allocate_ip/<barclamp-instance-name> PUT Putting a json document will allocate an IP address to the node
Enable Interface /crowbar/network/<version>/enable_interface/<barclamp-instance-name> PUT Putting a json document will enable the interface for that network without an IP (unless one is already assigned).

The required JSON document for allocate_ip looks like this:

{
  "name": "FQDN.node.net",
  "network": "name of network",
  "range": "range inside of network to allocate from"
}

The required JSON document for enable_interface looks like this:

{
  "name": "FQDN.node.net",
  "network": "name of network"
}

Useful Commands and Information

The chef-server can be used to look at the network data bags to see allocated addresses and their owners.

The network barclamp uses a file-based lock to prevent multiple writers to the network data bags. This would have to change if multiple framework servers where to server barclamp transition and allocation requests.

Limitations and/or Futures

Nova will not use this for address allocation. Nova assumes a range and it seems silly to have the same range managed by two components. This will cause some headaches for the FlatManager and FlatDHCPmanager cases, but should be covered by documentation. Nova now uses the network barclamp to "reserve" addresses from the DHCP pool section of a network for use by Nova.

The Network Barclamp does not handle IPv6.

Prior running the install script the network json needs to be edited

Editing the Network json

Clone this wiki locally