Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reserved consistentHashQueryParameters cause internal server error #6385

Closed
ocket8888 opened this issue Nov 25, 2021 · 11 comments · Fixed by #7405
Closed

Reserved consistentHashQueryParameters cause internal server error #6385

ocket8888 opened this issue Nov 25, 2021 · 11 comments · Fixed by #7405
Assignees
Labels
low difficulty the estimated level of effort to resolve this issue is low low impact affects only a small portion of a CDN, and cannot itself break one regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops

Comments

@ocket8888
Copy link
Contributor

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"]
}'
@ocket8888 ocket8888 added Traffic Ops related to Traffic Ops low impact affects only a small portion of a CDN, and cannot itself break one regression bug a bug in existing functionality introduced by a new version low difficulty the estimated level of effort to resolve this issue is low labels Nov 25, 2021
@asheikm
Copy link
Contributor

asheikm commented Dec 14, 2021

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

@ocket8888
Copy link
Contributor Author

yes, it's not dependent on environment

@asheikm
Copy link
Contributor

asheikm commented Dec 14, 2021

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?

@zrhoffman
Copy link
Member

zrhoffman commented Dec 14, 2021

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.

@asheikm
Copy link
Contributor

asheikm commented Dec 15, 2021

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

@ocket8888
Copy link
Contributor Author

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.

@asheikm
Copy link
Contributor

asheikm commented Dec 15, 2021

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

@zrhoffman
Copy link
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

@asheikm
Copy link
Contributor

asheikm commented Dec 15, 2021

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

@asheikm
Copy link
Contributor

asheikm commented Dec 16, 2021

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 ?

@ocket8888
Copy link
Contributor Author

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low difficulty the estimated level of effort to resolve this issue is low low impact affects only a small portion of a CDN, and cannot itself break one regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops
Projects
None yet
3 participants