Project

General

Custom queries

Profile

Actions

Bug #4092

closed

HTTP 400 Bad Request when deleting a system via the API

Added by Katello Issue Migration over 11 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I'm running katello headpin nightly:
[root@ec2-107-22-80-187 ~]# rpm -q katello-headpin-all
katello-headpin-all-1.4.2-1.git.199.3b8bdb1.el6.noarch

We're making a call like so using the katello python client:
self.systemapi.unregister(consumer_uuid)

This returns:
katello.client.server.ServerRequestError: (400, {u'displayMessage': u'Consumer fb6ba503-ff5e-4443-bd95-97fd4a0ff1de has been deleted', u'errors': [u'Consumer fb6ba503-ff5e-4443-bd95-97fd4a0ff1de has been deleted'], u'deletedId': u'fb6ba503-ff5e-4443-bd95-97fd4a0ff1de'}, None)

The consumer definitely existed before calling unregister.

Katello is kind of in an unusable state after this because the consumer has indeed been deleted from the candlepin database, but not the katello database.

candlepin db:
candlepin=> select count(*) from cp_consumer; count
-------
99
(1 row)

candlepin=> select * from cp_consumer where uuid='fb6ba503-ff5e-4443-bd95-97fd4a0ff1de';
id | created | updated | autoheal | entitlementstatus | lastcheckin | name | se
rvicelevel | username | uuid | environment_id | consumer_idcert_id | keypair_id | owner_id | type_id | releasever
----+---------+---------+----------+-------------------+-------------+------+---
-----------+----------+------+----------------+--------------------+------------
-----------------+------------
(0 rows)

katello db:
katelloschema=> select count(*) from systems; count
-------
100
(1 row)

katelloschema=> select * from systems where uuid='fb6ba503-ff5e-4443-bd95-97fd4a0ff1de';
id | uuid | name | description | location | environment_id | created_at | updated_
at | type | content_view_id
-----+--------------------------------------+----------+------------------------
-----+----------+----------------+----------------------------+-----------------
-----------+--------+-----------------
101 | fb6ba503-ff5e-4443-bd95-97fd4a0ff1de | system-1 | Initial Registration Pa
rams | None | 3 | 2013-05-07 17:52:45.100739 | 2013-05-07 17:52
:45.100739 | System |
(1 row)

This indiscrepancy also causes an error when going to Systems in the web ui:
Resources::Candlepin::CandlepinResource: 410 Gone {"displayMessage":"Consumer fb6ba503-ff5e-4443-bd95-97fd4a0ff1de has been deleted","deletedId":"fb6ba503-ff5e-4443-bd95-97fd4a0ff1de"} (GET /candlepin/consumers/fb6ba503-ff5e-4443-bd95-97fd4a0ff1de/compliance) (RestClient::Gone) {"displayMessage":"Consumer fb6ba503-ff5e-4443-bd95-97fd4a0ff1de has been deleted","deletedId":"fb6ba503-ff5e-4443-bd95-97fd4a0ff1de"}

I don't see anything related in any katello logs (that I could find).

Created: slagle on May 07, 2013 19:30 +00:00
Imported from https://api.github.com/repos/Katello/katello/issues/2210

#1

Updated by Bryan Kearney about 11 years ago

  • Status changed from New to Rejected
#2

Updated by Eric Helms almost 11 years ago

  • Triaged set to Yes
#3

Updated by Eric Helms over 10 years ago

  • Translation missing: en.field_release set to 13
#5

Updated by Bryan Kearney about 10 years ago

  • Status changed from Rejected to New
#6

Updated by Eric Helms over 9 years ago

  • Status changed from New to Resolved
  • Translation missing: en.field_release deleted (13)
#7

Updated by Eric Helms almost 9 years ago

  • Translation missing: en.field_release set to 166
Actions

Also available in: Atom PDF