Forge Home

cumulus_ports

Module for managing Cumulus Linux ports.conf

2,037 downloads

224 latest version

4.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.4 (latest)
  • 1.0.3
released Feb 27th 2023
This version is compatible with:
  • CumulusLinux

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'c2devel-cumulus_ports', '1.0.4'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add c2devel-cumulus_ports
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install c2devel-cumulus_ports --version 1.0.4

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

c2devel/cumulus_ports — version 1.0.4 Feb 27th 2023

This is a fork of Cumulus Network repo (http://github.com/cumulusNetworks/cumulus-cl-ports-puppet).

Actual puppet forge page: https://forge.puppet.com/c2devel/cumulus_ports

Feel free to send patches to http://github.com/c2devel/cumulus-cl-ports-puppet/

cumulus_ports for Puppet

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Reference
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This Puppet module provides a simple interface for managing initial port configuration on Cumulus Linux.

Module Description

The cumulus_ports module is responsible for setting the initial speed of a 10G or 40G port. On some bare metal switches, it is possible to take a 40G port and split it up into four 10G ports using a breakout cable. For more details, read the Cumulus Linux User Guide and search for "Switch Port Attributes".

Setup

What cumulus_ports affects

  • This module affects the /etc/cumulus/ports.conf file.
  • To activate the changes in the file, the switchd daemon must be restarted.

NOTE: Restarting the switchd daemon is disruptive.

Beginning with cumulus_ports

This module does not use any default parameters. Support for default parameters is on the roadmap.

Usage

The module currently supports one define, cumulus_ports::speeds:

node default {
  cumulus_ports { 'speeds':
    speed_40g_div_4 => ["swp1-4"],
    speed_10g => ["swp5-48"],
    speed_4_by_10g => ["swp49-50"],
    speed_40g => ["swp51-52"]
  }
}

Reference

###Types

####cumulus_ports

Generates a custom /etc/cumulus/ports.conf based on the following variables:

  • speed_10g: speed_10g => 'swp1-2' produces the following text in /etc/cumulus/ports.conf:

    swp1=10G
    swp2=10G
    
  • speed_40g : speed_40g => 'swp1-2' produces the following text in /etc/cumulus/ports.conf:

    swp1=40G
    swp2=40G
    
  • speed_40g_div_4: speed_40g_div_4 => ['swp1', 'swp4'] produces the following text in /etc/cumulus/ports.conf:

    swp1=40/4
    swp4=40/4
    
  • speed_4_by_10g: speed_4_by_10g => 'swp1-2' produces the following text in /etc/cumulus/ports.conf:

    swp1=4x10G
    swp2=4x10G
    

Warning

When you split ports into four interfaces, you must configure the adjacent port as “disabled” in this file. When splitting a port into two interfaces, such as 2x50G, you do not have to disable the adjacent port. Adjacent ports only need to be disabled when a port is split into four interfaces. For example, when splitting port 1 into four 25G interfaces, port 2 must be configured as “disabled”. For more information, refer to the documentation at https://docs.nvidia.com/networking-ethernet-software/cumulus-linux-42/Layer-1-and-Switch-Ports/Interface-Configuration-and-Management/Switch-Port-Attributes/#breakout-ports

  • disabled: disabled => 'swp3' in conjunction with speed_4_by_10g => 'swp2':
node default {
  cumulus_ports { 'speeds':
    speed_4_by_10g => ["swp2"],
    disabled       => ["swp3"],
  }
}

produces the following text in /etc/cumulus/ports.conf:

swp2=4x10G
swp3=disabled

Limitations

This module only works on Cumulus Linux.

The module does not currently do any error checking. Ensure that the whole configuration is thoroughly tested, or the switch can behave in unpredictable ways.

puppet resource cumulus_ports doesn't currently work. This will be implemented in a later version.

Development

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create new Pull Request.

Cumulus Linux

Cumulus icon

Cumulus Linux is a software distribution that runs on top of industry-standard networking hardware. It enables the latest Linux applications and automation tools on networking gear while delivering new levels of innovation and flexibility to the data center.

For further details please see cumulusnetworks.com.