Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Reserved consistentHashQueryParameters cause internal server error #6385

Closed

Description

@ocket8888

This Bug Report affects these Traffic Control components:

  • Traffic Ops

Current behavior:

Trying to update or create a Delivery Service to use a reserved query string parameter name like "trred" or "format" causes a 500 Internal Server Error response.

Expected behavior:

I'm almost certain the old behavior was more proper; the API should return a client-level error and accompanying Alert that tells the user they can't do what they're trying to do.

Steps to reproduce:

$ topost -kp deliveryservices '{
	"active": false,
	"cdnId": 2,
	"displayName": "test",
	"dnsBypassCname": "test",
	"dscp": 1,
	"geoLimit": 1,
	"geoLimitCountries": "[US, CA]",
	"geoProvider": -7,
	"initialDispersion": 1,
	"ipv6RoutingEnabled": true,
	"logsEnabled": true,
	"missLat": 0,
	"missLong": 0,
	"multiSiteOrigin": false,
	"orgServerFqdn": "http://origin.infra.ciab.test",
	"protocol": 7,
	"qstringIgnore": 5,
	"rangeRequestHandling": 0,
	"regionalGeoBlocking": false,
	"tenantId": 1,
	"typeId": 1,
	"xmlId": "test",
	"consistentHashQueryParams": ["format", "something fine", "trred"]
}'

