This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2104792 - curl fail to reach to the satellite
Summary: curl fail to reach to the satellite
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.10.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: stream
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-07 07:21 UTC by Elyasaf Halle
Modified: 2024-06-06 12:23 UTC (History)
6 users (show)

Fixed In Version: pulpcore-3.40.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 12:23:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pulp pulpcore issues 3173 0 None closed Content app should (possibly) show index pages when the path is provided without a trailing slash 2023-10-31 17:07:07 UTC
Red Hat Issue Tracker   SAT-22872 0 None Migrated None 2024-06-06 12:23:30 UTC

Description Elyasaf Halle 2022-07-07 07:21:49 UTC
Description of problem:

After registering a host with an AK subscription-manager is reporting the status Not Subscribed.

# subscription-manager list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat OpenStack
Product ID:     191
Version:        13.0
Arch:           x86_64
Status:         Not Subscribed
Status Details: 
Starts:         
Ends:          

I testing the osp13 pre upgrade validation script (https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html-single/framework_for_upgrades_13_to_16.1/index#validating-red-hat-openstack-platform-oldvernum-before-the-upgrade) and I get 404 from the satellite 

Task 'Call repository URLs' failed:
Host: undercloud
Message: Status code was 404 and not [200]: HTTP Error 404: Not Found

the script do curl to curl https://satellite.test/pulp/content/RedHat-Juniper/Library/RHOSP13_16_V2/content/dist/rhel/server/7/7Server/x86_64/openstack/13/os

when I installed package from the repo is install it fine

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Brad Buckingham 2022-07-07 14:06:01 UTC
Is this a change or regression in behavior from an earlier release of Satellite?

Comment 2 Elyasaf Halle 2022-07-07 14:11:21 UTC

(In reply to Brad Buckingham from comment #1)
> Is this a change or regression in behavior from an earlier release of
> Satellite?

I didn’t try to register to another version of satellite

Comment 4 Daniel Alley 2022-08-23 02:14:29 UTC
@Rigel The description says installing from the repo works fine, so my guess is that an index page is not being provided when you don't have a trailing slash at the end.  Which is expected behavior.  Without a trailing slash it doesn't look like a directory, so you don't get an index page.

Comment 5 Daniel Alley 2022-08-23 02:15:50 UTC
If this is confirmed, please close as NOTABUG.

Comment 6 Rigel Di Scala 2022-08-25 06:20:10 UTC
Thank you, Daniel, for looking into it. I'm deferring to ehalle as he opened the BZ.

Comment 7 Elyasaf Halle 2022-08-25 08:06:10 UTC
Hi Daniel when I used the CDN in the same script and the script accepted the repo 
the script link ( https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html-single/framework_for_upgrades_13_to_16.1/index#validating-red-hat-openstack-platform-oldvernum-before-the-upgrade )
It's automatically from /etc/yum.repo.d/redhat.repo the URL.
And that is the ansible that runs behind.
---
- hosts: undercloud, overcloud
  vars:
    metadata:
      name: Check correctness of current repositories
      description: >
        Detect whether the repositories listed in `yum repolist`
        can be connected to and that there is at least one repo
        configured.

        Detect if there are any unwanted repositories (such as EPEL) enabled.
      groups:
        - pre-upgrade
  tasks:
  - name: List repositories
    command: 'yum repolist -v'
    args:
      warn: no
    changed_when: False
    register: repositories
  - name: Find repository URLs
    shell: 'echo "{{ repositories.stdout }}" | grep Repo-baseurl | sed  "s/Repo-baseurl.*\(http[^ ]*\).*/\1/g"'
    register: repository_urls
    changed_when: False
  - name: Check if there is at least one repository baseurl
    fail:
      msg: No repository found in yum repolist
    when: repository_urls.stdout_lines|length < 1
  - name: Call repository URLs
    uri:
      url: "{{ item }}"
    with_items: "{{ repository_urls.stdout_lines }}"
  - name: Find repository IDs
    changed_when: False
    shell: 'echo "{{ repositories.stdout }}" | grep Repo-id | sed "s/Repo-id.*://" | tr -d " "'
    register: repository_ids
  - name: Check if there are any unwanted repositories enabled
    fail:
      msg: Found unwanted repository {{ item.0 }} enabled
    when: item.0 == item.1
    with_nested:
      - [ 'epel/x86_64' ]
      - "{{ repository_ids.stdout_lines }}"

Comment 8 Daniel Alley 2022-08-26 04:59:40 UTC
It's completely valid for a webserver to not redirect from a URL without a trailing slash to one with a trailing slash, just perhaps a little atypical.  Is adjusting the script an option?

I can file an issue to implement automatic redirection but this isn't a very common complaint for us.

Comment 9 Elyasaf Halle 2022-08-28 08:14:24 UTC
Hi,
the script is built in the ansible triplo, it is possible to change that but I am not sure if it will help us.
we can do manual commands (curl) to test.

Comment 10 Elyasaf Halle 2022-09-06 09:42:32 UTC
Hi, I try to do the same procedure in satellite 6.9 and it worked.

Comment 13 Daniel Alley 2023-03-03 13:50:35 UTC
Was reverted upstream

Comment 17 Robin Chan 2023-10-31 17:07:08 UTC
The Pulp upstream bug status is at closed. Updating the external tracker on this bug.

Comment 18 Robin Chan 2023-10-31 17:07:11 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 19 Daniel Alley 2024-01-23 17:36:20 UTC
Moving this out to 6.16 - we can't backport it to pulpcore 3.39, and since I don't really see any demand for it, there's no real need to work out something special.

Comment 20 Daniel Alley 2024-01-24 15:40:51 UTC
Removing triaged keyword for reevaluation.

Comment 21 Eric Helms 2024-06-06 12:23:31 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.