The quick question is “What is the purpose of /admin/shutdown?” mean, what risks do I have when not using it?
The behavior of killing/restart/upgrade Docker instances can lead to problems? Does it shut down all services including replicas and D.Zero? Anyway, there is very little about this. It would be interesting to clarify.
https://docs.dgraph.io/deploy/#shutdown-database
The issue.
I am trying to send remotely a Shutdown command (https://docs.dgraph.io/deploy/#shutdown) but I get this error:
// 20180317225134
// http://dgraphserver.db.rancher.internal/admin/shutdown
{
"errors": [
{
"code": "ErrorUnauthorized",
"message": "Request from IP: 172.17.0.3"
}
]
}
Even this happens with /admin/Export. It is the correct one, because it is protecting the instance. But how is it inside a Docker, how could we supposedly automate it?
PS. I will improvise a Webhook for this. To inject curl into the Dgraph instance.
I am sending a fetch command from another instance in the same Dgraph environment. And that is the problem of authorization, within the instance of the Dgraph all commands works. Would not there be a way to authorize all IP’s temporarily?
For example, my env is behind a Reverse proxy. I only expose 80 and 443 in Firewall. So none Dgraph ports are availeble to outsiders. For me it’s safe expose it.
Cheers