Is it safe to delete * from agent where kind="agent"? If I don't, does it cause issues?

In a Rancher 1.6 environment I see about 1000 registeredAgent vs ~7000 agent based on:

select kind, count(*) from agent where state = 'active' group by kind;
kind count(*)
agent 7495
registeredAgent 1001

other context:

  • we have already tried running rancher/cleanup-1-1 against this a couple months ago.
  • there are ~1000 EC2 hosts for this particular Rancher setup
  • when I browse the records of registeredAgent I see that the 99% of the have agent.removed set to NULL and their agent.created date all appear to be outdated.

a couple questions:

1 - Is this safe to delete? I suspect there are other cases - perhaps someone point me to existing docs or threads about this?

2 - if we do not delete, does this cause issues?

better yet I should delete these:

select kind, count(*) from agent where state = 'purged' group by kind;
kind count(*)
agent 183579
registeredAgent 632

… what could go wrong?

Also in case it helps: for one reason or another we are stuck on Rancher 1.6. Otherwise we’d be on 2.x by now, or off Rancher entirely.

Make a database backup; Purged should be safe (as far as database-diving into an abandoned stack of software goes…), other states are probably not.

Your comment goes both ways; Rancher wasn’t very big to begin with when 1.x was being actively developed, not that many of those people are left, and you’re asking about obscure internals knowledge of something that if they were familiar with it they haven’t touched in 3+ years.

1 Like

Thank you! Any sort of response from anyone that has worked with Rancher more than I have is welcome.

as far as database-diving into an abandoned stack of software goes

Yes! Perfectly worded description. It’s sort of like poking around a thrift store for treasures.

Your comment goes both ways; Rancher wasn’t very big to begin with when 1.x was being actively developed, not that many of those people are left, and you’re asking about obscure internals knowledge of something that if they were familiar with it they haven’t touched in 3+ years.

I agree just that I am the caretaker and she is in pain. I want to minimize it and give her the love and affection she needs until we finally, reluctantly, bury her after we’ve transitioned to her replacement.