couchbase-partners / google-deployment-manager-couchbase

Google Deployment Manager (DM) templates for Couchbase Enterprise
Apache License 2.0
11 stars 9 forks source link

User Data Script Runs on Reboots #45

Closed benofben closed 6 years ago

benofben commented 6 years ago

We've had a report that the pd-ssd is showing up fresh after a reboot. It's unclear why this would happen. Need to investigate.

benofben commented 6 years ago

Just as a simple test, I spun up a server. In the home directory I touched a file. Then I ran sudo reboot. The file is still there. So, we're not losing the disk.

However, when I try to login to 8091 on the rebooted node, the configure screen is showing up. This is a problem. Unclear why this would happen. Going to reach out to GCP on it.

benofben commented 6 years ago

I wonder if it's related to this issue. https://github.com/DSPN/google-compute-engine-dse/issues/25

benofben commented 6 years ago

So, it appears the user data script is running when the node is rebooted. That's clobbering the install. I'm pretty sure it didn't used to do that. I've asked Google if there have been any changes.

In the meantime, there's a workaround. We're going to check for the existence of /opt/couchbase/bin/ or /home/sync_gateway. If either exists then we'll exit the script.

I'll code it up...

benofben commented 6 years ago

This seems to have fixed it. https://github.com/couchbase-partners/google-deployment-manager-couchbase/commit/bf429cdc8fe1b14891ee06cd5ea0cf61d1297e48