Cleaning up failed system delete in Katello

Some how I got my CloudForms SystemEngine into a weird state. I unregistered a consumer while simultaneously removing it from the Katello UI. This caused a race condition because the UI got a 410 GONE error from Candlepin and it didn’t remove it from its database. Clearly a bug but still that left me in a state where the Systems page would show the 410 ERROR and leave me with a spinning cursor.

As this was simply a test setup I could’ve just reinstalled. But I wanted to know how this works. As you know Katello is made of many parts: Pulp, Candlepin, and Foreman.

My particular installation didn’t have Foreman, so that left: Pulp, Candlepin, Katello proper, and Elasticsearch. Since we were getting a 410 from Candlepin that means the consumer was already gone from that database

cp_consumer

table.

First, I removed the system from Katello’s database.

# psql -U katellouser katelloschema
katelloschema=> delete from systems where id = 1;
katelloschema=> commit;
katelloschema=> \q

Then I removed the consumer from Pulp:

# mongo
MongoDB shell version: 1.8.2
connecting to: test
> show dbs
admin	(empty)
local	(empty)
pulp_database	0.203125GB
> use pulp_database
switched to db pulp_database
> show collections
...
consumers
...
> db.consumers.remove()
> 

What in the world did you just do? 🙂 We can see that pulp uses the

pulp_database

. And that one of the collections was

consumers

. Running

db.consumers.help()

revealed there was a remove method. In my case I only had one system so I just did

db.consumers.remove()

. But if you have more you’ll want to specify the key:

db.consumers.remove({"_id":"62d61426-3cf9-4afb-bc3b-e0f696950adc"})

. Ok we’re done. Let’s go checkout Katello again.

UGH Still shows spinning cursor. So what else could be pointing to the fact that we had a system? Elasticsearch which is the search engine for Katello. That just needs reindexing.

# cd /usr/share/katello
# rake reindex
Search Indices cleared.
Re-indexing ActivationKey
Re-indexing Changeset
Re-indexing Filter
Re-indexing GpgKey
Re-indexing Notice
Re-indexing Organization
Re-indexing Provider
Re-indexing Role
Re-indexing SyncPlan
Re-indexing System
Re-indexing TaskStatus
Re-indexing User
Re-indexing Repositories
# 

Ok let’s try one more time. Visit your systems page in Katello and now you should see that there is no longer a spinning cursor, but a blank list of systems. This is what I expected. YAY!

TRENDnet Powerline Adapter configuration

Since we’re selling our house, we kind of had to reorganize the network equipment. I had a place where I didn’t have a network port. I got the TRENDnet 200 Mbps Powerline Ethernet AV Adapter Kit TPL-303E2K.

They are SUPER FINICKY to install. Requiring a damn Windows utility to configure. I tried using the documentation and TRENDnet support site. None were helpful. But thanks to this Amazon shopper was able to get them configured. Click here for full comment.

Basically, if you followed the documentation you probably hit the RESET button. That means you will have to make them both local adapters and reset them using the utility.

In my experience, after the reset, neither unit could be recognized as the remote unit. What seemed to fix that was connecting each unit as the local, and using the privacy tab in the software to configure each to the local network. Perhaps the “factory default” network name is not the default software network name? I don’t know. But finally, the remote unit was again recognized. At that point, I had to use the password-within-seconds trick to get the remote unit recognized again. And at that point, things worked. Sheesh.

Once I did that, I was able to see the remote adapter. YAY! Entered the password. Not accepted. BOO! Back to the Amazon review, I saw that you have just a few seconds to enter the password.

I realized that the unit had only a few seconds in which the power light wasn’t blinking. So, I had the password entered in the software’s dialog box, and plugged the remote unit in, and hit enter to try the password ASAP. Finally! Password accepted. Once the password is accepted, you can pretty easily move the unit to other outlets

Had one of my kids go to the other room to unplug it and yell when they saw a light. 🙂 Works great now. Printer has now been relocated to the bonus room. Thanks for Amazon reviews to help solve technical issues 😀