Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-30221

Unable to update or change a Host's content view using the redhat.satellite.host module on Satellite v6.16

XMLWordPrintable

    • Rocket
    • 5
    • False
    • ansible-collection-redhat-satellite-5.4.0
    • Moderate
    • sat-rocket
    • Bug Fix
    • Hide
      .`redhat.satellite.host` can update content view and lifecycle environment separately

      Previously, using the `redhat.satellite.host` Ansible module to update the content view or the lifecycle environment of a host resulted in an error when only one of the two parameters was changed because only changed parameters were sent to the API.
      With this fix, the content view and lifecycle environment are always provided together to the API.
      As a result, you can update the content view and lifecycle environment of the host separately.
      Show
      .`redhat.satellite.host` can update content view and lifecycle environment separately Previously, using the `redhat.satellite.host` Ansible module to update the content view or the lifecycle environment of a host resulted in an error when only one of the two parameters was changed because only changed parameters were sent to the API. With this fix, the content view and lifecycle environment are always provided together to the API. As a result, you can update the content view and lifecycle environment of the host separately.
    • Done
    • Manual

      Description of problem: when using the 'redhat.satellite.host' module with the following task:

      ~~~~~~~~~ 

      name: Change a host's CV
        delegate_to: localhost
        redhat.satellite.host:
      name: "client.example.org"
      content_view: "Some_CV"
      organization: "Some_Organization"
      lifecycle_environment: "Library"
      ~~~~~~~~~

       
      The module returns the following error from the API:

       ======= 
      "msg": "Failed to ensure entity state: ForemanApiException: Error while performing update on hosts: 422 Client Error: Unprocessable Content for url: https://satellite.example.com/api/hosts/123 - {'id': 123, 'errors':

      {'base': ['Content view and lifecycle environment must be provided together']}

      , 'full_messages': ['Content view and lifecycle environment must be provided together']}"
       =======

      How reproducible: Yes

       

      Is this issue a regression from an earlier version: No

       

      Steps to Reproduce:

      • Try to change the host's content-view using the 'redhat.satellite.host' module with the following task:

      ~~~

      name: Change a host's CV
        delegate_to: localhost
        redhat.satellite.host:
      name: "client.example.org"
      content_view: "Some_CV"
      organization: "Some_Organization"
      lifecycle_environment: "Library"
      ~~~

      Actual behavior:

      Changing a Host's content view failed with the following error: "Content view and lifecycle environment must be provided together"

      Expected behavior:

      The host's content-view should be updated successfully.

      Business Impact / Additional info:

      NA

              egolov@redhat.com Evgeni Golov
              rhn-support-ankulkar Anand Kulkarni
              Ian Ballou, Jeremy Lenz
              Radek Mynar Radek Mynar
              Lena Ansorgová (zuansorg) Lena Ansorgová (zuansorg)
              Votes:
              3 Vote for this issue
              Watchers:
              17 Start watching this issue

                Created:
                Updated:
                Resolved: