Fix volume/stripe calcs when using forced volumes (#6995)#7001
Merged
zwoop merged 1 commit intoapache:8.1.xfrom Jul 15, 2020
gtenev:forced_volume_and_percentage_sizes_fix_8.1.x
Merged
Fix volume/stripe calcs when using forced volumes (#6995)#7001zwoop merged 1 commit intoapache:8.1.xfrom gtenev:forced_volume_and_percentage_sizes_fix_8.1.x
zwoop merged 1 commit intoapache:8.1.xfrom
gtenev:forced_volume_and_percentage_sizes_fix_8.1.x
Conversation
Fixed problems with initialization of cache volumes when at least one volume is being forced to a specific "exclusive" span. Problem description: ==================== Disks are cleared in the following configuration where volume sizes are specified using percentages and also one of the volumes is forced to a specific span (disk): storage.config: /dev/disk1 /dev/disk2 volume=3 # <- exclusive span forced to a specific volume volume.config: volume=1 scheme=http size=50% volume=2 scheme=http size=50% volume=3 scheme=http size=512 # <- volume forced to an exclusive span During the first start ATS identifies the clears disks and does the following: 1. creates and spreads new volume 1 and 2 blocks across disk1 and disk2 2. deletes all volume 1 and 2 blocks from disk2 to make space for volume 3 3. creates new volume 3 that takes over the whole disk2. In step (1) volumes are caclulated larger and spread to disk2 only to be deleted in step (2) to make space for the forced volume 3. During the initial start the global volume list cp_list would end up containing "zombie" CacheVol instances which corespond to the volume 1 and 2 blocks deleted from disk2 to make space for the volume 3 and the mapping of domains to volumes (hosting.config) could end up mapping to any of the deleted volume blocks. This problem disappears after restart since cp_list will be initialized from the disks and cp_list will contain only valid CacheVol instances. The fix: ======== This fix prevents this from happening by making sure all volumes meant to have "exclusive" disks are created first to make sure span free spaces are updated correctly and by excluding the size of the "exclusive" disks from the total cache size used for volume size calculations when sizes are specified in percentages (volume.config). (cherry picked from commit 17ee97a)
masaori335
pushed a commit
to masaori335/trafficserver
that referenced
this pull request
Mar 31, 2021
* asf/8.1.x: Updated Changes Fix volume/stripe calcs when using forced volumes (apache#6995) (apache#7001)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed problems with initialization of cache volumes when at least
one volume is being forced to a specific "exclusive" span.
Problem description:
Disks are cleared in the following configuration where volume sizes are
specified using percentages and also one of the volumes is forced to a
specific span (disk):
During the first start ATS identifies the clears disks and does the following:
In step (1) volumes are caclulated larger and spread to disk2 only to be
deleted in step (2) to make space for the forced volume 3.
During the initial start the global volume list cp_list would end up
containing "zombie" CacheVol instances which corespond to the volume 1
and 2 blocks deleted from disk2 to make space for the volume 3 and the
mapping of domains to volumes (hosting.config) could end up mapping
to any of the deleted volume blocks.
This problem disappears after restart since cp_list will be initialized
from the disks and cp_list will contain only valid CacheVol instances.
The fix:
This fix prevents this from happening by making sure all volumes meant
to have "exclusive" disks are created first to make sure span free
spaces are updated correctly and by excluding the size of
the "exclusive" disks from the total cache size used for volume size
calculations when sizes are specified in percentages (volume.config).
(cherry picked from commit 17ee97a)