Page MenuHomeSoftware Heritage

network: Allow to override the ups/downs route for the network
ClosedPublic

Authored by ardumont on Jul 31 2019, 4:04 PM.

Details

Summary

Right now, post-up interface routes are semi-hardcoded for the production.
This changes allows to define for the staging area some more setup.

As in for example the following for the staging area gateway:

---
networks:
  default:
    interface: eth0
    address: 192.168.100.125
    netmask: 255.255.255.0
    gateway: 192.168.100.1
    ups: 'iptables -t nat -A POSTROUTING -s 192.168.128.0/24 -o eth0 -j MASQUERADE'
    downs: 'iptables -t nat -F'
  private:
    interface: eth1
    address: 192.168.128.1
    netmask: 255.255.255.0
    ups: []
    downs: []

Related T1874
Related D1762

Test Plan

bin/octocatalog-diff gateway.internal.staging.swh.network
(swh-site ; new_staging branch)

Diff Detail

Repository
rSPSITE puppet-swh-site
Branch
update_configuration
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 7085
Build 9989: arc lint + arc unit

Event Timeline

ardumont edited the test plan for this revision. (Show Details)
ardumont edited the summary of this revision. (Show Details)

Some route definitions look unnecessary and could be cleaned up in a second pass.

This revision is now accepted and ready to land.Jul 31 2019, 4:24 PM
This revision was automatically updated to reflect the committed changes.