When adding the fix for the HA controller, I used `jujudata.currentController() to the the list of api endpoints. I thought that command got the information from the juju controller, but it didn't. It was just checking the api_endpoint from the controllers.yaml inside .local/share/juju. Therefore, if you execute that part of the code from a machine that doesn't have that information, this error will happen:
FileNotFoundError: [Errno 2] No such file or directory: '/root/.local/share/juju/controllers.yaml'
When adding the fix for the HA controller, I used `jujudata.currentController() to the the list of api endpoints. I thought that command got the information from the juju controller, but it didn't. It was just checking the api_endpoint from the controllers.yaml inside .local/share/juju. Therefore, if you execute that part of the code from a machine that doesn't have that information, this error will happen: