st2 icon indicating copy to clipboard operation
st2 copied to clipboard

The st2ctl reload command is missing a purge option

Open pietervogelaar opened this issue 8 years ago • 10 comments

I discovered that when a rule, trigger, action or workflow is removed from a git repository and is no longer on the disk of a stackstorm server, the command sudo st2ctl reload --register-setup-virtualenvs --register-all does not purge these items from StackStorm. I have to manually delete them with st2 commands.

It would be very nice if there was a purge flag or something.

pietervogelaar avatar Mar 28 '17 07:03 pietervogelaar

Yeah, sounds like a good feature request. I remember we got several reports like that before and I believe we have to put everything together and reconsider, keeping in mind infrastructure as a code principles.

Similar Issues:

There are probably other related issues in search.

arm4b avatar Mar 28 '17 13:03 arm4b

+1

hagay3 avatar Mar 30 '17 19:03 hagay3

+1 I didn't get it why my aliases would still be present when we reload it.

leevs avatar May 30 '17 14:05 leevs

+1

mbrannigan avatar Jul 26 '17 19:07 mbrannigan

+1

nmaludy avatar Dec 08 '17 22:12 nmaludy

+1

ankittyagi20 avatar Jan 17 '18 09:01 ankittyagi20

+1

matrulda avatar Feb 28 '20 09:02 matrulda

Maybe someone who knows the st2ctl and pack install could post a list of what would need to happen to solve this ticket? @armab @nmaludy ?

punkrokk avatar Feb 29 '20 16:02 punkrokk

There is some explanation in: https://github.com/StackStorm/st2/issues/3143#issuecomment-270478910. I think that statement was made from the point that possible pack content could be added via APIs, that's not present on the file system.

I think the end goal to close a bunch of issues: make sure the registered content in DB is in sync with the file system state. Unload everything else. Otherwise it looks counter-intuitive.

arm4b avatar Jun 12 '20 18:06 arm4b

@armab I kind of agree. What if there was a --purge option that ran st2 pack remove? Would that solve for this without a ton of new logic?

punkrokk avatar Jun 12 '20 18:06 punkrokk