Auto-remove '/var/lib/juju' when I restarting jujud in empty mongodb

I take some time to learn high available topic. And I try many times regarding disaster failure drill.But I found the path of ‘/var/lib/juju’ was removed in the situation of no data in mongodb when I try restart jujud. what’s wrong?

my requriments is that the directory of ‘/var/lib/juju’ is not deleted in the situation of no data in mongodb when I restart jujud. So, how can i do to achieve it? I you can help me, please reply me!

Thank you for your question @ytwxy99. Sorry that you are having a problem.

I’m not sure I understand the situation. If mongodb is empty, was Juju bootstrapped correctly initially?

What steps did you take before you attempted disaster recovery?

@jameinel did a long post on the manual steps to restore in a disaster recovery scenario:

We also have work on our roadmap this cycle to improve the restore mechanism.

What type of restore scenarios are you interested in?

Hi,@timClicks. The situation is that the directory of ‘/var/lib/juju/’ will be removed when my mongodb data is new. For example, I detele a unit information in mongodb, then i restart my jujud service on the same agent’s host. After that operation , i found the ‘/var/lib/juju/agent/${unit}’ would be removed. Can u understand this situation?

This has been fixed in the later versions of Juju.

The removal of the directory was due to the agent getting a “permanently unable to login” error as its password (and old password) did not validate.

Now the agents are just stopped, not removed.

1 Like

Okey,I got it. I will try it on later version of juju. Thanks