support network delay attack

Signed-off-by: cwen0 <cwenyin0@gmail.com>
This commit is contained in:
cwen0 2020-11-10 15:33:22 +08:00
parent a23b0090de
commit 37a0db167f
12 changed files with 528 additions and 189 deletions

View File

@ -50,13 +50,13 @@ func NewNetworkDelayCommand() *cobra.Command {
"jitter time, time units: ns, us (or µs), ms, s, m, h.")
cmd.Flags().StringVarP(&nFlag.Device, "device", "d", "", "the network interface to impact")
cmd.Flags().StringVarP(&nFlag.EgressPort, "egress-port", "e", "",
"only impact egress traffic to these destination ports, use a ',' to separate or to indicate the range, such as 80, 8001-8010")
"only impact egress traffic to these destination ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010. It can only be used in conjunction with -p tcp or -p udp")
cmd.Flags().StringVarP(&nFlag.SourcePort, "source-port", "s", "",
"only impact egress traffic from these source ports, use a ',' to separate or to indicate the range, such as 80, 8001-8010")
"only impact egress traffic from these source ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010. It can only be used in conjunction with -p tcp or -p udp")
cmd.Flags().StringVarP(&nFlag.IPAddress, "ip", "i", "", "only impact egress traffic to these IP addresses")
cmd.Flags().StringVarP(&nFlag.Hostname, "hostname", "h", "", "only impact traffic to these hostnames")
cmd.Flags().StringVarP(&nFlag.IPProtocol, "protocol", "p", "",
"only impact traffic using this IP protocol, supported: TCP, UDP, ICMP")
"only impact traffic using this IP protocol, supported: tcp, udp, icmp, all")
nFlag.Action = core.NetworkDelayAction
return cmd

View File

@ -14,6 +14,8 @@
package command
import (
"github.com/spf13/cobra"
"github.com/chaos-mesh/chaos-daemon/pkg/bpm"
"github.com/chaos-mesh/chaos-daemon/pkg/config"
"github.com/chaos-mesh/chaos-daemon/pkg/container"
@ -21,7 +23,6 @@ import (
"github.com/chaos-mesh/chaos-daemon/pkg/server/chaosd"
"github.com/chaos-mesh/chaos-daemon/pkg/store/dbstore"
"github.com/chaos-mesh/chaos-daemon/pkg/store/experiment"
"github.com/spf13/cobra"
)
func mustChaosdFromCmd(cmd *cobra.Command, conf *config.Config) *chaosd.Server {

View File

@ -232,6 +232,9 @@ type ProcessBuilder struct {
// SetNetNS sets the net namespace of the process
func (b *ProcessBuilder) SetNetNS(nsPath string) *ProcessBuilder {
if len(nsPath) == 0 {
return b
}
return b.SetNS([]nsOption{{
Typ: NetNS,
Path: nsPath,
@ -240,6 +243,9 @@ func (b *ProcessBuilder) SetNetNS(nsPath string) *ProcessBuilder {
// SetPidNS sets the pid namespace of the process
func (b *ProcessBuilder) SetPidNS(nsPath string) *ProcessBuilder {
if len(nsPath) == 0 {
return b
}
return b.SetNS([]nsOption{{
Typ: PidNS,
Path: nsPath,

View File

@ -16,9 +16,14 @@ package core
import (
"encoding/json"
"fmt"
"github.com/chaos-mesh/chaos-daemon/pkg/utils"
"github.com/pingcap/errors"
"strconv"
"strings"
"time"
"github.com/pingcap/errors"
pb "github.com/chaos-mesh/chaos-daemon/pkg/server/serverpb"
"github.com/chaos-mesh/chaos-daemon/pkg/utils"
)
type NetworkCommand struct {
@ -68,20 +73,32 @@ func (n *NetworkCommand) validNetworkDelay() error {
return errors.New("device is required")
}
if !utils.CheckPorts(n.SourcePort) {
return errors.Errorf("source ports %s not valid", n.SourcePort)
}
if !utils.CheckPorts(n.EgressPort) {
return errors.Errorf("egress ports %s not valid", n.EgressPort)
}
if !utils.CheckIPs(n.IPAddress) {
return errors.Errorf("ip addressed %s not valid", n.IPAddress)
}
if !utils.CheckIPProtocols(n.IPProtocol) {
return errors.Errorf("ip protocols %s not valid", n.IPProtocol)
return checkProtocolAndPorts(n.IPProtocol, n.SourcePort, n.EgressPort)
}
func checkProtocolAndPorts(p string, sports string, dports string) error {
if !utils.CheckPorts(sports) {
return errors.Errorf("source ports %s not valid", sports)
}
if !utils.CheckPorts(dports) {
return errors.Errorf("egress ports %s not valid", dports)
}
if !utils.CheckIPProtocols(p) {
return errors.Errorf("ip protocols %s not valid", p)
}
if len(sports) > 0 || len(dports) > 0 {
if p == "tcp" || p == "udp" {
return nil
}
return errors.New("ip protocol is required")
}
return nil
@ -92,3 +109,63 @@ func (n *NetworkCommand) String() string {
return string(data)
}
func (n *NetworkCommand) ToNetem() (*pb.Netem, error) {
delayTime, err := time.ParseDuration(n.Latency)
if err != nil {
return nil, errors.WithStack(err)
}
jitter, err := time.ParseDuration(n.Jitter)
if err != nil {
return nil, errors.WithStack(err)
}
corr, err := strconv.ParseFloat(n.Correlation, 32)
if err != nil {
return nil, errors.WithStack(err)
}
netem := &pb.Netem{
Device: n.Device,
Time: uint32(delayTime.Nanoseconds() / 1e3),
DelayCorr: float32(corr),
Jitter: uint32(jitter.Nanoseconds() / 1e3),
}
return netem, nil
}
func (n *NetworkCommand) ToIPSet(name string) (*pb.IPSet, error) {
var (
cidrs []string
err error
)
if len(n.IPAddress) > 0 {
cidrs, err = utils.ResolveCidrs(strings.Split(n.IPAddress, ","))
if err != nil {
return nil, errors.WithStack(err)
}
}
if len(n.Hostname) > 0 {
cs, err := utils.ResolveCidrs(strings.Split(n.Hostname, ","))
if err != nil {
return nil, errors.WithStack(err)
}
cidrs = append(cidrs, cs...)
}
return &pb.IPSet{
Name: name,
Cidrs: cidrs,
}, nil
}
func (n *NetworkCommand) NeedApplyIPSet() bool {
if len(n.IPAddress) > 0 || len(n.Hostname) > 0 {
return true
}
return false
}

View File

@ -68,8 +68,8 @@ type iptablesChain struct {
Rules []string
}
func buildIptablesClient(ctx context.Context, nsPath string) iptablesClient {
return iptablesClient{
func buildIptablesClient(ctx context.Context, nsPath string) *iptablesClient {
return &iptablesClient{
ctx,
nsPath,
}
@ -96,16 +96,28 @@ func (iptables *iptablesClient) setIptablesChain(chain *pb.Chain) error {
return fmt.Errorf("unknown chain direction %d", chain.Direction)
}
protocolAndPort := chain.Protocol
if len(protocolAndPort) > 0 {
if len(chain.SourcePorts) > 0 {
protocolAndPort += " " + chain.SourcePorts
}
if len(chain.DestinationPorts) > 0 {
protocolAndPort += " " + chain.DestinationPorts
}
}
rules := []string{}
for _, ipset := range chain.Ipsets {
rules = append(rules, fmt.Sprintf("-A %s -m set --match-set %s %s -j DROP -w 5", chain.Name, ipset, matchPart))
rules = append(rules, fmt.Sprintf("-A %s -m set --match-set %s %s -j %s -w 5 %s",
chain.Name, ipset, matchPart, chain.Target, protocolAndPort))
}
err := iptables.createNewChain(&iptablesChain{
Name: chain.Name,
Rules: rules,
})
if err != nil {
return err
return errors.WithStack(err)
}
if chain.Direction == pb.Chain_INPUT {
@ -113,14 +125,14 @@ func (iptables *iptablesClient) setIptablesChain(chain *pb.Chain) error {
Name: "CHAOS-INPUT",
}, "-A CHAOS-INPUT -j "+chain.Name)
if err != nil {
return err
return errors.WithStack(err)
}
} else if chain.Direction == pb.Chain_OUTPUT {
iptables.ensureRule(&iptablesChain{
Name: "CHAOS-OUTPUT",
}, "-A CHAOS-OUTPUT -j "+chain.Name)
if err != nil {
return err
return errors.WithStack(err)
}
} else {
return fmt.Errorf("unknown direction %d", chain.Direction)

View File

@ -13,8 +13,61 @@
package chaosd
import "github.com/chaos-mesh/chaos-daemon/pkg/core"
import (
"context"
"fmt"
"github.com/google/uuid"
"github.com/pingcap/errors"
"github.com/chaos-mesh/chaos-daemon/pkg/core"
pb "github.com/chaos-mesh/chaos-daemon/pkg/server/serverpb"
)
func (s *Server) NetworkAttack(attack *core.NetworkCommand) (string, error) {
uid := uuid.New()
ipsetName := ""
if attack.NeedApplyIPSet() {
ipset, err := attack.ToIPSet(fmt.Sprintf("chaos-%s", uid.String()))
if err != nil {
return "", errors.WithStack(err)
}
if err := flushIPSet(context.Background(), "", ipset); err != nil {
return "", errors.WithStack(err)
}
ipsetName = ipset.Name
}
switch attack.Action {
case core.NetworkDelayAction:
netem, err := attack.ToNetem()
if err != nil {
return "", errors.WithStack(err)
}
tc := &pb.Tc{
Type: pb.Tc_NETEM,
Netem: netem,
Ipset: ipsetName,
Protocol: attack.IPProtocol,
SourcePort: attack.SourcePort,
EgressPort: attack.EgressPort,
}
in := &pb.TcsRequest{
Tcs: []*pb.Tc{tc},
}
if err := s.SetNodeTcRules(context.Background(), in); err != nil {
return "", errors.WithStack(err)
}
return uid.String(), nil
}
return "", nil
}
func (s *Server) applyIPSet(attack *core.NetworkCommand) error {
return nil
}

View File

@ -76,6 +76,19 @@ func (s *Server) SetContainerTcRules(ctx context.Context, in *pb.TcsRequest) err
nsPath := GetNsPath(pid, bpm.NetNS)
tcClient := buildTcClient(ctx, nsPath)
iptables := buildIptablesClient(ctx, nsPath)
return applyTCRules(ctx, tcClient, iptables, in)
}
func (s *Server) SetNodeTcRules(ctx context.Context, in *pb.TcsRequest) error {
tcClient := buildTcClient(ctx, "")
iptables := buildIptablesClient(ctx, "")
return applyTCRules(ctx, tcClient, iptables, in)
}
func applyTCRules(ctx context.Context, tcClient *tcClient, iptables *iptablesClient, in *pb.TcsRequest) error {
if err := tcClient.flush(); err != nil {
return errors.WithStack(err)
}
@ -133,8 +146,7 @@ func (s *Server) SetContainerTcRules(ctx context.Context, in *pb.TcsRequest) err
parent := len(globalTc)
band := 3 + len(filterTc) // 3 handlers for normal sfq on prio qdisc
err = tcClient.addPrio(parent, band)
if err != nil {
if err := tcClient.addPrio(parent, band); err != nil {
log.Error("failed to add prio", zap.Error(err))
return errors.WithStack(err)
}
@ -144,8 +156,6 @@ func (s *Server) SetContainerTcRules(ctx context.Context, in *pb.TcsRequest) err
index := 0
currentHandler := parent + 3 // 3 handlers for sfq on prio qdisc
iptables := buildIptablesClient(ctx, nsPath)
// iptables chain has been initialized by previous grpc request to set iptables
// and iptables rules are recovered by previous call too, so there is no need
// to remove these rules here
@ -167,16 +177,36 @@ func (s *Server) SetContainerTcRules(ctx context.Context, in *pb.TcsRequest) err
}
}
chains = append(chains, &pb.Chain{
ch := &pb.Chain{
Name: fmt.Sprintf("TC-TABLES-%d", index),
Direction: pb.Chain_OUTPUT,
Ipsets: []string{ipset},
Target: fmt.Sprintf("CLASSIFY --set-class %d:%d", parent, index+4),
})
}
// TODO: refactor this
tc := tcs[0]
if len(tc.Protocol) > 0 {
ch.Protocol = fmt.Sprintf("--protocol %s", tc.Protocol)
}
if len(tc.SourcePort) > 0 || len(tc.EgressPort) > 0 {
ch.SourcePorts = fmt.Sprintf("--source-port %s", tc.SourcePort)
if strings.Contains(tc.SourcePort, ",") {
ch.SourcePorts = fmt.Sprintf("-m multiport --source-ports %s", tc.SourcePort)
}
ch.DestinationPorts = fmt.Sprintf("--destination-port %s", tc.EgressPort)
if strings.Contains(tc.EgressPort, ",") {
ch.DestinationPorts = fmt.Sprintf("-m multiport --destination-ports %s", tc.EgressPort)
}
}
chains = append(chains, ch)
index++
}
if err = iptables.setIptablesChains(chains); err != nil {
if err := iptables.setIptablesChains(chains); err != nil {
log.Error("failed to set iptables", zap.Error(err))
return errors.WithStack(err)
}
@ -190,8 +220,8 @@ type tcClient struct {
nsPath string
}
func buildTcClient(ctx context.Context, nsPath string) tcClient {
return tcClient{
func buildTcClient(ctx context.Context, nsPath string) *tcClient {
return &tcClient{
ctx,
nsPath,
}

View File

@ -48,7 +48,7 @@ func (x Chain_Direction) String() string {
return proto.EnumName(Chain_Direction_name, int32(x))
}
func (Chain_Direction) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{16, 0}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{16, 0}
}
type ContainerAction_Action int32
@ -71,7 +71,7 @@ func (x ContainerAction_Action) String() string {
return proto.EnumName(ContainerAction_Action_name, int32(x))
}
func (ContainerAction_Action) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{18, 0}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{18, 0}
}
type ExecStressRequest_Scope int32
@ -94,7 +94,7 @@ func (x ExecStressRequest_Scope) String() string {
return proto.EnumName(ExecStressRequest_Scope_name, int32(x))
}
func (ExecStressRequest_Scope) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{19, 0}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{19, 0}
}
type Tc_Type int32
@ -117,7 +117,7 @@ func (x Tc_Type) String() string {
return proto.EnumName(Tc_Type_name, int32(x))
}
func (Tc_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{25, 0}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{25, 0}
}
type TcHandle struct {
@ -132,7 +132,7 @@ func (m *TcHandle) Reset() { *m = TcHandle{} }
func (m *TcHandle) String() string { return proto.CompactTextString(m) }
func (*TcHandle) ProtoMessage() {}
func (*TcHandle) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{0}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{0}
}
func (m *TcHandle) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TcHandle.Unmarshal(m, b)
@ -178,7 +178,7 @@ func (m *ContainerRequest) Reset() { *m = ContainerRequest{} }
func (m *ContainerRequest) String() string { return proto.CompactTextString(m) }
func (*ContainerRequest) ProtoMessage() {}
func (*ContainerRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{1}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{1}
}
func (m *ContainerRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContainerRequest.Unmarshal(m, b)
@ -223,7 +223,7 @@ func (m *ContainerResponse) Reset() { *m = ContainerResponse{} }
func (m *ContainerResponse) String() string { return proto.CompactTextString(m) }
func (*ContainerResponse) ProtoMessage() {}
func (*ContainerResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{2}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{2}
}
func (m *ContainerResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContainerResponse.Unmarshal(m, b)
@ -264,7 +264,7 @@ func (m *NetemRequest) Reset() { *m = NetemRequest{} }
func (m *NetemRequest) String() string { return proto.CompactTextString(m) }
func (*NetemRequest) ProtoMessage() {}
func (*NetemRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{3}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{3}
}
func (m *NetemRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NetemRequest.Unmarshal(m, b)
@ -313,21 +313,22 @@ func (m *NetemRequest) GetParent() *TcHandle {
}
type Netem struct {
Time uint32 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"`
Jitter uint32 `protobuf:"varint,2,opt,name=jitter,proto3" json:"jitter,omitempty"`
DelayCorr float32 `protobuf:"fixed32,3,opt,name=delay_corr,json=delayCorr,proto3" json:"delay_corr,omitempty"`
Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
Loss float32 `protobuf:"fixed32,5,opt,name=loss,proto3" json:"loss,omitempty"`
LossCorr float32 `protobuf:"fixed32,6,opt,name=loss_corr,json=lossCorr,proto3" json:"loss_corr,omitempty"`
Gap uint32 `protobuf:"varint,7,opt,name=gap,proto3" json:"gap,omitempty"`
Duplicate float32 `protobuf:"fixed32,8,opt,name=duplicate,proto3" json:"duplicate,omitempty"`
DuplicateCorr float32 `protobuf:"fixed32,9,opt,name=duplicate_corr,json=duplicateCorr,proto3" json:"duplicate_corr,omitempty"`
Reorder float32 `protobuf:"fixed32,10,opt,name=reorder,proto3" json:"reorder,omitempty"`
ReorderCorr float32 `protobuf:"fixed32,11,opt,name=reorder_corr,json=reorderCorr,proto3" json:"reorder_corr,omitempty"`
Corrupt float32 `protobuf:"fixed32,12,opt,name=corrupt,proto3" json:"corrupt,omitempty"`
CorruptCorr float32 `protobuf:"fixed32,13,opt,name=corrupt_corr,json=corruptCorr,proto3" json:"corrupt_corr,omitempty"`
Parent *TcHandle `protobuf:"bytes,14,opt,name=parent,proto3" json:"parent,omitempty"`
Handle *TcHandle `protobuf:"bytes,15,opt,name=handle,proto3" json:"handle,omitempty"`
Device string `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
Time uint32 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
Jitter uint32 `protobuf:"varint,3,opt,name=jitter,proto3" json:"jitter,omitempty"`
DelayCorr float32 `protobuf:"fixed32,4,opt,name=delay_corr,json=delayCorr,proto3" json:"delay_corr,omitempty"`
Limit uint32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"`
Loss float32 `protobuf:"fixed32,6,opt,name=loss,proto3" json:"loss,omitempty"`
LossCorr float32 `protobuf:"fixed32,7,opt,name=loss_corr,json=lossCorr,proto3" json:"loss_corr,omitempty"`
Gap uint32 `protobuf:"varint,8,opt,name=gap,proto3" json:"gap,omitempty"`
Duplicate float32 `protobuf:"fixed32,9,opt,name=duplicate,proto3" json:"duplicate,omitempty"`
DuplicateCorr float32 `protobuf:"fixed32,10,opt,name=duplicate_corr,json=duplicateCorr,proto3" json:"duplicate_corr,omitempty"`
Reorder float32 `protobuf:"fixed32,11,opt,name=reorder,proto3" json:"reorder,omitempty"`
ReorderCorr float32 `protobuf:"fixed32,12,opt,name=reorder_corr,json=reorderCorr,proto3" json:"reorder_corr,omitempty"`
Corrupt float32 `protobuf:"fixed32,13,opt,name=corrupt,proto3" json:"corrupt,omitempty"`
CorruptCorr float32 `protobuf:"fixed32,14,opt,name=corrupt_corr,json=corruptCorr,proto3" json:"corrupt_corr,omitempty"`
Parent *TcHandle `protobuf:"bytes,15,opt,name=parent,proto3" json:"parent,omitempty"`
Handle *TcHandle `protobuf:"bytes,16,opt,name=handle,proto3" json:"handle,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -337,7 +338,7 @@ func (m *Netem) Reset() { *m = Netem{} }
func (m *Netem) String() string { return proto.CompactTextString(m) }
func (*Netem) ProtoMessage() {}
func (*Netem) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{4}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{4}
}
func (m *Netem) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Netem.Unmarshal(m, b)
@ -357,6 +358,13 @@ func (m *Netem) XXX_DiscardUnknown() {
var xxx_messageInfo_Netem proto.InternalMessageInfo
func (m *Netem) GetDevice() string {
if m != nil {
return m.Device
}
return ""
}
func (m *Netem) GetTime() uint32 {
if m != nil {
return m.Time
@ -474,7 +482,7 @@ func (m *TbfRequest) Reset() { *m = TbfRequest{} }
func (m *TbfRequest) String() string { return proto.CompactTextString(m) }
func (*TbfRequest) ProtoMessage() {}
func (*TbfRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{5}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{5}
}
func (m *TbfRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TbfRequest.Unmarshal(m, b)
@ -523,7 +531,7 @@ func (m *Tbf) Reset() { *m = Tbf{} }
func (m *Tbf) String() string { return proto.CompactTextString(m) }
func (*Tbf) ProtoMessage() {}
func (*Tbf) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{6}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{6}
}
func (m *Tbf) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Tbf.Unmarshal(m, b)
@ -590,7 +598,7 @@ func (m *QdiscRequest) Reset() { *m = QdiscRequest{} }
func (m *QdiscRequest) String() string { return proto.CompactTextString(m) }
func (*QdiscRequest) ProtoMessage() {}
func (*QdiscRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{7}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{7}
}
func (m *QdiscRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QdiscRequest.Unmarshal(m, b)
@ -638,7 +646,7 @@ func (m *Qdisc) Reset() { *m = Qdisc{} }
func (m *Qdisc) String() string { return proto.CompactTextString(m) }
func (*Qdisc) ProtoMessage() {}
func (*Qdisc) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{8}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{8}
}
func (m *Qdisc) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Qdisc.Unmarshal(m, b)
@ -698,7 +706,7 @@ func (m *EmatchFilterRequest) Reset() { *m = EmatchFilterRequest{} }
func (m *EmatchFilterRequest) String() string { return proto.CompactTextString(m) }
func (*EmatchFilterRequest) ProtoMessage() {}
func (*EmatchFilterRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{9}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{9}
}
func (m *EmatchFilterRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EmatchFilterRequest.Unmarshal(m, b)
@ -745,7 +753,7 @@ func (m *EmatchFilter) Reset() { *m = EmatchFilter{} }
func (m *EmatchFilter) String() string { return proto.CompactTextString(m) }
func (*EmatchFilter) ProtoMessage() {}
func (*EmatchFilter) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{10}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{10}
}
func (m *EmatchFilter) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EmatchFilter.Unmarshal(m, b)
@ -798,7 +806,7 @@ func (m *TcFilterRequest) Reset() { *m = TcFilterRequest{} }
func (m *TcFilterRequest) String() string { return proto.CompactTextString(m) }
func (*TcFilterRequest) ProtoMessage() {}
func (*TcFilterRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{11}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{11}
}
func (m *TcFilterRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TcFilterRequest.Unmarshal(m, b)
@ -843,7 +851,7 @@ func (m *TcFilter) Reset() { *m = TcFilter{} }
func (m *TcFilter) String() string { return proto.CompactTextString(m) }
func (*TcFilter) ProtoMessage() {}
func (*TcFilter) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{12}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{12}
}
func (m *TcFilter) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TcFilter.Unmarshal(m, b)
@ -882,7 +890,7 @@ func (m *IPSetsRequest) Reset() { *m = IPSetsRequest{} }
func (m *IPSetsRequest) String() string { return proto.CompactTextString(m) }
func (*IPSetsRequest) ProtoMessage() {}
func (*IPSetsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{13}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{13}
}
func (m *IPSetsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IPSetsRequest.Unmarshal(m, b)
@ -928,7 +936,7 @@ func (m *IPSet) Reset() { *m = IPSet{} }
func (m *IPSet) String() string { return proto.CompactTextString(m) }
func (*IPSet) ProtoMessage() {}
func (*IPSet) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{14}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{14}
}
func (m *IPSet) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IPSet.Unmarshal(m, b)
@ -974,7 +982,7 @@ func (m *IptablesChainsRequest) Reset() { *m = IptablesChainsRequest{} }
func (m *IptablesChainsRequest) String() string { return proto.CompactTextString(m) }
func (*IptablesChainsRequest) ProtoMessage() {}
func (*IptablesChainsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{15}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{15}
}
func (m *IptablesChainsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IptablesChainsRequest.Unmarshal(m, b)
@ -1013,6 +1021,9 @@ type Chain struct {
Direction Chain_Direction `protobuf:"varint,2,opt,name=direction,proto3,enum=serverpb.Chain_Direction" json:"direction,omitempty"`
Ipsets []string `protobuf:"bytes,3,rep,name=ipsets,proto3" json:"ipsets,omitempty"`
Target string `protobuf:"bytes,4,opt,name=target,proto3" json:"target,omitempty"`
Protocol string `protobuf:"bytes,5,opt,name=protocol,proto3" json:"protocol,omitempty"`
SourcePorts string `protobuf:"bytes,6,opt,name=source_ports,json=sourcePorts,proto3" json:"source_ports,omitempty"`
DestinationPorts string `protobuf:"bytes,7,opt,name=destination_ports,json=destinationPorts,proto3" json:"destination_ports,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1022,7 +1033,7 @@ func (m *Chain) Reset() { *m = Chain{} }
func (m *Chain) String() string { return proto.CompactTextString(m) }
func (*Chain) ProtoMessage() {}
func (*Chain) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{16}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{16}
}
func (m *Chain) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Chain.Unmarshal(m, b)
@ -1070,6 +1081,27 @@ func (m *Chain) GetTarget() string {
return ""
}
func (m *Chain) GetProtocol() string {
if m != nil {
return m.Protocol
}
return ""
}
func (m *Chain) GetSourcePorts() string {
if m != nil {
return m.SourcePorts
}
return ""
}
func (m *Chain) GetDestinationPorts() string {
if m != nil {
return m.DestinationPorts
}
return ""
}
type TimeRequest struct {
ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
Sec int64 `protobuf:"varint,2,opt,name=sec,proto3" json:"sec,omitempty"`
@ -1084,7 +1116,7 @@ func (m *TimeRequest) Reset() { *m = TimeRequest{} }
func (m *TimeRequest) String() string { return proto.CompactTextString(m) }
func (*TimeRequest) ProtoMessage() {}
func (*TimeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{17}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{17}
}
func (m *TimeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TimeRequest.Unmarshal(m, b)
@ -1143,7 +1175,7 @@ func (m *ContainerAction) Reset() { *m = ContainerAction{} }
func (m *ContainerAction) String() string { return proto.CompactTextString(m) }
func (*ContainerAction) ProtoMessage() {}
func (*ContainerAction) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{18}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{18}
}
func (m *ContainerAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContainerAction.Unmarshal(m, b)
@ -1183,7 +1215,7 @@ func (m *ExecStressRequest) Reset() { *m = ExecStressRequest{} }
func (m *ExecStressRequest) String() string { return proto.CompactTextString(m) }
func (*ExecStressRequest) ProtoMessage() {}
func (*ExecStressRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{19}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{19}
}
func (m *ExecStressRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExecStressRequest.Unmarshal(m, b)
@ -1236,7 +1268,7 @@ func (m *ExecStressResponse) Reset() { *m = ExecStressResponse{} }
func (m *ExecStressResponse) String() string { return proto.CompactTextString(m) }
func (*ExecStressResponse) ProtoMessage() {}
func (*ExecStressResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{20}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{20}
}
func (m *ExecStressResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExecStressResponse.Unmarshal(m, b)
@ -1282,7 +1314,7 @@ func (m *CancelStressRequest) Reset() { *m = CancelStressRequest{} }
func (m *CancelStressRequest) String() string { return proto.CompactTextString(m) }
func (*CancelStressRequest) ProtoMessage() {}
func (*CancelStressRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{21}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{21}
}
func (m *CancelStressRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelStressRequest.Unmarshal(m, b)
@ -1331,7 +1363,7 @@ func (m *ApplyIoChaosRequest) Reset() { *m = ApplyIoChaosRequest{} }
func (m *ApplyIoChaosRequest) String() string { return proto.CompactTextString(m) }
func (*ApplyIoChaosRequest) ProtoMessage() {}
func (*ApplyIoChaosRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{22}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{22}
}
func (m *ApplyIoChaosRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApplyIoChaosRequest.Unmarshal(m, b)
@ -1398,7 +1430,7 @@ func (m *ApplyIoChaosResponse) Reset() { *m = ApplyIoChaosResponse{} }
func (m *ApplyIoChaosResponse) String() string { return proto.CompactTextString(m) }
func (*ApplyIoChaosResponse) ProtoMessage() {}
func (*ApplyIoChaosResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{23}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{23}
}
func (m *ApplyIoChaosResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApplyIoChaosResponse.Unmarshal(m, b)
@ -1444,7 +1476,7 @@ func (m *TcsRequest) Reset() { *m = TcsRequest{} }
func (m *TcsRequest) String() string { return proto.CompactTextString(m) }
func (*TcsRequest) ProtoMessage() {}
func (*TcsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{24}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{24}
}
func (m *TcsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TcsRequest.Unmarshal(m, b)
@ -1483,6 +1515,9 @@ type Tc struct {
Netem *Netem `protobuf:"bytes,2,opt,name=netem,proto3" json:"netem,omitempty"`
Tbf *Tbf `protobuf:"bytes,3,opt,name=tbf,proto3" json:"tbf,omitempty"`
Ipset string `protobuf:"bytes,4,opt,name=ipset,proto3" json:"ipset,omitempty"`
Protocol string `protobuf:"bytes,5,opt,name=protocol,proto3" json:"protocol,omitempty"`
SourcePort string `protobuf:"bytes,6,opt,name=sourcePort,proto3" json:"sourcePort,omitempty"`
EgressPort string `protobuf:"bytes,7,opt,name=egressPort,proto3" json:"egressPort,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1492,7 +1527,7 @@ func (m *Tc) Reset() { *m = Tc{} }
func (m *Tc) String() string { return proto.CompactTextString(m) }
func (*Tc) ProtoMessage() {}
func (*Tc) Descriptor() ([]byte, []int) {
return fileDescriptor_chaosdaemon_0c95b7b85afc739d, []int{25}
return fileDescriptor_chaosdaemon_37ba8eadb84dc86b, []int{25}
}
func (m *Tc) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Tc.Unmarshal(m, b)
@ -1540,6 +1575,27 @@ func (m *Tc) GetIpset() string {
return ""
}
func (m *Tc) GetProtocol() string {
if m != nil {
return m.Protocol
}
return ""
}
func (m *Tc) GetSourcePort() string {
if m != nil {
return m.SourcePort
}
return ""
}
func (m *Tc) GetEgressPort() string {
if m != nil {
return m.EgressPort
}
return ""
}
func init() {
proto.RegisterType((*TcHandle)(nil), "serverpb.TcHandle")
proto.RegisterType((*ContainerRequest)(nil), "serverpb.ContainerRequest")
@ -1942,95 +1998,100 @@ var _ChaosDaemon_serviceDesc = grpc.ServiceDesc{
Metadata: "chaosdaemon.proto",
}
func init() { proto.RegisterFile("chaosdaemon.proto", fileDescriptor_chaosdaemon_0c95b7b85afc739d) }
func init() { proto.RegisterFile("chaosdaemon.proto", fileDescriptor_chaosdaemon_37ba8eadb84dc86b) }
var fileDescriptor_chaosdaemon_0c95b7b85afc739d = []byte{
// 1382 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xdd, 0x6e, 0xdb, 0x36,
0x14, 0x8e, 0x2c, 0xcb, 0xb1, 0x8e, 0xed, 0xc4, 0x61, 0xd3, 0x4c, 0x4b, 0xfa, 0x93, 0x0a, 0x08,
0x36, 0x14, 0x83, 0x8b, 0x76, 0xc0, 0xba, 0xcb, 0xa5, 0x89, 0xdb, 0x7a, 0x6d, 0x1d, 0x4f, 0x51,
0xb1, 0x01, 0xbb, 0xc8, 0x64, 0x89, 0x8e, 0xd5, 0xc8, 0x92, 0x2a, 0xd2, 0x45, 0x73, 0x33, 0x60,
0x57, 0x7b, 0x90, 0xed, 0x62, 0xc0, 0x6e, 0xf6, 0x0c, 0x7b, 0x93, 0xbd, 0xc9, 0xc0, 0x43, 0xca,
0x96, 0x93, 0xd8, 0x71, 0xb6, 0x2b, 0xf3, 0xfc, 0x7d, 0x3c, 0x3f, 0xd4, 0x47, 0x1a, 0x36, 0xfc,
0xa1, 0x97, 0xb0, 0xc0, 0xa3, 0xa3, 0x24, 0x6e, 0xa5, 0x59, 0xc2, 0x13, 0x52, 0x65, 0x34, 0xfb,
0x40, 0xb3, 0xb4, 0xbf, 0xbd, 0x73, 0x9a, 0x24, 0xa7, 0x11, 0x7d, 0x84, 0xfa, 0xfe, 0x78, 0xf0,
0x88, 0x8e, 0x52, 0x7e, 0x2e, 0xdd, 0xec, 0xaf, 0xa0, 0xea, 0xfa, 0x2f, 0xbd, 0x38, 0x88, 0x28,
0xd9, 0x04, 0x63, 0xe4, 0xbd, 0x4b, 0x32, 0x4b, 0xdb, 0xd5, 0x3e, 0x6f, 0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94, 0x34, 0xa5, 0xc6, 0x05, 0x08, 0x87, 0xb0, 0xe1, 0x50, 0x3f, 0xf9,
0x40, 0xb3, 0xff, 0x83, 0xd2, 0x86, 0xc6, 0x84, 0xe4, 0x5e, 0x85, 0x51, 0x44, 0xb6, 0xaf, 0x60,
0xbf, 0xeb, 0x61, 0x5e, 0x17, 0x68, 0xf5, 0x05, 0xe5, 0xbd, 0x30, 0x58, 0x08, 0xb4, 0x73, 0xa5,
0x4d, 0x7e, 0x2f, 0x88, 0xd6, 0x98, 0x32, 0x52, 0x92, 0x31, 0xb2, 0xb3, 0x80, 0x23, 0xb7, 0xef,
0x5c, 0x6d, 0x9c, 0xa0, 0x7d, 0x0b, 0xeb, 0x45, 0x3e, 0x12, 0x78, 0x77, 0x0b, 0xfb, 0x5f, 0xa6,
0xaa, 0x05, 0x75, 0x1e, 0x41, 0xbd, 0xf8, 0x8d, 0x17, 0x81, 0xae, 0x60, 0xa8, 0xed, 0x7b, 0xf3,
0xcc, 0x79, 0x72, 0xfd, 0x0a, 0x6e, 0xf1, 0xe5, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5a, 0x9a,
0x7b, 0x53, 0x6b, 0x0f, 0x00, 0x00,
var fileDescriptor_chaosdaemon_37ba8eadb84dc86b = []byte{
// 1461 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xdd, 0x72, 0xda, 0x46,
0x14, 0x36, 0x08, 0x30, 0x3a, 0x80, 0x0d, 0x1b, 0xc7, 0x55, 0x71, 0xe2, 0x38, 0x9a, 0xf1, 0xb4,
0x93, 0x76, 0xc8, 0x24, 0x9d, 0x69, 0x7a, 0x59, 0xc7, 0x26, 0x09, 0x4d, 0x82, 0xa9, 0xac, 0x4c,
0x3b, 0xd3, 0x0b, 0x2a, 0xa4, 0x05, 0x14, 0x0b, 0x49, 0xd1, 0x2e, 0x9e, 0xf8, 0xa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0xc3, 0xa2, 0x6e, 0x74,
0x46, 0x93, 0xff, 0x83, 0xd2, 0x86, 0xda, 0x8c, 0x40, 0x5f, 0xfb, 0x41, 0x40, 0x9a, 0x57, 0x30,
0xeb, 0xcd, 0x30, 0x6f, 0x32, 0x94, 0xfd, 0x92, 0xf2, 0x9e, 0xef, 0x2d, 0x05, 0xda, 0xb9, 0xd2,
0x26, 0xbf, 0x45, 0x44, 0xab, 0xcd, 0xd9, 0x2e, 0x4a, 0x18, 0xd9, 0x59, 0xc2, 0xbf, 0xcd, 0x7b,
0x57, 0x1b, 0x67, 0x68, 0xdf, 0xc1, 0x66, 0x96, 0xeb, 0x04, 0xde, 0xfd, 0xcc, 0xfe, 0x97, 0x69,
0x70, 0x49, 0x9d, 0xc7, 0x50, 0xcd, 0xf2, 0x47, 0x16, 0xe8, 0x0a, 0xf6, 0x6b, 0xee, 0x5e, 0x67,
0x4e, 0x93, 0x1b, 0x94, 0x70, 0x8b, 0xaf, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x36, 0x34, 0xe6,
0xce, 0x4b, 0x10, 0x00, 0x00,
}

View File

@ -45,21 +45,22 @@ message NetemRequest {
}
message Netem {
uint32 time = 1;
uint32 jitter = 2;
float delay_corr = 3;
uint32 limit = 4;
float loss = 5;
float loss_corr = 6;
uint32 gap = 7;
float duplicate = 8;
float duplicate_corr = 9;
float reorder = 10;
float reorder_corr = 11;
float corrupt = 12;
float corrupt_corr = 13;
TcHandle parent = 14;
TcHandle handle = 15;
string device = 1;
uint32 time = 2;
uint32 jitter = 3;
float delay_corr = 4;
uint32 limit = 5;
float loss = 6;
float loss_corr = 7;
uint32 gap = 8;
float duplicate = 9;
float duplicate_corr = 10;
float reorder = 11;
float reorder_corr = 12;
float corrupt = 13;
float corrupt_corr = 14;
TcHandle parent = 15;
TcHandle handle = 16;
}
message TbfRequest {
@ -131,6 +132,9 @@ message Chain {
Direction direction = 2;
repeated string ipsets = 3;
string target = 4;
string protocol = 5;
string source_ports = 6;
string destination_ports = 7;
}
message TimeRequest {
@ -196,4 +200,7 @@ message Tc {
Netem netem = 2;
Tbf tbf = 3;
string ipset = 4;
string protocol = 5;
string sourcePort = 6;
string egressPort = 7;
}

View File

@ -30,7 +30,7 @@ func CheckPorts(p string) bool {
return false
}
ps := strings.Split(p, "-")
ps := strings.Split(p, ":")
if len(ps) == 0 {
if _, err := strconv.Atoi(p); err != nil {
return false
@ -72,12 +72,9 @@ func CheckIPProtocols(p string) bool {
return true
}
pros := strings.Split(p, ",")
for _, protocol := range pros {
if protocol != "TCP" || protocol != "UDP" || protocol != "ICMP" {
return false
}
if p == "tcp" || p == "udp" || p == "icmp" || p == "all" {
return true
}
return true
return false
}

69
pkg/utils/cidr.go Normal file
View File

@ -0,0 +1,69 @@
// Copyright 2020 Chaos Mesh Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
package utils
import (
"net"
"strings"
)
// IPToCidr converts from an ip to a full mask cidr
func IPToCidr(ip string) string {
// TODO: support IPv6
return ip + "/32"
}
// ResolveCidrs converts multiple cidrs/ips/domains into cidr
func ResolveCidrs(names []string) ([]string, error) {
cidrs := []string{}
for _, target := range names {
// TODO: resolve ip on every pods but not in controller, in case the dns server of these pods differ
cidr, err := ResolveCidr(target)
if err != nil {
return nil, err
}
cidrs = append(cidrs, cidr...)
}
return cidrs, nil
}
// ResolveCidr converts cidr/ip/domain into cidr
func ResolveCidr(name string) ([]string, error) {
_, ipnet, err := net.ParseCIDR(name)
if err == nil {
return []string{ipnet.String()}, nil
}
if net.ParseIP(name) != nil {
return []string{IPToCidr(name)}, nil
}
addrs, err := net.LookupIP(name)
if err != nil {
return nil, err
}
cidrs := []string{}
for _, addr := range addrs {
addr := addr.String()
// TODO: support IPv6
if strings.Contains(addr, ".") {
cidrs = append(cidrs, IPToCidr(addr))
}
}
return cidrs, nil
}

26
pkg/utils/string.go Normal file
View File

@ -0,0 +1,26 @@
// Copyright 2020 Chaos Mesh Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
package utils
func RemoveDuplicateElement(languages []string) []string {
result := make([]string, 0, len(languages))
temp := map[string]struct{}{}
for _, item := range languages {
if _, ok := temp[item]; !ok {
temp[item] = struct{}{}
result = append(result, item)
}
}
return result
}