Project

General

Profile

Bug #13753

Generic method "Sharedfile to node" always return repaired status

Added by Nicolas CHARLES about 2 months ago. Updated about 1 month ago.

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

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

Associated revisions

Revision 7851b689 (diff)
Added by Vincent MEMBRÉ about 2 months ago

Fixes #13753: sharedfile_to_node is always repaired

History

#1 Updated by Nicolas CHARLES about 2 months ago

  • Tags set to Next minor release

#2 Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from New to In progress
  • Assignee set to Vincent MEMBRÉ

#3 Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to Alexis MOUSSET
  • Pull Request set to https://github.com/Normation/ncf/pull/866

#4 Updated by Normation Quality Assistant about 1 month ago

  • Assignee changed from Alexis MOUSSET to Vincent MEMBRÉ

#5 Updated by Vincent MEMBRÉ about 1 month ago

  • Status changed from Pending technical review to Pending release

#6 Updated by Nicolas CHARLES about 1 month ago

  • Subject changed from sharedfile_to_node is always repaired to Generic method "Sharedfile to node" always return repaired status

#7 Updated by Vincent MEMBRÉ about 1 month ago

  • Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.16, 4.3.6 and 5.0.2 which were released today.
Changelog
Changelog
Changelog

Also available in: Atom PDF