MDATA-PUT(1)
π MDATA-PUT β the metadata glow-up page π
okay bestie, welcome to mdata-put(1), straight outta the Metadata Commands crew π
β¨ NAME β¨
mdata-put β sets the value of a metadata key-value pair. that's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
/usr/sbin/mdata-put keyname [ value ]
π¦ DESCRIPTION π¦
so likeβ¦ mdata-put lets you β or a lil script of yours, no judgement β modify the metadata for a guest instance that's running in a SmartDataCenter (SDC) cloud βοΈβ¨
fr fr, metadata values are generally set programmatically via CloudAPI, or during interactive provisioning via a Web Portal. but if you wanna grab the value of a key-value pair yourself? just pass its name to the mdata-get command, and she'll hand it over π«Ά
here's the tea: the key-value pair named keyname gets updated in the metadata store for this instance. and where does the new value come from? okay so:
- if a
valueargument is provided on the command-line, then that value will be used β - otherwise, if stdin is not a tty, the value will be read from stdin π₯
and if the metadata service is unavailable at the time of the request? she doesn't panic, she doesn't ghost β this command will block, waiting for it to become available. patient queen behavior π
Non-transient failures, like the non-existence of the requested keyname, will cause the program to exit with a non-zero status π and depending on the nature of the error, some diagnostic output may be printed to stderr. so yeah, read your stderr, bestie.
β EXIT STATUS β
the following exit values are returned, no cap:
0β Successful completion.
the requested keyname was valid, and its value was updated. slay, ate, periodt π
2β An error occurred.
an unexpected error condition occurred, which is believed to be a non-transient condition. retrying the request is not expected to resolve the error condition; either a software bug or a misconfiguration exists. so likeβ¦ don't just spam it, okay? π
3β A usage error occurred.
malformed arguments were passed to the program. check the usage instructions to ensure valid arguments are supplied. we've all been there, no shame π
π SEE ALSO π
go read the whole friend group, they're all iconic π
quick vibe check reminder: non-transient = retrying won't save you, so don't waste your main character energy on it π
and that's the page, babe π this was brought to you by Joyent SmartDataCenter β version stamped October 2013 β tysm for reading, mwah π«Άβ¨
π¦ where this page comes from
- ubuntu jammy: joyent-mdata-client 0.0.1-0ubuntu5 Β· MIT
- ubuntu noble: joyent-mdata-client 0.0.1-0ubuntu6 Β· MIT
- ubuntu questing: joyent-mdata-client 0.0.1-0ubuntu7
- ubuntu resolute: triton-mdata-client 20151001-0ubuntu3 Β· MIT
- ubuntu stonking: triton-mdata-client 20151001-0ubuntu3 Β· MIT
- Copyright (c) 2013, Joyent, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms