Project

General

Profile

Actions

Bug #7211

closed

System technique's curl should follow redirects

Added by Florian Heigl over 9 years ago. Updated about 9 years ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

When an agent is executed it'll check it's servers' UUID.
This is done using http, regardless of the setting here:
common/1.0/site.st: "inventory_upload_protocol" string => "https";

We've long put a redirect in place but found this is not being followed by curl.
It fetches the redirect message, and decides it doesn't parse as a legit UUID.

Adding -L to the general rudder curl options seems (to me) be a nice way of cleaning this.
If a redirect is encountered, curl then follows it (i.e. to https on same system), and the content check stays still in place.

I don't know if it can be done for minicurl and what you have on Windows.


Subtasks 1 (0 open1 closed)

Bug #7264: technique's curl should follow redirectsReleasedMatthieu CERDA2015-10-09Actions
Actions #1

Updated by Janos Mattyasovszky about 9 years ago

This should also be implemented for the inventory-upload's curl:

./fusionAgent.cf:      "download_command"   string => "${g.rudder_curl} -L -k -s -f --proxy '' -o \"${g.rudder_var_tmp}/uuid.txt\" http://${server_info.cfserved}/uuid";
./fusionAgent.cf:      "download_command_prefix"   string => "${g.rudder_curl} -L -f -s --proxy '' --user ${g.davuser}:${g.davpw} -T";

Note the -L in the curl.

Actions #2

Updated by Benoît PECCATTE about 9 years ago

  • Assignee set to Benoît PECCATTE
  • Target version set to 2.11.15
Yes it should !
  • minicurl already follows redirects
  • windows uses curl too
Actions #3

Updated by Benoît PECCATTE about 9 years ago

  • Status changed from New to In progress
Actions #4

Updated by Benoît PECCATTE about 9 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Matthieu CERDA
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/752
Actions #5

Updated by Benoît PECCATTE about 9 years ago

  • Assignee changed from Matthieu CERDA to Benoît PECCATTE

Janos: the protocol used for the first query cannot be configured yet, so it is http for now.
Subsequent requests should however be made in the configured protocol.

Actions #6

Updated by Benoît PECCATTE about 9 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #7

Updated by Matthieu CERDA about 9 years ago

Actions #8

Updated by Vincent MEMBRÉ about 9 years ago

  • Category changed from Techniques to System techniques
Actions #9

Updated by Vincent MEMBRÉ about 9 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.11.15, 3.0.10 and 3.1.3 which were released today.

Actions

Also available in: Atom PDF