Skip to content

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

Merged
slyon merged 2 commits intocanonical:mainfrom
viciousdrop:main
Jan 31, 2024
Merged

check if ovsdb-server.service is active before displaying warning#421
slyon merged 2 commits intocanonical:mainfrom
viciousdrop:main

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
Contributor

@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.

@slyon
Copy link
Contributor

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
Copy link
Contributor

@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
Contributor

@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
@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
Contributor

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
Contributor

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
Contributor

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.

@slyon
Copy link
Contributor

slyon commented Nov 6, 2024

The SRU in https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2058031 is current blocked due to a regression in juju. But you can already install netplan.io from jammy-proposed to get the fix on Ubuntu 22.04.

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