Add implementation of the snap Openstack Network Agents#1
Conversation
7cb4d90 to
988a302
Compare
snap/snapcraft.yaml
Outdated
| - python3-neutron | ||
| - iproute2 | ||
| organize: | ||
| usr/bin/neutron-ovn-metadata-agent: files/bin/neutron-ovn-metadata-agent.real |
There was a problem hiding this comment.
Because of this organize, you'll be missing most part of the staged packages.
And this leads to complicated override-build.
Can we simplify this and just move that file in a override-stage/prime instead?
snap/files/bin/bridge-setup
Outdated
|
|
||
| apply_from_snap_config() { | ||
| local iface bridge phys | ||
| iface="$(snapctl get external-interface || true)" |
There was a problem hiding this comment.
Let's not expose config option bare.
Let's divide them semantically, such as:
snap set openstack-network-agents settings.debug=true network.bridge=... network.physnet=...
snap/snapcraft.yaml
Outdated
| subordinate charm via files in $SNAP_COMMON/etc/neutron. | ||
| base: core24 | ||
| version: "0.1" | ||
| license: BUSL-1.1 |
58b36a4 to
1ef1b53
Compare
snap/snapcraft.yaml
Outdated
| cp "$SNAPCRAFT_STAGE/usr/bin/neutron-ovn-metadata-agent" "$SNAPCRAFT_PRIME/files/bin/neutron-ovn-metadata-agent.real" | ||
|
|
||
| layout: | ||
| /etc/neutron: |
There was a problem hiding this comment.
The config should live in $SNAP_COMMON/etc/neutron, not binding on the host
1ef1b53 to
77f5c01
Compare
| local ovsctl="" | ||
| if command -v ovs-vsctl >/dev/null 2>&1; then | ||
| ovsctl="ovs-vsctl" | ||
| elif [[ -x /snap/microovn/current/usr/bin/ovs-vsctl ]]; then |
There was a problem hiding this comment.
I think the last step would be to actually consume both:
ovn-chassis plug from microovn
and get a bin slot exposing the ovs-vsctl command to ensure we get the right binary (right version)
454f119 to
46d8206
Compare
snap/snapcraft.yaml
Outdated
| ovn-chassis: | ||
| interface: ovn-chassis | ||
| microovn-ovsdb: | ||
| interface: system-files | ||
| write: | ||
| - /var/snap/microovn/common/run/switch | ||
| - /var/snap/microovn/common/run/switch/db.sock |
There was a problem hiding this comment.
What does this new plug bring that is not shared by ovn-chassis https://github.com/canonical/microovn/blob/72b93b5329ff5b070685d818943b868fe2423f89/snap/snapcraft.yaml#L25C3-L25C14 ?
I believe the definition should look like:
| ovn-chassis: | |
| interface: ovn-chassis | |
| microovn-ovsdb: | |
| interface: system-files | |
| write: | |
| - /var/snap/microovn/common/run/switch | |
| - /var/snap/microovn/common/run/switch/db.sock | |
| ovn-chassis: | |
| interface: content | |
| target: "$SNAP_DATA/microovn/chassis" |
(to be checked)
There was a problem hiding this comment.
I'm a bit surprised you don't need the certificates?
There was a problem hiding this comment.
Thank you, indeed this fixes the problems regarding accessing the db... Removed the others in favor of this one
46d8206 to
53c6f45
Compare
snap/snapcraft.yaml
Outdated
| interface: network | ||
| ovn-chassis: | ||
| interface: content | ||
| target: $SNAP_DATA/ovn |
There was a problem hiding this comment.
| target: $SNAP_DATA/ovn | |
| target: $SNAP_DATA/microovn/chassis |
Can you rename this path? rationale is, we might connect more interfaces from microovn snap, so let's put something consistent for the future
(I updated the previous comment, but you pushed in the meanwhile :) )
There was a problem hiding this comment.
Yeah, now I see that :)
Updated the target and retested it as well, it works fine
53c6f45 to
02631f6
Compare
This PR adds the implementation for the snap Openstack Network Agents, which sets the following components for ovs: