~dmzoneill/charm-advanced-routing:dev/upgrade

Last commit made on 2019-08-30
Get this branch:
git clone -b dev/upgrade https://git.launchpad.net/~dmzoneill/charm-advanced-routing
Only David O Neill can upload to this branch. If you are David O Neill please log in for upload directions.

Branch merges

Branch information

Name:
dev/upgrade
Repository:
lp:~dmzoneill/charm-advanced-routing

Recent commits

25b0cd4... by David O Neill

Fixes and improvements from review 371884 MR

https://code.launchpad.net/~dmzoneill/charm-advanced-routing/+git/charm-advanced-routing/+merge/371884

 * replaced format for all string formatting
 * replaced exits with raise exception
 * solved a bug of duplicate entries in ip/down script
 * numerous of code tidy ups and best practices
 * linted it
 * updates for unit and functional testing

2a2c57d... by David O Neill

Migrate from hooks to reactive based charm

Upgraded to reactive and added static routing

 - Upgraded charm to reactive
 - Cleaned up old libraries
 - Add parser, extensibility to different routing, table, rule configuration options
 - Change to json blob in juju config item
 - Added multiple sanity checks and verification + better juju logging
 - Added functionality testing with libjuju

  expected config: based on example_config.yaml

  root@juju-720cde-24:/home/ubuntu# cat /etc/iproute2/rt_tables.d/juju-managed.conf
  100 SF1

  root@juju-720cde-24:/home/ubuntu# cat /usr/local/sbin/if-down/95-juju_routing
  # This file is managed by Juju.
  sudo ip rule del from 192.170.2.0/24 to 192.170.2.0/24 lookup SF1
  sudo ip route del 6.6.6.0/24 via 10.191.86.2
  sudo ip route del default via 10.191.86.2 table SF1 dev eth0
  sudo ip route flush table SF1
  sudo ip rule del table SF1
  sudo ip route flush cache

  root@juju-720cde-24:/home/ubuntu# cat /usr/local/sbin/if-up/95-juju_routing
  # This file is managed by Juju.
  sudo ip route flush cache
  # Table: name SF1
  sudo ip route replace default via 10.191.86.2 table SF1 dev eth0
  sudo ip route replace 6.6.6.0/24 via 10.191.86.2
  sudo ip rule add from 192.170.2.0/24 to 192.170.2.0/24 lookup SF1

Co-authored-by: Diko Parvanov <email address hidden>