Activity

  1. added
    Traffic Opsrelated to Traffic Ops
    low impactaffects only a small portion of a CDN, and cannot itself break one
    regression buga bug in existing functionality introduced by a new version
    low difficultythe estimated level of effort to resolve this issue is low
    on Nov 25, 2021
  2. asheikm commented on Dec 14, 2021

    @asheikm
    Contributor

    Hi
    Can this bug reproduced using cdn-in-box ?

  3. ocket8888 commented on Dec 14, 2021

    @ocket8888
    ContributorAuthor

    yes, it's not dependent on environment

  4. asheikm commented on Dec 14, 2021

    @asheikm
    Contributor

    ok, I tried to build it with docker-compose 1.25.4 but the compose version 3.8 in YAML files only supported from version 1.25.5 https://github.com/docker/compose/releases/tag/1.25.5. adding it here on the hope it helps someone.

    Also i am getting this error,
    Step 10/35 : FROM common-traffic-server-dependencies AS common-cache-config-layers
    ---> f76f2258a217
    Step 11/35 : COPY infrastructure/cdn-in-a-box/cache/trafficserver.rpm /trafficserver.rpm
    COPY failed: file not found in build context or excluded by .dockerignore: stat infrastructure/cdn-in-a-box/cache/trafficserver.rpm: file does not exist
    ERROR: Service 'edge' failed to build : Build failed

    The RPM file is not found in given path infrastructure/cdn-in-a-box/cache/trafficserver.rpm.
    Should it be built separately?

  5. zrhoffman commented on Dec 14, 2021

    @zrhoffman
    Member

    ok, I tried to build it with docker-compose 1.25.4 but the compose version 3.8 in YAML files only supported from version 1.25.5 https://github.com/docker/compose/releases/tag/1.25.5. adding it here on the hope it helps someone.

    The Python version of docker-compose (versions < v2.0.0) is no longer supported. They rewrote docker-compose in Go.

    Also i am getting this error, Step 10/35 : FROM common-traffic-server-dependencies AS common-cache-config-layers ---> f76f2258a217 Step 11/35 : COPY infrastructure/cdn-in-a-box/cache/trafficserver.rpm /trafficserver.rpm COPY failed: file not found in build context or excluded by .dockerignore: stat infrastructure/cdn-in-a-box/cache/trafficserver.rpm: file does not exist ERROR: Service 'edge' failed to build : Build failed

    The RPM file is not found in given path infrastructure/cdn-in-a-box/cache/trafficserver.rpm. Should it be built separately?

    All of the RPMs necessary to run CDN in a Box will be built and placed in the correct locations if you just run make from the infrastructure/cdn-in-a-box directory. From the documentation:

    These can all be supplied manually via the steps in :ref:`dev-building` (for Traffic Control component RPMs) or via some external source. Alternatively, the :file:`infrastructure/cdn-in-a-box/Makefile` file contains recipes to build all of these - simply run :manpage:`make(1)` from the :file:`infrastructure/cdn-in-a-box/` directory. Once all RPM dependencies have been satisfied, run ``docker-compose build --parallel`` from the :file:`infrastructure/cdn-in-a-box/` directory to construct the images needed to run CDN in a Box.

  6. asheikm commented on Dec 15, 2021

    @asheikm
    Contributor

    Ok, Thanks , It is building now, stragely, make takes lot of time, I am on VM OL8, which is taken as CentOS 8, thats fine anyway. It is still building

  7. ocket8888 commented on Dec 15, 2021

    @ocket8888
    ContributorAuthor

    make builds sequentially. I think about 80% of its time is spent on building the builder image for the ATS RPM (citation needed). make -j is marginally faster. When building on systems that use rpm to manage packages (which is LSB-compliant, to be fair) can build quite a bit faster with make native. The absolute fastest is make -j native, where supported. But at any rate, building once will expedite future builds.

  8. asheikm commented on Dec 15, 2021

    @asheikm
    Contributor

    ok, I got it, now the cdn-in-a-box is running fine.

  9. zrhoffman commented on Dec 15, 2021

    @zrhoffman
    Member

    make builds sequentially. I think about 80% of its time is spent on building the builder image for the ATS RPM (citation needed). make -j is marginally faster. When building on systems that use rpm to manage packages (which is LSB-compliant, to be fair) can build quite a bit faster with make native. The absolute fastest is make -j native, where supported. But at any rate, building once will expedite future builds.

    make native is temporarily broken due to #6419

  10. asheikm commented on Dec 15, 2021

    @asheikm
    Contributor

    make builds sequentially. I think about 80% of its time is spent on building the builder image for the ATS RPM (citation needed). make -j is marginally faster. When building on systems that use rpm to manage packages (which is LSB-compliant, to be fair) can build quite a bit faster with make native. The absolute fastest is make -j native, where supported. But at any rate, building once will expedite future builds.

    make native is temporarily broken due to #6419

    Fix merged with master now #6420

  11. asheikm commented on Dec 16, 2021

    @asheikm
    Contributor

    can we directly issue this command on cli ? or with curl ?

    $ topost -kp deliveryservices '{
    	"active": false,
    	"cdnId": 2,
    	"displayName": "test",
    	"dnsBypassCname": "test",
    	"dscp": 1,
    	"geoLimit": 1,
    	"geoLimitCountries": "[US, CA]",
    	"geoProvider": -7,
    	"initialDispersion": 1,
    	"ipv6RoutingEnabled": true,
    	"logsEnabled": true,
    	"missLat": 0,
    	"missLong": 0,
    	"multiSiteOrigin": false,
    	"orgServerFqdn": "http://origin.infra.ciab.test",
    	"protocol": 7,
    	"qstringIgnore": 5,
    	"rangeRequestHandling": 0,
    	"regionalGeoBlocking": false,
    	"tenantId": 1,
    	"typeId": 1,
    	"xmlId": "test",
    	"consistentHashQueryParams": ["format", "something fine", "trred"]
    }'
    

    Edit: I got doc link, let me try curl with post request for this, in the mean time, how to use topost if it is tool ? or is it alias ?

  12. ocket8888 commented on Dec 16, 2021

    @ocket8888
    ContributorAuthor

    topost is a utility provided by the Python client for Traffic Ops. It has an unofficial hosting on PyPI: https://pypi.org/project/Apache-TrafficControl/

  13. self-assigned this
    on Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Traffic Opsrelated to Traffic Opslow difficultythe estimated level of effort to resolve this issue is lowlow impactaffects only a small portion of a CDN, and cannot itself break oneregression buga bug in existing functionality introduced by a new version

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions