Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/2015.5' into merge-forward-dev…
Browse files Browse the repository at this point in the history
…elop

Conflicts:
    salt/modules/lxc.py
  • Loading branch information
basepi committed May 19, 2015
2 parents 622bda8 + 5bdbf0a commit 8f53adb
Show file tree
Hide file tree
Showing 4 changed files with 461 additions and 79 deletions.
21 changes: 16 additions & 5 deletions doc/topics/cloud/lxc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ and possibly remote minion.
In other words, Salt will connect to a minion, then from that minion:

- Provision and configure a container for networking access
- Use :ref:`saltify <config_saltify>` to deploy salt and re-attach to master
- Use **lxc** and **config** module to deploy salt and re-attach to master

Limitations
------------
Expand Down Expand Up @@ -61,7 +61,18 @@ Here are the options to configure your containers:
``target``
Host minion id to install the lxc Container into
``profile``
Name of the profile containing the LXC configuration
Name of the profile containing the LXC configuration defaults
``network_profile``
Name of the profile containing the LXC network configuration defaults
``nic_opts``
Per interface new-style configuration options mappings::
eth0: {'mac': '00:16:3e:01:29:40',
'gateway': None, (default)
'link': 'br0', (default)
'gateway': None, (default)
'netmask': '', (default)
'ip': '22.1.4.25'}}
Container creation/clone options:
Create a container by cloning:
Expand Down Expand Up @@ -121,8 +132,8 @@ Here are the options to configure your containers:
.. code-block:: yaml
# Note: This example would go in /etc/salt/cloud.profile or any file in the
# /etc/salt/cloud.profile.d/ directory.
# Note: This example would go in /etc/salt/cloud.profiles or any file in the
# /etc/salt/cloud.profiles.d/ directory.
devhost10-lxc:
provider: devhost10-lxc
from_container: ubuntu
Expand All @@ -141,4 +152,4 @@ Driver Support

- Container creation
- Image listing (LXC templates)
- Running container information (IP addresses, etc.)
- Running container information (IP addresses, etc.)
4 changes: 4 additions & 0 deletions salt/cloud/clouds/lxc.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ def _salt(fun, *args, **kw):
if target in cret:
ret = cret[target]
break
# recent changes
elif 'data' in cret and 'outputter' in cret:
ret = cret['data']
break
# special case, some answers may be crafted
# to handle the unresponsivness of a specific command
# which is also meaningful, e.g. a minion not yet provisioned
Expand Down
6 changes: 5 additions & 1 deletion salt/modules/debian_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,11 @@ def _parse_interfaces(interface_files=None):
iface_dict['ethtool'][attr] = valuestr

elif attr.startswith('bond'):
opt = attr.split('_', 1)[1]
if '-' in attr:
opt = attr.split('-', 1)[1]
elif '_' in attr:
# Just in case configuration still has bond_
opt = attr.split('_', 1)[1]
if 'bonding' not in iface_dict:
iface_dict['bonding'] = salt.utils.odict.OrderedDict()
iface_dict['bonding'][opt] = valuestr
Expand Down
Loading

0 comments on commit 8f53adb

Please sign in to comment.