Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if ovsdb-server.service is active before displaying warning #421

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

viciousdrop
Copy link
Contributor

Description

Made changes outlined in this bug
Credit: @brianfinley https://launchpad.net/~finley
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2041727
Tested on Ubuntu 22.04.3 LTS and the error message no longer displays

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
@@ -414,4 +414,5 @@
             if exit_on_error:
                 sys.exit(1)
         except OvsDbServerNotRunning as e:
- logging.warning('Cannot call Open vSwitch: {}.'.format(e))
+ if utils.systemctl_is_active('ovsdb-server.service'):
+ logging.warning('Cannot call Open vSwitch: {}.'.format(e))

@slyon slyon self-requested a review November 8, 2023 14:28
@slyon slyon added the community This PR has been proposed by somebody outside of the Netplan team and roadmap commitments. label Nov 8, 2023
Copy link
Collaborator

@slyon slyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much @viciousdrop for your contribution and picking up the information from the bug report. Unfortunately, I think it's a little bit more complicated than that and we should actually check if OVS is installed on the system, instead of just hiding the warning message unconditionally.

See my inline comment.

netplan_cli/cli/commands/apply.py Outdated Show resolved Hide resolved
@slyon
Copy link
Collaborator

slyon commented Jan 25, 2024

I rebased your branch and adopted it according to my comments above.

What do you think about this changeset @viciousdrop and @daniloegea ?

@slyon slyon requested a review from daniloegea January 25, 2024 11:54
netplan_cli/cli/ovs.py Outdated Show resolved Hide resolved
slyon and others added 2 commits January 29, 2024 14:19
…rowing an error

Adopted changes outlined in this bug
Credit: https://github.com/brianfinley
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2041727
"WARNING:root:Cannot call Open vSwitch: ovsdb-server.service is not running."

Co-Authored-by: Lukas Märdian <slyon@ubuntu.com>
Copy link
Collaborator

@daniloegea daniloegea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@viciousdrop
Copy link
Contributor Author

No issues. Lgtm. Thanks for taking the time to correct this.

Copy link
Collaborator

@slyon slyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's get this merged.

@slyon slyon merged commit 05937c4 into canonical:main Jan 31, 2024
13 of 15 checks passed
@dauji
Copy link

dauji commented Feb 1, 2024

I'm still encountering the same error, when I'm modifying and applying the 00-installer-config.yaml

@haywoodspartan
Copy link

haywoodspartan commented Feb 8, 2024

I have this issue when deploying Kolla-Ansible and the function fails on checking bonded ports provided by netplan
This was a non issue prior to OSP ver 2023.1 currently if I try to apply a netplan apply while even the containerized ovsdb-server and openvswitch-vswitchd is running the netplan does not pick up the port for ovsdb server even if it is currently up and running.
This causes the dataplane to break for all associated VLAN's on the physical bond.

@slyon
Copy link
Collaborator

slyon commented Feb 12, 2024

I'm still encountering the same error, when I'm modifying and applying the 00-installer-config.yaml

@dauji Did you use the latest Netplan version from git for your test? I cannot seem to reproduce this with the latest version.

@slyon
Copy link
Collaborator

slyon commented Feb 12, 2024

I have this issue when deploying Kolla-Ansible and the function fails on checking bonded ports provided by netplan
This was a non issue prior to OSP ver 2023.1 currently if I try to apply a netplan apply while even the containerized ovsdb-server and openvswitch-vswitchd is running the netplan does not pick up the port for ovsdb server even if it is currently up and running.
This causes the dataplane to break for all associated VLAN's on the physical bond.

This seems to happen in a very specific context. Can you please open a bug report about it?

slyon added a commit that referenced this pull request Feb 12, 2024
@Kunzol
Copy link

Kunzol commented Jun 5, 2024

Any thought about the situation if netplan config contains openvswitch configuration, but openvswitch is not installed or not active?

@slyon
Copy link
Collaborator

slyon commented Jun 6, 2024

Any thought about the situation if netplan config contains openvswitch configuration, but openvswitch is not installed or not active?

In that case you should probably get a OvsDbServerNotInstalled exception in your debug log. E.g. something like this (inside the netplan --debug apply output):

Cannot apply OVS cleanup: ovsdb-server.service is 'not-found'

@vitalii-sharapov
Copy link

today is 21st Aug 2024, just wanted to add that on freshly installed Ubuntu 22.04 this issue still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community This PR has been proposed by somebody outside of the Netplan team and roadmap commitments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants