Project

General

Profile

Actions

Bug #13753

closed

Generic method "Sharedfile to node" always return repaired status

Added by Nicolas CHARLES about 6 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

I tested sharedfile_to_node, and it always reported repaired.
The cause is the command

code=`/usr/bin/curl https://server/rudder/relay-api/shared-files/8d43ec2d-f848-4460-a5cc-f46e160b4a38/8d43ec2d-f848-4460-a5cc-f46e160b4a38/curl_testing?hash=83be3569e04920c673d2fc9f778424127c82bad8a3843860f7c18e06a11f54b79e808acd6871ca4d08d797ba43bc909051177690d8fc089e8016076118667907 --insecure --tlsv1 --location --head --output /dev/null --silent --fail --write-out %{http_code}` || [ $code -eq 404 ] && exit 22 || exit 254' returned code defined as promise repaired 22

however, running the first part of the command manually return code 200

# code=`/usr/bin/curl https://server/rudder/relay-api/shared-files/8d43ec2d-f848-4460-a5cc-f46e160b4a38/8d43ec2d-f848-4460-a5cc-f46e160b4a38/curl_testing?hash=83be3569e04920c673d2fc9f778424127c82bad8a3843860f7c18e06a11f54b79e808acd6871ca4d08d797ba43bc909051177690d8fc089e8016076118667907 --insecure --tlsv1 --location --head --output /dev/null --silent --fail --write-out %{http_code}`
root@agent1:/home/vagrant# echo $code
200

and running the whole command with the fininshing || [ $code -eq 404 ] && exit 22 || exit 254' does exit 22

Most likely introduced by #11836

Actions

Also available in: Atom PDF