Skip to content

Don't accidentally rm -rf /var/www/html #16

@archisgore

Description

@archisgore

From Adrian Goins at Rancher:

monachusToday at 7:21 AM
hi archis. happy new year!
i ran into a freakish problem last night where i polyscripted Lisa's website and it deleted it. i was super lucky to have a backup of the content, so i'm still alive.

this had nothing to do with your stuff, and although i've figured out what happened, i don't know why it happened. for some reason when i updated the deployment to mount the NFS share on /wordpress/shared, the version of the manifest running in the cluster merged the two configs and mounted it in both places. so when scramble.sh came along and ran rm -fr /var/www/html it nuked the actual share content.

i had a problem with this deployment merging some other stuff, so i ended up just deleting it and recreating it.

however, i'm about to release a video on wordpress/kubernetes/polyscripting, and i don't want anyone else to accidentally delete their NFS share if kubernetes keeps it in the old location.

so i updated my copy of scramble.sh and changed the rm-rf to

just in case there's something in /var/www/html that we don't

want to delete, like an accidental NFS share

mv /var/www/html /var/www/html.bak
it seems like a safe thing to add that won't cause any harm, so i'm sharing it in case you want to update your version
you can see the whole breakdown of the weird k8s behavior in the #kubernetes channel in the main server, if you're interested

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions