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

Content interface for MicroOVN #151

Closed
wants to merge 3 commits into from

Conversation

masnax
Copy link
Contributor

@masnax masnax commented Sep 18, 2023

Adds support for the hypothetical MicroOVN ovn-conf slot, which does not yet exist. This will be a draft until it does.

export OVS_BINDIR="${SNAP}/bin/"
export OVS_SBINDIR="${SNAP}/bin/"

mkdir -p "${OVS_SYSCONFDIR}/openvswitch"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if there should be some cleanup here in case we set up openvswitch_builtinin daemon.start, then installed and uninstalled MicroOVN.


if ! test -e /etc/ovn ; then
mkdir /etc/ovn
fi
Copy link
Member

Choose a reason for hiding this comment

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

<code-golf>
[ -d /etc/ovn ] || mkdir /etc/ovn
</code-golf>


ln -snf ${SNAP_DATA}/microovn/data/pki/client-cert.pem /etc/ovn/cert_host
ln -snf ${SNAP_DATA}/microovn/data/pki/client-privkey.pem /etc/ovn/key_host
ln -snf ${SNAP_DATA}/microovn/data/pki/cacert.pem /etc/ovn/ovn-central.crt
Copy link
Member

Choose a reason for hiding this comment

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

shellcheck wants those to be quoted.

#!/bin/sh


ln -snf ${SNAP_DATA}/microovn/run/switch /run/openvswitch
Copy link
Member

Choose a reason for hiding this comment

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

Missing quotes as well.

if [ "${openvswitch_builtin:-"false"}" = "true" ]; then
export OVS_RUNDIR="${SNAP_COMMON}/openvswitch/run/"
(
set -e
Copy link
Member

Choose a reason for hiding this comment

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

I'm probably missing something but I couldn't find an explanation for having OVS_RUNDIR set outside that subshell? In fact, I don't understand the purpose of those 2 subshells. If you could shed some light I'd appreciate, thanks.

@tomponline
Copy link
Member

@masnax are you still working on this? If not please could you close until you get back to it. Ta

@masnax masnax closed this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants