hermes icon indicating copy to clipboard operation
hermes copied to clipboard

Add a `gm reboot` command

Open seanchen1991 opened this issue 2 years ago • 5 comments

Summary

Add a gm reboot command that resets the state of gm.

Problem Definition

Sometimes the state of the local networks and full nodes on my machine get pretty messed up. In that scenario, the easiest fix is to simply reboot everything to a blank slate and start over.

Currently, this requires manually removing the appropriate directories. It would be handy to add a gm command to do this more quickly and easily.

Proposal

Add a gm reboot command that resets the state of gm. This command would:

  1. Remove all full nodes and networks from /.gm
  2. Run killall gaiad

Acceptance Criteria

  • [ ] gm reboot command added that works as expected

For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate milestone (priority) applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

seanchen1991 avatar Jun 30 '22 16:06 seanchen1991

I wonder how a gm reboot would differ from gm reset which is currently implemented.

So far, I've been using an alias which does : gm stop && gm reset && gm start

AlianBenabdallah avatar Jul 25 '22 11:07 AlianBenabdallah

I was thinking the reboot command would perform these three steps along with rm -rf $HOME/.gm/ibc* and rm -rf $HOME/.gm/node*.

seanchen1991 avatar Jul 25 '22 17:07 seanchen1991

This is a very good idea. I find myself using rm -rf $HOME/.gm/ibc* very often in conjuction with gm stop && gm reset && gm start. I'm even thinking that gm reset should be doing this, instead of adding a new reboot command.

adizere avatar Jul 26 '22 14:07 adizere

Tagging @harveenSingh here. This is a not a priority. But we'll get to it within ~a month or so.

adizere avatar Jul 26 '22 14:07 adizere

Thanks for adding me.

I have also found myself using rm -rf $HOME/.gm/ibc* . I agree on this 100%, gm reboot would be very useful

harveenSingh avatar Jul 26 '22 14:07 harveenSingh