Skip to content

Commit a6d60b2

Browse files
Replace storage.config and volume.config with storage.yaml (#13031)
* Replace storage.config & volume.config by storage.yaml * Doc: storage.yaml Co-authored-by: Alan M. Carroll <amc@apache.org> * Fix unit tests with ASan * Fix cache_volume_features AuTest * Fix CacheProcessor::diskInitialized * Minor fixes * Configuration Parsing Library Support * Add 'traffic_ctl config convert storage' cmd * Claenup --------- Co-authored-by: Alan M. Carroll <amc@apache.org>
1 parent 16facce commit a6d60b2

76 files changed

Lines changed: 3754 additions & 1134 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ m4/lt~obsolete.m4
4747
/build*
4848

4949
configs/records.yaml.default
50-
configs/storage.config.default
50+
configs/storage.yaml.default
5151

5252
doc/_build
5353
doc/docbuild/

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ file(REMOVE "${PROJECT_SOURCE_DIR}/include/tscore/ink_config.h")
759759
file(REMOVE "${PROJECT_SOURCE_DIR}/include/ts/apidefs.h")
760760
file(REMOVE "${PROJECT_SOURCE_DIR}/include/ink_autoconf.h")
761761

762-
configure_file(configs/storage.config.default.in configs/storage.config.default)
762+
configure_file(configs/storage.yaml.default.in configs/storage.yaml.default)
763763
configure_file(configs/records.yaml.default.in configs/records.yaml.default)
764764
configure_file(include/tscore/ink_config.h.cmake.in include/tscore/ink_config.h)
765765
configure_file(include/ts/apidefs.h.in include/ts/apidefs.h)

configs/records.yaml.default.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ records:
2525
##############################################################################
2626
# RAM and disk cache configurations. Docs:
2727
# https://docs.trafficserver.apache.org/en/latest/admin-guide/files/records.yaml.en.html#ram-cache
28-
# https://docs.trafficserver.apache.org/en/latest/admin-guide/files/storage.config.en.html
28+
# https://docs.trafficserver.apache.org/en/latest/admin-guide/files/storage.yaml.en.html
2929
##############################################################################
3030
ram_cache:
3131
size: -1

configs/storage.config.default.in

Lines changed: 0 additions & 53 deletions
This file was deleted.

configs/storage.yaml.default.in

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# storage.yaml - Span and Volume Configuration file
3+
#
4+
# Documentation:
5+
# https://docs.trafficserver.apache.org/en/latest/admin-guide/files/storage.yaml.en.html
6+
#
7+
# The storage configuration is a list of all the storage to be used by the cache and volume
8+
#
9+
# cache: # file level key
10+
# spans: #
11+
# - name: # name of the span
12+
# path: # path to storage
13+
# size: # size in bytes, required for file system storage, optional for raw device
14+
# hash_seed: # optional, used to isolate lookup from path changes
15+
# volumes: # optional
16+
# - id: # identifier [1-255]
17+
# size: # optional, size in bytes or percentage
18+
# scheme: # optional, default to "http"
19+
# ram_cache: # optional, default to "true"
20+
# ram_cache_size: # optional, allocate a dedicated RAM cache pool for this volume
21+
# ram_cache_cutoff: # optional, overrides proxy.config.cache.ram_cache_cutoff
22+
# avg_obj_size: # optional, overrides proxy.config.cache.min_average_object_size
23+
# fragment_size: # optional, overrides proxy.config.cache.target_fragment_size
24+
# spans: # optional
25+
# - use: # Span identifier
26+
# size: # size allocated to this volume
27+
28+
cache:
29+
spans:
30+
- name: disk-1
31+
path: @rel_cachedir@
32+
size: 256M

configs/volume.config.default

Lines changed: 0 additions & 65 deletions
This file was deleted.

contrib/set_trafficserver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# v1.0.3 - Check to force /mnt based cache.db
3030

3131
REMAP_FILE=/usr/local/etc/trafficserver/remap.config
32-
STORAGE_FILE=/usr/local/etc/trafficserver/storage.config
32+
STORAGE_FILE=/usr/local/etc/trafficserver/storage.yaml
3333
EC2_CACHE_LOC=/mnt/trafficserver_cache
3434

3535
# Base settings to use for testing and benchmarking

doc/admin-guide/files/hosting.config.en.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ refer to :ref:`partitioning-the-cache`.
3030

3131
Before you can assign cache volumes to specific
3232
origin servers and/or domains, you must first partition your cache
33-
according to size and protocol in the :file:`volume.config`
33+
according to size and protocol in the :file:`storage.yaml`
3434
file.
3535

3636
After you modify hosting.config, navigate to the Traffic Server bin
@@ -52,7 +52,7 @@ want to store on a particular partition (for example, ``mydomain.com``);
5252
and ``NUMBERS`` is a comma-separated list of the partitions on
5353
which you want to store the content that belongs to the origin server or
5454
domain listed. The partition numbers must be valid numbers listed in the
55-
:file:`volume.config`.
55+
:file:`storage.yaml`.
5656

5757
**Note:** To allocate more than one partition to an origin server or
5858
domain, you must enter the partitions in a comma-separated list on one

doc/admin-guide/files/index.en.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ Configuration Files
3737
splitdns.config.en
3838
ssl_multicert.yaml.en
3939
sni.yaml.en
40-
storage.config.en
40+
storage.yaml.en
4141
strategies.yaml.en
42-
volume.config.en
4342
jsonrpc.yaml.en
4443

4544
:doc:`cache.config.en`
@@ -83,15 +82,12 @@ Configuration Files
8382
:doc:`sni.yaml.en`
8483
Configures SNI based Layer 4 routing.
8584

86-
:doc:`storage.config.en`
87-
Configures all storage devices and paths to be used for the |TS| cache.
85+
:doc:`storage.yaml.en`
86+
Configures all storage devices and paths to be used for the |TS| cache and defines cache space usage by individual protocols.
8887

8988
:doc:`strategies.yaml.en`
9089
Configures NextHop strategies used with `remap.config` and replaces parent.config.
9190

92-
:doc:`volume.config.en`
93-
Defines cache space usage by individual protocols.
94-
9591
:doc:`jsonrpc.yaml.en`
9692
Defines some of the configurable arguments of the jsonrpc endpoint.
9793

doc/admin-guide/files/records.yaml.en.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2851,7 +2851,7 @@ RAM Cache
28512851
**20GB** (21474836480)
28522852

28532853
This global setting can be overridden on a per-volume basis using the
2854-
``ram_cache_size`` parameter in :file:`volume.config`. Per-volume
2854+
``ram_cache_size`` parameter in :file:`storage.yaml`. Per-volume
28552855
allocations are subtracted from the total RAM cache size before
28562856
distributing the remainder among volumes without explicit settings.
28572857

@@ -2863,7 +2863,7 @@ RAM Cache
28632863
**4MB** (4194304)
28642864

28652865
This global setting can be overridden on a per-volume basis using the
2866-
``ram_cache_cutoff`` parameter in :file:`volume.config`. When set,
2866+
``ram_cache_cutoff`` parameter in :file:`storage.yaml`. When set,
28672867
the per-volume cutoff takes precedence over this global setting for
28682868
that specific volume.
28692869

@@ -5701,11 +5701,11 @@ Sockets
57015701
``2`` Do not accept inbound connections until cache initialization has
57025702
finished and been sufficiently successful that cache is enabled. This
57035703
means at least one cache span is usable. If there are no spans in
5704-
:file:`storage.config` or none of the spans can be successfully parsed
5704+
:file:`storage.yaml` or none of the spans can be successfully parsed
57055705
and initialized then |TS| will shut down.
57065706
``3`` Do not accept inbound connections until cache initialization has
57075707
finished and been completely successful. This requires at least one
5708-
cache span in :file:`storage.config` and that every span specified is
5708+
cache span in :file:`storage.yaml` and that every span specified is
57095709
valid and successfully initialized. Any error will cause |TS| to shut
57105710
down.
57115711
===== ======================================================================

0 commit comments

Comments
 (0)