Bug 2022065
Summary: | ansible modules don't work correctly when a HTTP→HTTPS redirect occurs | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | moritz.stern |
Component: | Ansible Collection | Assignee: | satellite6-bugs <satellite6-bugs> |
Status: | CLOSED ERRATA | QA Contact: | Griffin Sullivan <gsulliva> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.9.0 | CC: | egolov |
Target Milestone: | 6.12.0 | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-11-16 13:32:59 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
moritz.stern
2021-11-10 16:57:33 UTC
Hi, - what version of Satellite are you running this against? - can you share the playbook you used? the error "One of parameters [ organization_id ] required but not specified." suggests that for some reason no Organization was passed (which is weird) Hi Evgeni, - Satellite version is 6.9.0 - sure: - name: CreateContentCredential hosts: localhost become: no gather_facts: no roles: - role: redhat.satellite.content_credentials vars: satellite_username: "{{ API_USERNAME }}" satellite_password: "{{ API_PASSWORD }}" satellite_server_url: "http://satellite.MYORG.com" satellite_organization: "{{ satellite_org }}" satellite_content_credentials: - name: "{{ satellite_product_key }}" content_type: gpg_key content: "{{ satellite_product_gpg_key_plain }}" Environment variables: satellite_org: MYORGANIZATION satellite_product_gpg_key_plain: test satellite_product_key: test Kind regards, Moritz Thanks! The playbook looks good to me. I'll spin up a 6.9 and see if I can reproduce this. Is your setup really a 6.9.0, nothing newer like 6.9.6/6.9.7? (Not that I think there were any bugfixes in that area, but still, 6.9.0 is rather old ;)) Ha! Is that really 'http' in your server_url? Not httpS? Yes, 6.9.0 Tried both http and https So I can reproduce this when I set satellite_server_url: "http://satellite.MYORG.com" But it works fine when I do satellite_server_url: "httpS://satellite.MYORG.com" The reason behind this is: when you issue a HTTP request, Satellite does a redirect to HTTPS, and when the redirect is followed, the POST request data is not sent along. Not sure we can nicely catch this, but I'll see what others think. Oh my. Didn't push the commit with the change to https. It's working. Sorry for the noise. Haha, no worries. I'll leave the BZ open, and will try to improve the error reporting :) Verified in 6.12 snap 3 New warning and failure messages shown when running playbooks with satellite server url starting with or without ["http", "https"]. Steps to Reproduce: 1) Create a playbook using satellite_server_url with "http://" 2) Run playbook 3) Remove "http://" from satellite_server_url in playbook 4) Run playbook Expected Results: Step 2 results with a warning stating "[WARNING]: You have configured a plain HTTP server URL. All communication will happen unencrypted." Step 4 results with a failure stating "The server URL needs to be either HTTPS or HTTP!" Actual Results: Step 2 results with a warning stating "[WARNING]: You have configured a plain HTTP server URL. All communication will happen unencrypted." Step 4 results with a failure stating "The server URL needs to be either HTTPS or HTTP!" Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:8506 |