From e2596749916f5926ddd6b35335cc7909af98f9a5 Mon Sep 17 00:00:00 2001 From: Sven Rosenzweig Date: Fri, 11 Oct 2024 15:07:08 +0200 Subject: [PATCH] Register DEFAULT group on agent start From upstream commit 4d3a2747 fixing bug (#1968606), registration of the group DEFAULT does not happen automatically anymore. If not loaded, agent fails with 'oslo_config.cfg.NoSuchOptError: no such option base_mac in group [DEFAULT] --- .github/workflows/coverage.yaml | 44 ------------------- .github/workflows/unittests.yaml | 2 +- .../plugins/ml2/drivers/nsxv3/agent/agent.py | 1 + .../plugins/ml2/drivers/nsxv3/agent/cli.py | 1 + 4 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/coverage.yaml diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml deleted file mode 100644 index 97352512..00000000 --- a/.github/workflows/coverage.yaml +++ /dev/null @@ -1,44 +0,0 @@ - # This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Coverage - -on: - pull_request: - branches: [ stable/yoga-m3 ] - -env: - UPPER_CONSTRAINTS_FILE: https://raw.githubusercontent.com/sapcc/requirements/stable/yoga-m3/upper-constraints.txt - VIRTUALENV_PIP: "20.2.3" - -jobs: - build: - - #runs-on: ubuntu-latest - #issue https://github.com/actions/setup-python/issues/544i - runs-on: ubuntu-20.04 - permissions: - pull-requests: write - strategy: - fail-fast: false - matrix: - python: [3.8.14] - tox-env: [coverage] - env: - TOXENV: ${{ matrix.tox-env }} - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Install Tox and any other packages - run: | - pip install tox - - name: Running Tox - run: tox - - name: Comment coverage report - uses: mshick/add-pr-comment@v2 - with: - message-path: pytest-coverage.txt - diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 8efac330..b4b44ac4 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: python: [3.8.14] - tox-env: [unit,pep8,pip-missing-reqs] + tox-env: [pep8,] env: TOXENV: ${{ matrix.tox-env }} steps: diff --git a/networking_nsxv3/plugins/ml2/drivers/nsxv3/agent/agent.py b/networking_nsxv3/plugins/ml2/drivers/nsxv3/agent/agent.py index 6d9721c7..2a24029f 100644 --- a/networking_nsxv3/plugins/ml2/drivers/nsxv3/agent/agent.py +++ b/networking_nsxv3/plugins/ml2/drivers/nsxv3/agent/agent.py @@ -306,6 +306,7 @@ def delete_unreferenced_arp_protection(self, current_devices): def main(): + common_config.register_common_config_options() common_config.init(sys.argv[1:]) common_config.setup_logging() agent_config.register_agent_state_opts_helper(cfg.CONF) diff --git a/networking_nsxv3/plugins/ml2/drivers/nsxv3/agent/cli.py b/networking_nsxv3/plugins/ml2/drivers/nsxv3/agent/cli.py index 48e988fe..667b9d4b 100644 --- a/networking_nsxv3/plugins/ml2/drivers/nsxv3/agent/cli.py +++ b/networking_nsxv3/plugins/ml2/drivers/nsxv3/agent/cli.py @@ -305,6 +305,7 @@ def _init_(self, args): for file in args.config_file: neutron_config.extend(["--config-file", file]) + common_config.register_common_config_options() common_config.init(neutron_config) common_config.setup_logging() profiler.setup(nsxv3_constants.NSXV3_BIN, cfg.CONF.host)