Giter VIP home page Giter VIP logo

openvswitch.openvswitch's Introduction

Open vSwitch Collection

CI

⚠️ The openvswitch.openvswitch collection has been deprecated and will reach it's end-of-life on December, 2025. We are no longer accepting new pull requests, except for ones that fix critical bugs or security vulnerabilities. This collection is not supported with ansible-core>2.17.

The Open vSwitch collection includes a variety of Ansible content to help automate the management of Open vSwitch.

Ansible version compatibility

This collection has been tested against following Ansible versions: <2.18.0,>=2.15.0.

Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible.

Supported connections

The Open vSwitch collection supports local connections only.

Included content

Click the Content button to see the list of content included in this collection.

Modules

Name Description
openvswitch.openvswitch.openvswitch_bond Manage Open vSwitch bonds
openvswitch.openvswitch.openvswitch_bridge Manage Open vSwitch bridges
openvswitch.openvswitch.openvswitch_db Configure open vswitch database.
openvswitch.openvswitch.openvswitch_port Manage Open vSwitch ports

Installing this collection

You can install the Open vSwitch collection with the Ansible Galaxy CLI:

ansible-galaxy collection install openvswitch.openvswitch

You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: openvswitch.openvswitch

Using this collection

You can call modules by their Fully Qualified Collection Namespace (FQCN), such as openvswitch.openvswitch.openvswitch_port. The following example task replaces configuration changes in the existing configuration on a Open vSwitch network device, using the FQCN:

---
  - name: Creates port eth2 on bridge br-ex
    openvswitch.openvswitch.openvswitch_port:
      bridge: br-ex
      port: eth2
    state: present

NOTE: For Ansible 2.9, you may not see deprecation warnings when you run your playbooks with this collection. Use this documentation to track when a module is deprecated.

See Also:

Contributing to this collection

We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the Open vSwitch collection repository. See Contributing to Ansible-maintained collections for complete details.

You can also join us on:

See the Ansible Community Guide for details on contributing to Ansible.

Code of Conduct

This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.

Changelogs

Release notes are available here.

Roadmap

More information

Licensing

GNU General Public License v3.0 or later.

See LICENSE to see the full text.

openvswitch.openvswitch's People

Contributors

adamcstephens avatar amarao avatar andersson007 avatar ansible-zuul[bot] avatar busterswt avatar capttrews avatar danielmellado avatar dericcrago avatar ganeshrn avatar gomathiselvis avatar jprause avatar justjais avatar krsacme avatar nilashishc avatar pabelanger avatar pre-commit-ci[bot] avatar samccann avatar veda10 avatar yurnov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

openvswitch.openvswitch's Issues

Inclusion of openvswitch.openvswitch in Ansible 2.10

This collection will be included in Ansible 2.10 because it contains modules and/or plugins that were included in Ansible 2.9. Please review:

DEADLINE: 2020-08-18

The latest version of the collection available on August 18 will be included in Ansible 2.10.0, except possibly newer versions which differ only in the patch level. (For details, see the roadmap). Please release version 1.0.0 of your collection by this date! If 1.0.0 does not exist, the same 0.x.y version will be used in all of Ansible 2.10 without updates, and your 1.x.y release will not be included until Ansible 2.11 (unless you request an exception at a community working group meeting and go through a demanding manual process to vouch for backwards compatibility . . . you want to avoid this!).

Follow semantic versioning rules

Your collection versioning must follow all semver rules. This means:

  • Patch level releases can only contain bugfixes;
  • Minor releases can contain new features, new modules and plugins, and bugfixes, but must not break backwards compatibility;
  • Major releases can break backwards compatibility.

Changelogs and Porting Guide

Your collection should provide data for the Ansible 2.10 changelog and porting guide. The changelog and porting guide are automatically generated from ansible-base, and from the changelogs of the included collections. All changes from the breaking_changes, major_changes, removed_features and deprecated_features sections will appear in both the changelog and the porting guide. You have two options for providing changelog fragments to include:

  1. If possible, use the antsibull-changelog tool, which uses the same changelog fragment as the ansible/ansible repository (see the documentation).
  2. If you cannot use antsibull-changelog, you can provide the changelog in a machine-readable format as changelogs/changelog.yaml inside your collection (see the documentation of changelogs/changelog.yaml format).

If you cannot contribute to the integrated Ansible changelog using one of these methods, please provide a link to your collection's changelog by creating an issue in https://github.com/ansible-community/ansible-build-data/. If you do not provide changelogs/changelog.yml or a link, users will not be able to find out what changed in your collection from the Ansible changelog and porting guide.

Make sure your collection passes the sanity tests

Run ansible-test sanity --docker -v in the collection with the latest ansible-base or stable-2.10 ansible/ansible checkout.

Keep informed

Be sure you're subscribed to:

Questions and Feedback

If you have questions or want to provide feedback, please see the Feedback section in the collection requirements.

(Internal link to keep track of issues: ansible-collections/overview#102)

Removal from Ansible Community Package

There has been an announcement deprecating this collection in The Bullhorn #123. It says there won't be any more major releases, but I don't see any minor or even bugfix releases either for quite some time.

This repo isn't archived and there is no information about deprecation neither in the repo nor on galaxy. However, because of the deprecation announcement there is now a discussion about removing this collecection from the Ansible Community Package.

At least one month after this announcement appears here and on Bullhorn, the Ansible Community Steering Committee will vote on whether this collection will be removed, or whether it will be kept. If it will be removed, this will happen earliest in Ansible 11. Please note that people can still manually install the collection with ansible-galaxy collection install openvswitch.openvswitch even when it has been removed from Ansible.

creating a patch port

The set argument seems to allow setting only one property on a port. I need to create a patch port that requires two properties. Can this be accomplished as is somehow? I have not been able to find a way. Maybe set could accept an array of strings?

Example command:

ovs-vsctl add-port physical_br physical_br_patch -- set interface physical_br_patch type=patch -- set interface physical_br_patch option:peer=ovs_br_patch

openvswitch_bridge failure with pre-existing bridge

SUMMARY

openvswitch_bridge module fails with pre-existing OVS bridge, created via netplan.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

openvswitch_bridge

ANSIBLE VERSION
ansible [core 2.11.6]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/.pyenv/versions/3.9.2/lib/python3.9/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/user/.pyenv/versions/3.9.2/bin/ansible
  python version = 3.9.2 (default, Mar 12 2021, 10:09:55) [GCC 7.5.0]
  jinja version = 2.11.3
  libyaml = True
COLLECTION VERSION
Collection              Version
----------------------- -------
openvswitch.openvswitch 2.0.2
CONFIGURATION
# default
OS / ENVIRONMENT

Target:

NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
STEPS TO REPRODUCE

The playbook below is a minimal test case for reproduction. The actual problem (that is, how I've spotted it) is that Netplan on Ubuntu creates new OVS bridges with fail-mode explicitly set to "standalone" (https://github.com/canonical/netplan/blob/main/src/openvswitch.c#L355) and all the consecutive runs of the openvswitch_bridge without explicit fail_mode arg would fail.

- hosts: all
  tasks:
    - name: update netplan
      apt:
        name: netplan.io
        update_cache: yes
        state: latest

    - name: install ovs stuff
      apt:
        name: openvswitch-switch
        state: present

    - name: create bridge via ovs-vsctl
      command: ovs-vsctl --may-exist add-br br-vlan

    - name: set fail-mode via ovs-vsctl
      command: ovs-vsctl set-fail-mode br-vlan standalone

    - name: create OVS bridge via ansible
      openvswitch_bridge:
        bridge: br-vlan
        state: present
EXPECTED RESULTS

All the tasks run fine.

ACTUAL RESULTS
PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [ubuntu01]

TASK [update netplan] **********************************************************
changed: [ubuntu01]

TASK [install ovs stuff] *******************************************************
changed: [ubuntu01]

TASK [create bridge via ovs-vsctl] *********************************************
changed: [ubuntu01]

TASK [set fail-mode via ovs-vsctl] *********************************************
changed: [ubuntu01]

TASK [create OVS bridge via ansible] *******************************************
fatal: [ubuntu01]: FAILED! => {"changed": false, "cmd": "/usr/bin/ovs-vsctl -t 5 set-fail-mode br-vlan None", "msg": "ovs-vsctl: fail-mode must be \"standalone\" or \"secure\"", "rc": 1, "stderr": "ovs-vsctl: fail-mode must be \"standalone\" or \"secure\"\n", "stderr_lines": ["ovs-vsctl: fail-mode must be \"standalone\" or \"secure\""], "stdout": "", "stdout_lines": []}

PLAY RECAP *********************************************************************
ubuntu01                   : ok=5    changed=4    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Important information for collection maintainers

SUMMARY

Dear maintainers,

This is important for your collections!

  • In accordance with the Community decision, we have created the news-for-maintainers repository for announcements of changes impacting collection maintainers (see the examples) instead of Issue 45 that will be closed soon.

    • To keep yourself well-informed and, therefore, things in your collection working, please subscribe to the repository by using the Watch button in the upper right corner on the repository's home page.
    • If you do not want to get notifications about related discussions, please subscribe only to Issues.
    • Please read the brief guidelines on how the repository should be used.
    • Please avoid unnecessary discussions in issues, use the Discussions feature. Every comment posted will notify a lot of folks!
  • Also we would like to remind you about the Bullhorn contributor newsletter which has recently started to be released weekly. To learn what it looks like, see the past releases. Please subscribe and talk to the Community via Bullhorn!

  • Join us in #ansible-social (for news reporting & chat), #ansible-community (for discussing collection & maintainer topics), and other channels on Matrix/IRC.

  • Help the Community and the Steering Committee to make right decisions by taking part in discussing and voting on the Community Topics that impact the whole project and the collections in particular. Your opinion there will be much appreciated!

Thank you!

Consider using true/false for all booleans in docs

Based on the community decision to use true/false for boolean values in documentation and examples, we ask that you evaluate booleans in this collection and consider changing any that do not use true/false (lowercase).

See documentation block format for more info (specifically, option defaults).

If you have already implemented this or decide not to, feel free to close this issue.


P.S. This is auto-generated issue, please raise any concerns here

Collection version is not reported when installed from git

SUMMARY

When collection is installed from git isntead of galaxy, it's version is reported as * which is confusing for operators as not clear what exactly is being used in Day2 operations.
This is related to #59 and a result of version being set to null https://github.com/ansible-collections/openvswitch.openvswitch/blob/main/galaxy.yml#L11

This is likely fine for master version of collection, but would be awesome idea to put in valid version before tagging.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

galaxy.yml

ANSIBLE VERSION
root@aio1:~# ansible --version
ansible [core 2.12.1]
  config file = /root/.ansible.cfg
  configured module search path = ['/root/.ansible/roles/config_template/library', '/root/.ansible/plugins/library', '/root/.ansible/roles/ceph-ansible/library']
  ansible python module location = /opt/ansible-runtime/lib/python3.8/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/ansible-runtime/bin/ansible
  python version = 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]
  jinja version = 3.0.1
  libyaml = True
root@aio1:~# 

COLLECTION VERSION
root@aio1:~# ansible-galaxy collection list openvswitch.openvswitch

# /root/.ansible/collections/ansible_collections
Collection              Version
----------------------- -------
openvswitch.openvswitch *      
root@aio1:~# 
STEPS TO REPRODUCE
root@aio1:~# cat requirements.yml
collections:
  - name: https://github.com/ansible-collections/openvswitch.openvswitch
    version: 2.0.2
    type: git
root@aio1:~# 
root@aio1:~# ansible-galaxy collection install -r requirements.yml
Starting galaxy collection install process
Process install dependency map
Cloning into '/root/.ansible/tmp/ansible-local-1319765ws2ryre2/tmpqpfs3az_/openvswitch.openvswitch6kqa_qi_'...
remote: Enumerating objects: 492, done.
remote: Counting objects: 100% (108/108), done.
remote: Compressing objects: 100% (75/75), done.
remote: Total 492 (delta 45), reused 56 (delta 23), pack-reused 384
Receiving objects: 100% (492/492), 137.78 KiB | 1.70 MiB/s, done.
Resolving deltas: 100% (228/228), done.
Note: switching to '2.0.2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 4c84349 Merge branch 'main' of github.com:ansible-collections/openvswitch.openvswitch
Starting collection install process
Installing 'openvswitch.openvswitch:*' to '/root/.ansible/collections/ansible_collections/openvswitch/openvswitch'
Created collection for openvswitch.openvswitch:* at /root/.ansible/collections/ansible_collections/openvswitch/openvswitch
openvswitch.openvswitch:* was installed successfully
'ansible.netcommon:2.5.0' is already installed, skipping.
'ansible.utils:2.4.3' is already installed, skipping.
root@aio1:~#
EXPECTED RESULTS
root@aio1:~# ansible-galaxy collection list openvswitch.openvswitch

# /root/.ansible/collections/ansible_collections
Collection              Version
----------------------- -------
openvswitch.openvswitch 2.0.2      
root@aio1:~# 

Bridge module 'set' parameter to accept a list of strings

SUMMARY

In the bridge module, the set parameter accepts a string but it would be better if it accepted a list of strings because it can be used to configure several things like the datapath-id, the OpenFlow protocol version, etc..

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

openvswitch.openvswitch_bridge.py

ADDITIONAL INFORMATION

It would enable the user to set the bridges up more completely than is currently permitted in a single loop.

- hosts: ovs
  vars:
    bridges:
      - bridge: ovs-br1
        set: 
          - Bridge ovs-br1 other-config:datapath-id=0000000000000001
          - Bridge ovs-br1 protocols=OpenFlow13
      - bridge: ovs-br2
        set: 
          - Bridge ovs-br2 other-config:datapath-id=0000000000000002
          - Bridge ovs-br2 protocols=OpenFlow13

  - openvswitch.openvswitch.openvswitch_bridge:
      bridge: '{{ item.bridge }}'
      set: '{{ item.set }}'
    become: true
    loop: "{{ bridges }}"

Unable to install collection from git due to missing version in galaxy.yml

SUMMARY

According to the documentation we should be able to install collections from git but for openvswitch.openvswitch, it fails due to a lack of version in the galaxy.yml file.

ISSUE TYPE
  • Bug Report
ANSIBLE VERSION
ansible 2.10.3
STEPS TO REPRODUCE
ansible-galaxy collection install git+https://github.com/ansible-collections/openvswitch.openvswitch
EXPECTED RESULTS

Collection is installed successfully

ACTUAL RESULTS
> ansible-galaxy collection install git+https://github.com/ansible-collections/openvswitch.openvswitch
Starting galaxy collection install process
Process install dependency map
ERROR! The collection galaxy.yml at '/home/dmsimard/.ansible/tmp/ansible-local-13386898nki5xno/tmphz_7siqo/openvswitch.openvswitch/galaxy.yml' is missing the following mandatory keys: version

Unable to delete key/value pairs in db without specifying value as value is not optional

SUMMARY

Unable to delete key/value pairs in db without specifying value as value is not optional.

For example:

 openvswitch.openvswitch.openvswitch_db:
      table: Open_vSwitch
      record: .
      col: other_config
      key: ca_cert
      state: absent
ISSUE TYPE
  • Bug Report
COMPONENT NAME

openvswitch.openvswitch.openvswitch_db:

ANSIBLE VERSION
$ ansible --version
ansible 2.9.14
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/<uid>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.5 (default, Aug 12 2020, 00:00:00) [GCC 10.2.1 20200723 (Red Hat 10.2.1-1)]
EXPECTED RESULTS

I would expect that the key/value pair would be removed from ovsdb

ACTUAL RESULTS

The key/value remains

Read operation does not return value

SUMMARY

Read operation does not return value

ISSUE TYPE
  • Bug Report
COMPONENT NAME

openvswitch_db

ANSIBLE VERSION
ansible [core 2.14.4]
  config file = /Users/daniel/code/test/ansible.cfg
  configured module search path = ['/Users/daniel/code/test/plugins/modules']
  ansible python module location = /Users/daniel/code/test/venv/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/daniel/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/daniel/code/test/venv/bin/ansible
  python version = 3.9.16 (main, Dec  7 2022, 10:02:13) [Clang 14.0.0 (clang-1400.0.29.202)] (/Users/daniel/code/test/venv/bin/python3.9)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
openvswitch.openvswitch       2.1.0
CONFIGURATION

OS / ENVIRONMENT

Target host: Ubuntu 20.04

STEPS TO REPRODUCE
 - name: Check if OVN Mac Mapping is defined
    openvswitch_db:
      state: read
      table: open_vswitch
      record: .
      col: external_ids
      key: ovn-chassis-mac-mappings
    register: ovn_mac_mapping

  - debug:
      var: ovn_mac_mapping
EXPECTED RESULTS

Value should be returned because it is defined.

$ ovs-vsctl list open . | grep external_ids
external_ids        : {hostname=test-node09, ovn-bridge-mappings="physnet1:br-provider", ovn-chassis-mac-mappings="physnet1:fa:16:3f:93:18:29", ovn-cms-options=enable-chassis-as-gw, ovn-encap-ip="10.0.0.9", ovn-encap-type=geneve, ovn-openflow-probe-interval="60", ovn-remote="ssl:10.0.0.2:6642", ovn-remote-probe-interval="180000", rundir="/var/run/openvswitch", system-id="ae0cb377-2e90-5894-a96f-33bfb5e68901"}
$ /usr/bin/ovs-vsctl -t 5 get open_vswitch . external_ids:ovn-chassis-mac-mappings
"physnet1:fa:16:3f:93:18:29"
ACTUAL RESULTS
"ovn_mac_mapping": {
        "changed": true,
        "commands": [
            "/usr/bin/ovs-vsctl -t 5 get open_vswitch . external_ids:ovn-chassis-mac-mappings"
        ],
        "failed": false,
        "failed_when_result": false,
        "output": {
            "ovn-chassis-mac-mappings": ""
        }
    }

Ansible Contributor Summit. Tuesday, April 12, 2022.

Ansible Contributor Summit

We are happy to announce that the registration for the Ansible Contributor Summit is open!

Why
  • This is a great opportunity for interested people to meet, discuss related topics, share their stories and opinions, get the latest important updates and just to hang out together.

  • There will be different announcements & presentations by Community, Core, Cloud, Network, and other teams.

  • Current contributors will be happy to share their stories and experience with newcomers.

  • There will be links to interactive self-passed instruqt scenarios shared during the event that help newcomers learn different aspects of development.

Where/when

Online on Matrix and Youtube. Tuesday, April 12, 2022, 12:00 - 20:00 UTC.

How to join
  • Add the event to your calendar. Use the ical URL (for example, in Google Calendar "Add other calendars" > "Import from URL") instead of importing the .ics file so that any updates to the event will be reflected in your calendar.

  • Check out the Summit page:

    • Add you name to attendees.
    • Suggest summit topics that would be interesting to you to hear about.
    • Vote on and propose changes to topics suggested by others.
    • If you want to be a presenter, please contact the Ansible Community team via [email protected].

We are looking forward to seeing you!:)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.