testground icon indicating copy to clipboard operation
testground copied to clipboard

Blacklisting IPs in Network's Config

Open Bidon15 opened this issue 3 years ago โ€ข 3 comments

Description

Thanks to networking service we can set params(e.g. latency, jitter, packet loss) to testable instances. Still, it will be beneficial to implement the blacklist functionality.

Or if there is the other way around with link shaping, then adding a documentation description on this will be highly appreciated ๐Ÿ™

What defines this endeavour to be complete?

  • [ ] Implement blacklist functionality in Network.Config struct for go-sdk
  • [ ] A simple documentation guide on godoc is already highly appreciated
  • [ ] Going Above and Beyond ๐Ÿฅ‡ : Update the docs page with blacklisting

Bidon15 avatar Jun 13 '22 11:06 Bidon15

Thanks for opening this issue @Bidon15, could you describe the problem you would like to solve here? And what the feature would look like?

laurentsenta avatar Jun 20 '22 12:06 laurentsenta

Thanks for the reply @laurentsenta ๐Ÿ‘ Let's say I have 90 IPs assigned to 90 instances. And 90 instances are divided into 3 groups(thanks to composition) -> A, B, C

Problem/Issue: How can I set all instances from group C to not listen to all addresses(cut received packages from those IP range) from group A?

The feature could look something like this:

config := network.Config{
    // Usual stuff 
    
    // Set the traffic shaping characteristics.
    Default: network.LinkShape{
        // This is what is needed(range on IPs in slices) or
        // can be just a simple from -> to range
        Blacklist: []net.IP
    },

}

Please let me know if more details is needed

Bidon15 avatar Jun 24 '22 15:06 Bidon15

Looks great, thanks for sharing more details, might be related to https://github.com/testground/testground/issues/1299

laurentsenta avatar Jun 28 '22 16:06 laurentsenta