Comment 5 for bug 1865892

Revision history for this message
mariole (keller-eric) wrote :

seems there are quite some code getting ignore if it does now work properly:

```
cat microstack/snap-overlay/bin/setup-br-ex
#!/bin/bash
#
# Oneshot daemon which creates a networking bridge.
#
# Creates br-ex, and sets up an ip address for it. We put this in a
# oneshot so that the ip address persists after reboot, without
# needing to add networking entries to the host system. (We want this
# to work well when we turn off classic confinement.)

set -ex

extcidr=$(snapctl get config.network.ext-cidr)

# Create external integration bridge
ovs-vsctl --retry --may-exist add-br br-ex

# Configure br-ex
ip address add $extcidr dev br-ex || :
ip link set br-ex up || :

sudo iptables -w -t nat -A POSTROUTING -s $extcidr ! \
     -d $extcidr -j MASQUERADE || :

exit 0
```

the || : seems to alias to || true and return a 0 on failure.
https://superuser.com/questions/1022374/what-does-mean-in-the-context-of-a-shell-script
Is this really what we want here if some networking setup of the br-ex encountered some issues?