# salt.states.trafficserver

## Control Apache Traffic Server

Added in version 2015.8.0.

salt.states.trafficserver.bounce_cluster(name)

  Bounce all Traffic Server nodes in the cluster. Bouncing Traffic Server shuts down and immediately restarts Traffic Server, node-by-node.

      bounce_ats_cluster:
        trafficserver.bounce_cluster

salt.states.trafficserver.bounce_local(name, drain=False)

  Bounce Traffic Server on the local node. Bouncing Traffic Server shuts down and immediately restarts the Traffic Server node.

  This option modifies the behavior of traffic_line -b and traffic_line -L such that traffic_server is not shut down until the number of active client connections drops to the number given by the proxy.config.restart.active_client_threshold configuration variable.

      bounce_ats_local:
        trafficserver.bounce_local

      bounce_ats_local:
        trafficserver.bounce_local
          - drain: True

salt.states.trafficserver.clear_cluster(name)

  Clears accumulated statistics on all nodes in the cluster.

      clear_ats_cluster:
        trafficserver.clear_cluster

salt.states.trafficserver.clear_node(name)

  Clears accumulated statistics on the local node.

      clear_ats_node:
        trafficserver.clear_node

salt.states.trafficserver.config(name, value)

  Set Traffic Server configuration variable values.

      proxy.config.proxy_name:
        trafficserver.config:
          - value: cdn.site.domain.tld

      OR

      traffic_server_setting:
        trafficserver.config:
          - name: proxy.config.proxy_name
          - value: cdn.site.domain.tld

salt.states.trafficserver.offline(name, path)

  Mark a cache storage device as offline. The storage is identified by a path which must match exactly a path specified in storage.config. This removes the storage from the cache and redirects requests that would have used this storage to other storage. This has exactly the same effect as a disk failure for that storage. This does not persist across restarts of the traffic_server process.

      offline_ats_path:
        trafficserver.offline:
          - path: /path/to/cache

salt.states.trafficserver.refresh(name)

  Initiate a Traffic Server configuration file reread. Use this command to update the running configuration after any configuration file modification.

  The timestamp of the last reconfiguration event (in seconds since epoch) is published in the proxy.node.config.reconfigure_time metric.

      refresh_ats:
        trafficserver.refresh

salt.states.trafficserver.restart_cluster(name)

  Restart the traffic_manager process and the traffic_server process on all the nodes in a cluster.

      restart_ats_cluster:
        trafficserver.restart_cluster

salt.states.trafficserver.restart_local(name, drain=False)

  Restart the traffic_manager and traffic_server processes on the local node.

  This option modifies the behavior of traffic_line -b and traffic_line -L such that traffic_server is not shut down until the number of active client connections drops to the number given by the proxy.config.restart.active_client_threshold configuration variable.

      restart_ats_local:
        trafficserver.restart_local

      restart_ats_local_drain:
        trafficserver.restart_local
          - drain: True

salt.states.trafficserver.shutdown(name)

  Shut down Traffic Server on the local node.

      shutdown_ats:
        trafficserver.shutdown

salt.states.trafficserver.startup(name)

  Start Traffic Server on the local node.

      startup_ats:
        trafficserver.startup

salt.states.trafficserver.zero_cluster(name)

  Reset performance statistics to zero across the cluster.

      zero_ats_cluster:
        trafficserver.zero_cluster

salt.states.trafficserver.zero_node(name)

  Reset performance statistics to zero on the local node.

      zero_ats_node:
        trafficserver.zero_node