Open lbathina opened 4 years ago
Can you post the Traffic Ops logs? Would be Perl if you're using an older version, Go if using anything around the 4.0 RC
@lbathina ^^
Must be Perl since the Go rewrite of this endpoint is still in progress - #4203
enter the details
also, the "details" might be important to determine the cause of the 500 as I believe this endpoint doesn't do a lot of validation.
This is probably due to the change in the /osversions
API -- the osversions.cfg file was changed from a Perl file to json, so that config file needs converted before /api/*/osversions
can be used.
sorry missed this. few mins posting more info
"POST /api/1.4/isos? HTTP/1.1" 500 1528 26 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<ip removed> Safari/537.36"
this was in traffic_ops access.log.
don't see anythin in error.log.
/var/www/files/centos72/ks_scripts/network.cfg: No such file or directory at /opt/traffic_ops/app/lib/API/Iso.pm line 175, <RESOLV> line 4.
in traffic_ops.log, however, I don't see it being logged while the action is being performed
Oh, in that case, this is unrelated to the changes to /osversions
. This API requires some environment-specific config files on the TO host in order for this API to work properly. So, maybe the API should just return a nice error message if the required files don't exist (not sure if that should be a 5xx or a 4xx though).
This API requires some environment-specific config files on the TO host in order for this API to work properly.
So maybe this is not a bug as it works fine IF everything if the enviro is setup properly? So maybe this is an API improvement instead? (provide better error/error message when environment setup is incomplete to support this API).
"So maybe this is not a bug as it works fine IF everything if the enviro is setup properly? So maybe this is an API improvement instead?"
Agree. But I believe our standard behavior for bad/missing configuration causing an API endpoint to not function (e.g. no available InfluxDB servers for stats requests, no configured mailserver etc.) is to not expose that information through the API. That wasn't a mailing list decision afaik but it was pointed out in comments of one or two PRs in the past (that I'm aware of). So according to that philosophy we should just log the problem and hand back a 500 Internal Server Error
to the client, I think.
@ocket8888 - want to change the label to improvement?
I'm submitting a ...
Traffic Control components affected ...
Minimal reproduction of the problem with instructions:
click on tools Generate ISO enter the details Click on Generate ISO button
Current behavior:
500 Internal server error
Expected / new behavior:
can someone fill this? I am not sure what is expected here.
Anything else: