HTTP 400 Bad Request: Service level assign issue for virt-who content host or call API

Solution Verified - Updated -

Issue

  • Modifying the service level for a virt-who content host via system purpose service level fail with HTTP 400 error code.
  • Or call API to set the "auto-attach" value for a content host on WEI UI
    e.g.
# curl -H "Accept:application/json,version=2" -H "Content-Type:application/json" -X PUT -u admin:password -k -d "{\"host\":{\"subscription_facet_attributes\":{\"autoheal\":\"false\"}}}" https://satellite.example.com/api/v2/hosts/content-host.example.com

{
  "error": {"message":"Katello::Resources::Candlepin::Consumer: 400 Bad Request {\"displayMessage\":\"Runtime Error com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `org.candlepin.dto.api.v1.GuestIdDTO` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('xxxx')\\n at [Source: (org.candlepin.servlet.filter.logging.TeeHttpServletRequest$1); line: 1, column: 179] (through reference chain: org.candlepin.dto.api.v1.ConsumerDTO[\\\"guestIds\\\"]->java.util.ArrayList[0]) at com.fasterxml.jackson.databind.exc.MismatchedInputException.from:63\",\"requestUuid\":\"xxxx\"} (PUT /candlepin/consumers/xxxx)"}
}

Environment

  • Red Hat Satellite 6.11
  • Red Hat Satellite 6.12

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content