Bug 1200043 - tumbleweed-cli get latest fails when HTTP Redirect is received because curl does not follow redirects by default
Summary: tumbleweed-cli get latest fails when HTTP Redirect is received because curl d...
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: x86-64 openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jimmy Berry
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-30 16:02 UTC by Joe S
Modified: 2022-05-30 22:07 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe S 2022-05-30 16:02:02 UTC
When tumbleweed-cli is installed and you issue 'tumbleweed latest' or 'tumbleweed status' you will sometimes get a blank value for latest.

This occurs when an HTTP Redirect occurs as demonstrated here:

GET /history/latest HTTP/1.1
Host: download.opensuse.org
User-Agent: curl/7.83.1
Accept: */*

Mark bundle as not supporting multiuse
HTTP/1.1 302 Found
Date: Sun, 29 May 2022 21:44:28 GMT
Server: Apache
content-length: 0
location: http://mirrorcache-eu.opensuse.org/history/latest


When the HTTP Redirect occurs 'tumbleweed latest' or 'tumbleweed status' fails because curl does not follow redirects by default.

To fix the issue all calls to curl should also specify the -L option which allows it to follow the 'Location:' header.
Comment 1 Andrii Nikitin 2022-05-30 21:14:18 UTC
This has been resolved in https://progress.opensuse.org/issues/111788
Comment 2 Joe S 2022-05-30 22:07:17 UTC
(In reply to Andrii Nikitin from comment #1)
> This has been resolved in https://progress.opensuse.org/issues/111788

Thanks Andril!

Might still be a good idea to use curl -L in tumbleweed-cli so that if load balancing is enabled again it will just work.