Page MenuHomeSoftware Heritage

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

Authored by ardumont on Wed, Jul 31, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Wed, Jul 31, 4:04 PM
ardumont edited the summary of this revision. (Show Details)Wed, Jul 31, 4:04 PM
ardumont edited the test plan for this revision. (Show Details)
ardumont edited the summary of this revision. (Show Details)
ftigeot accepted this revision.Wed, Jul 31, 4:24 PM

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

This revision is now accepted and ready to land.Wed, Jul 31, 4:24 PM
ardumont updated this revision to Diff 6048.Wed, Jul 31, 4:26 PM

Plug to production branch

This revision was automatically updated to reflect the committed changes.