Temporarily prevent Elastic from accepting requests

I am practicing doing an upgrade of Elastic 7.0.0 -> 7.6.2 in a UAT instance. Here's what keeps happening. On the old instance I create a snapshot. I shut it down. I turn on the new instance. I try to restore the snapshot I just made. BOOM! because some sneaky user has already managed to create a new index in the new instance with the same name as an index in my snapshot.

How would you recommend I prevent this? I just had an idea... what if that first time I start the new instance I start it on a different port other then 9200? Then the client wouldn't be able to hit it. Problem with that is the client would end up getting an error, or I will miss indexing what the client was trying to index, like a log event with Winston. Is there a cleaner way for me to have my new instance start up by temporarily blocking requests until my snapshot is restored?

How many nodes do you have in your cluster? Can you perform a rolling upgrade? If not you might be able to temporarily block access through IP tables, but that will mean users will see connection errors.

It's the only node in the cluster, Christian... a lonely cluster of one...

Then there are few options and FBlientscwill notice. IP tables is probably the best way.

Understood, Christian. Thanks for all your help!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.