salt.modules.lvs

Support for LVS (Linux Virtual Server)

salt.modules.lvs.add_server(protocol=None, service_address=None, server_address=None, packet_forward_method='dr', weight=1, **kwargs)

Add a real server to a virtual service.

protocol

The service protocol(only support tcp, udp and fwmark service).

service_address

The LVS service address.

server_address

The real server address.

packet_forward_method

The LVS packet forwarding method(dr for direct routing, tunnel for tunneling, nat for network access translation).

weight

The capacity of a server relative to the others in the pool.

CLI Example:

salt '*' lvs.add_server tcp 1.1.1.1:80 192.168.0.11:8080 nat 1

salt.modules.lvs.add_service(protocol=None, service_address=None, scheduler='wlc')

Add a virtual service.

protocol

The service protocol(only support tcp, udp and fwmark service).

service_address

The LVS service address.

scheduler

Algorithm for allocating TCP connections and UDP datagrams to real servers.

CLI Example:

salt '*' lvs.add_service tcp 1.1.1.1:80 rr

salt.modules.lvs.check_server(protocol=None, service_address=None, server_address=None, **kwargs)

Check the real server exists in the specified service.

CLI Example:

salt '*' lvs.check_server tcp 1.1.1.1:80 192.168.0.11:8080

salt.modules.lvs.check_service(protocol=None, service_address=None, **kwargs)

Check the virtual service exists.

CLI Example:

salt '*' lvs.check_service tcp 1.1.1.1:80

salt.modules.lvs.clear()

Clear the virtual server table

CLI Example:

salt '*' lvs.clear

salt.modules.lvs.delete_server(protocol=None, service_address=None, server_address=None)

Delete the realserver from the virtual service.

protocol

The service protocol(only support tcp, udp and fwmark service).

service_address

The LVS service address.

server_address

The real server address.

CLI Example:

salt '*' lvs.delete_server tcp 1.1.1.1:80 192.168.0.11:8080

salt.modules.lvs.delete_service(protocol=None, service_address=None)

Delete the virtual service.

protocol

The service protocol(only support tcp, udp and fwmark service).

service_address

The LVS service address.

CLI Example:

salt '*' lvs.delete_service tcp 1.1.1.1:80

salt.modules.lvs.edit_server(protocol=None, service_address=None, server_address=None, packet_forward_method=None, weight=None, **kwargs)

Edit a real server to a virtual service.

protocol

The service protocol(only support tcp, udp and fwmark service).

service_address

The LVS service address.

server_address

The real server address.

packet_forward_method

The LVS packet forwarding method(dr for direct routing, tunnel for tunneling, nat for network access translation).

weight

The capacity of a server relative to the others in the pool.

CLI Example:

salt '*' lvs.edit_server tcp 1.1.1.1:80 192.168.0.11:8080 nat 1

salt.modules.lvs.edit_service(protocol=None, service_address=None, scheduler=None)

Edit the virtual service.

protocol

The service protocol(only support tcp, udp and fwmark service).

service_address

The LVS service address.

scheduler

Algorithm for allocating TCP connections and UDP datagrams to real servers.

CLI Example:

salt '*' lvs.edit_service tcp 1.1.1.1:80 rr

salt.modules.lvs.get_rules()

Get the virtual server rules

CLI Example:

salt '*' lvs.get_rules

salt.modules.lvs.list_(protocol=None, service_address=None)

List the virtual server table if service_address is not specified. If a service_address is selected, list this service only.

CLI Example:

salt '*' lvs.list

salt.modules.lvs.zero(protocol=None, service_address=None)

Zero the packet, byte and rate counters in a service or all services.

CLI Example:

salt '*' lvs.zero

© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.lvs.html