MDATA-DELETE(1)

πŸ’– MDATA-DELETE(1) πŸ’–

okay so bestie, welcome to the mdata-delete manual page β€” it lives in the Metadata Commands section of the manual, and it's genuinely one of the most satisfying little commands ever. let's get into it πŸŽ€


✨ NAME ✨

mdata-delete β€” delete a metadata key-value pair. that's it. that's the whole job. bye key πŸ‘‹


🌸 SYNOPSIS 🌸

/usr/sbin/mdata-delete keyname

one argument, no options, no drama. iconic behaviour honestly πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so like, mdata-delete is the command that lets you β€” or a script, scripts deserve love too β€” modify the metadata for a guest instance running in a SmartDataCenter (SDC) cloud. yes bestie, we're in the cloud, we're in SDC, we're thriving ✨

quick lore drop on where metadata even comes from: metadata values are generally set programmatically via CloudAPI, or during interactive provisioning via a Web Portal. and if you're feeling spicy, you can also set them from inside the instance with the mdata-put command. so many entry points, so much main character energy 🌈

now for the actual tea πŸ“ β€” the key-value pair for keyname will be removed permanently from the metadata stored for this guest instance. permanent permanent. no undo button, no recycle bin, no take-backsies. and here's a cute little detail that lowkey slays: deletion of a key which did not exist is not considered an error. so if you delete something that was never there? still fine. still a win. we love a forgiving command 😌

πŸ’€ heads up: if the metadata service is unavailable at the time of the request, this command will block, just sitting there waiting for it to become available. patient queen.

and if things go actually wrong? non-transient failures will cause the program to exit with a non-zero status. depending on the nature of the error, some diagnostic output may be printed to stderr. read it. it's trying to tell you something πŸ™ˆ


πŸ‘‘ EXIT STATUS πŸ‘‘

these are the exit values that get returned, and yes we're going through all of them because every single one matters:

  • 0 β€” Successful completion. πŸ’– the key-value pair named keyname was removed from the instance metadata, or it did not initially exist. either way, we ate.
  • 2 β€” An error occurred. 😭 an unexpected error condition happened, and it's believed to be a non-transient condition. so like… retrying the request is not expected to resolve the error condition. ngl this one means either a software bug or a misconfiguration exists. it's giving "not your fault but also not going away" energy.
  • 3 β€” A usage error occurred. πŸ™ˆ malformed arguments were passed to the program. check the usage instructions to make sure valid arguments are supplied, bestie. the command is not mad, it's just disappointed.

⭐ SEE ALSO ⭐

go read these next, they're the whole friend group:


and that's the page!! this one comes to you from Joyent SmartDataCenter, dated October 2013 β€” yes she's a vintage queen and she still serves πŸ’œ πŸ§šβ€β™€οΈ

now go delete that key, bestie. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from