swift-get-nodes(1)

✨ swift-get-nodes(1) ✨

okay bestie, welcome to swift-get-nodes β€” it's the OpenStack Swift get-nodes tool, and it's literally about to tell you where your stuff actually lives. πŸ’…


🌸 NAME 🌸

swift-get-nodes β€” the OpenStack Swift get-nodes tool. yes that's the whole vibe. she does one thing and she does it iconically.


πŸ¦‹ SYNOPSIS πŸ¦‹

swift-get-nodes  [options] <ring.gz> <account> [<container> [<object>]]

Or

swift-get-nodes [options] <ring.gz> -p <partition>

Or

swift-get-nodes  [options] -P policy_name <account> <container> <object>

πŸ’– DESCRIPTION πŸ’–

so like, swift-get-nodes is the tool you use to find out where a particular account, container, or object item is actually located inside your swift cluster nodes. it's giving "where does this thing live" energy. πŸ”

for example β€” and I'm obsessed with this β€” if you have the account hash and a container name that belongs to that account, you can use swift-get-nodes to look up where the container resides, by using the container ring. slay. ✨


πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” shows the help message and dips. exit. bye. πŸ‘‹
  • -a, --all β€” show all the handoff nodes. all of them. the whole crew. 🫢
  • -p PARTITION, --partition=PARTITION β€” show nodes for a given partition. you give her a partition, she gives you nodes. simple as that. πŸ—‚οΈ
  • -P POLICY_NAME, --policy-name=POLICY_NAME β€” specify storage policy name. yes capital P, don't mix her up with lowercase -p, they are NOT the same girl. πŸ’€
  • -d SWIFT_DIR, --swift-dir=SWIFT_DIR β€” pass the location of the swift configuration file if it's different from the default location /etc/swift. 🏠

Example:

$ swift-get-nodes /etc/swift/account.ring.gz MyAccount-12ac01446be2

Account     MyAccount-12ac01446be2
Container   None
Object      None

Partition 221082
Hash d7e6ba68cfdce0f0e4ca7890e46cacce

Server:Port Device      172.24.24.29:6202 sdd
Server:Port Device      172.24.24.27:6202 sdr
Server:Port Device      172.24.24.32:6202 sde
Server:Port Device      172.24.24.26:6202 sdv    [Handoff]

curl -I -XHEAD
http://172.24.24.29:6202/sdd/221082/MyAccount-12ac01446be2
curl -I -XHEAD
http://172.24.24.27:6202/sdr/221082/MyAccount-12ac01446be2
curl -I -XHEAD
http://172.24.24.32:6202/sde/221082/MyAccount-12ac01446be2
curl -I -XHEAD
http://172.24.24.26:6202/sdv/221082/MyAccount-12ac01446be2 #
[Handoff]

ssh 172.24.24.29 ls -lah
/srv/node/sdd/accounts/221082/cce/d7e6ba68cfdce0f0e4ca7890e46cacce/
ssh 172.24.24.27 ls -lah
/srv/node/sdr/accounts/221082/cce/d7e6ba68cfdce0f0e4ca7890e46cacce/
ssh 172.24.24.32 ls -lah
/srv/node/sde/accounts/221082/cce/d7e6ba68cfdce0f0e4ca7890e46cacce/
ssh 172.24.24.26 ls -lah
/srv/node/sdv/accounts/221082/cce/d7e6ba68cfdce0f0e4ca7890e46cacce/
# [Handoff]

look at her go. [Handoff] nodes and everything. ate. πŸ’…


πŸ“š DOCUMENTATION πŸ“š

more documentation about OpenStack Swift can be found at https://docs.openstack.org/swift/latest/ β€” go read it, it's giving study session energy. 🧚


πŸ‘€ SEE ALSO πŸ‘€

the whole friend group fr fr. 🫢


okay that's the page, bestie. this was the Linux manual page for swift-get-nodes(1), dated 10/25/2016, from the OpenStack Swift source. stay slaying, and remember: the ring knows where everything is, and now so do you. βœ¨πŸ’–πŸŒˆπŸ‘‘