Bug 1191214

Summary: errata apply with inc update includes full system info and sends even without checking 'apply to content hosts'
Product: Red Hat Satellite Reporter: Walden Raines <walden>
Component: Content ManagementAssignee: Walden Raines <walden>
Status: CLOSED ERRATA QA Contact: sthirugn <sthirugn>
Severity: medium Docs Contact:
Priority: unspecified    
Version: NightlyCC: bbuckingham, jmontleo, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9298
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:24:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Walden Raines 2015-02-10 17:34:34 UTC
Unsure if related, but it seems that errata are applied to systems even when the 'apply errata to content hosts are not checked.  

Also, when performing an incremental errata through the apply errata screen, i see the full systems being sent to the server:


{
   "add_content":{
      "errata_ids":[
         "d960bf2d-bc9c-4f53-af27-bdad55a6a775"
      ]
   },
   "content_view_version_environments":[
      {
         "content_view_version_id":49,
         "environment_ids":[
            1
         ]
      }
   ],
   "propagate_to_composites":true,
   "resolve_dependencies":true,
   "update_systems":{
      "included":{
         "ids":[
            "0422339f-83f7-4d4d-9352-49004aae9497"
         ],
         "resources":[
            {
               "uuid":"0422339f-83f7-4d4d-9352-49004aae9497",
               "name":"client.devel.foo6344",
               "description":"Initial Registration Params",
               "location":"None",
               "content_view":{
                  "id":17,
                  "name":"component2",
                  "label":"component2",
                  "description":null,
                  "organization_id":1,
                  "default":false,
                  "created_at":"2015-02-09T12:06:14-05:00",
                  "updated_at":"2015-02-09T12:09:03-05:00",
                  "composite":null,
                  "next_version":2,
                  "organization":"Default Organization",
                  "environments":[
                     "Library"
                  ],
                  "versions":[
                     "1.0",
                     "1.1"
                  ],
                  "versions_details":[
                     {
                        "version":"1.0",
                        "published":"2015-02-09 12:09:03 -0500",
                        "environments":[

                        ]
                     },
                     {
                        "version":"1.1",
                        "published":"2015-02-09 14:24:58 -0500",
                        "environments":[
                           "Library"
                        ]
                     }
                  ]
               },
               "content_view_id":17,
               "distribution":"Red Hat Enterprise Linux Server 6.4",
               "katello_agent_installed":true,
               "registered_by":"Admin User",
               "content_overrides":[

               ],
               "entitlementStatus":"valid",
               "autoheal":false,
               "href":"/consumers/0422339f-83f7-4d4d-9352-49004aae9497",
               "release":null,
               "checkin_time":"2015-02-09T14:31:58-05:00",
               "created":"2015-01-05T14:21:30.647+0000",
               "installedProducts":[
                  {
                     "productId":"69",
                     "productName":"Red Hat Enterprise Linux Server",
                     "version":"6.5",
                     "arch":"x86_64",
                     "status":"green",
                     "startDate":"2011-10-11T04:00:00.000+0000",
                     "endDate":"2022-01-01T04:59:59.000+0000"
                  }
               ],
               "service_level":"",
               "products":[
                  {
                     "id":103,
                     "name":"neederrata"
                  },
                  {
                     "id":53,
                     "name":"Red Hat Enterprise Linux Load Balancer for RHEL Server"
                  },
                  {
                     "id":66,
                     "name":"Red Hat Beta"
                  },
                  {
                     "id":90,
                     "name":"Red Hat Enterprise Linux High Availability for RHEL Server"
                  },
                  {
                     "id":91,
                     "name":"Red Hat Enterprise Linux Server"
                  },
                  {
                     "id":94,
                     "name":"Red Hat Satellite Tools 6 MDP"
                  },
                  {
                     "id":95,
                     "name":"Red Hat Satellite 6 MDP"
                  },
                  {
                     "id":96,
                     "name":"Red Hat Satellite Capsule 6 Beta"
                  },
                  {
                     "id":97,
                     "name":"Oracle Java for RHEL Server"
                  },
                  {
                     "id":98,
                     "name":"Red Hat Satellite 6 Beta"
                  },
                  {
                     "id":99,
                     "name":"Red Hat Satellite"
                  }
               ],
               "host":null,
               "hostCollections":[

               ],
               "customInfo":[

               ],
               "environment":{
                  "library":true,
                  "id":1,
                  "name":"Library",
                  "label":"Library",
                  "description":null,
                  "organization":{
                     "name":"Default Organization",
                     "label":"Default_Organization",
                     "id":1
                  },
                  "created_at":"2014-12-08T15:39:47-05:00",
                  "updated_at":"2014-12-08T15:39:47-05:00",
                  "prior":null,
                  "successor":null,
                  "counts":{
                     "content_hosts":1,
                     "content_views":10,
                     "packages":18553,
                     "puppet_modules":3,
                     "errata":{
                        "security":605,
                        "bugfix":1879,
                        "enhancement":365,
                        "total":2849
                     },
                     "yum_repositories":9,
                     "docker_repositories":0,
                     "products":4
                  },
                  "permissions":{
                     "view_lifecycle_environments":true,
                     "edit_lifecycle_environments":true,
                     "destroy_lifecycle_environments":false,
                     "promote_or_remove_content_views_to_environments":true
                  }
               },
               "activation_keys":[

               ],
               "organization_id":1,
               "id":"0422339f-83f7-4d4d-9352-49004aae9497",
               "errata_counts":{
                  "security":39,
                  "bugfix":144,
                  "enhancement":19,
                  "total":202
               },
               "release_ver":null,
               "permissions":{
                  "editable":true
               },
               "selected":true
            }
         ],
         "search":null,
         "params":{
            "organization_id":"1",
            "errata_ids[]":[
               "d960bf2d-bc9c-4f53-af27-bdad55a6a775"
            ],
            "page":1,
            "search":""
         }
      },
      "excluded":{
         "ids":[

         ]
      },
      "errata_ids":[
         "d960bf2d-bc9c-4f53-af27-bdad55a6a775"
      ],
      "organization_id":"1"
   },
   "api_version":"v2",
   "content_view_version":{

   }
}

Comment 1 Walden Raines 2015-02-10 17:34:35 UTC
Created from redmine issue http://projects.theforeman.org/issues/9298

Comment 2 Walden Raines 2015-02-10 17:34:37 UTC
Upstream bug assigned to walden

Comment 4 Walden Raines 2015-02-10 17:53:21 UTC
PR:  https://github.com/Katello/katello/pull/4993

Note that the fix only addresses the issue of not setting update_systems correctly with the checkbox.  The issue of the resources array appearing in the post data will be addressed in http://projects.theforeman.org/issues/9313

Comment 5 Bryan Kearney 2015-02-10 19:04:44 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9298 has been closed
-------------
Walden Raines
Applied in changeset commit:katello|fdc996f71c846b643586f2aa0b7b7434c1df90db.

Comment 7 sthirugn@redhat.com 2015-03-17 20:41:38 UTC
Verified in Satellite-6.1.0-RHEL-6-20150311.1

Comment 8 Bryan Kearney 2015-08-11 13:19:25 UTC
This bug is slated to be released with Satellite 6.1.

Comment 9 errata-xmlrpc 2015-08-12 05:24:22 UTC
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, 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-2015:1592