theforeman / foreman-ansible-modules

Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello
GNU General Public License v3.0
149 stars 166 forks source link

Payload too large error while using manifest module #1768

Closed afeefghannam89 closed 2 months ago

afeefghannam89 commented 3 months ago
SUMMARY

I get the folowing error while using the manifest module:

 FAILED! => {"changed": false, "msg": "GET to https://subscription.rhsm.redhat.com/subscription/users/********/owners failed, got HTTP Error 413: Payload Too Large"}

Manifest refresh in the UI is working correctly, that is why I think, the usage of proxy in front of our RedHat Satellite is not the cause of this error. This module was working without issues in the past.

ISSUE TYPE
ANSIBLE VERSION
ansible [core 2.15.9]
python version = 3.11.5 
COLLECTION VERSION
Tested with v4.1.0 and 3.11.0
KATELLO/FOREMAN VERSION
rubygem-katello-4.9.0.25-1.el8sat.noarch
foreman-3.7.0.13-1.el8sat.noarch
Playbook
- name: Export the RedHat manifest
  theforeman.foreman.redhat_manifest:
    uuid: "UUID_Number"
    content_access_mode: "org_environment"
    username: "User_Name"
    password: "Password"
    path: "Path"
  environment: "{{ surf_proxy }}"
  register: manifest_export_result
jasondickerson commented 2 months ago

This error seems to have started after this incident on 8/22/2024:

https://status.redhat.com/incidents/sfjhyjdynky5

The issue is that the API call

https://subscription.rhsm.redhat.com/subscription/users/********/owners

No longer accepts an empty json dictionary for a body. In fact, it wants no body at all. The API team at Red Hat is looking into this.

evgeni commented 2 months ago

there is a PR at https://github.com/theforeman/foreman-ansible-modules/pull/1770 which you can test out

evgeni commented 2 months ago

FWIW, I've been also told that the immediate issue has been fixed on the portal side, so you shouldn't need the fix (it's still a good fix to have)