<div dir="ltr">If you're just curious how swift works, the CLI tool `swift-get-nodes` wraps up that translation/calculation pretty nicely<div><br></div><div><div>vagrant@saio:~$ swift stat -v test test | egrep -i "(timestamp|url)"<br>                   URL: <a href="http://saio:8080/v1/AUTH_test/test/test">http://saio:8080/v1/AUTH_test/test/test</a><br>           X-Timestamp: 1643914310.47773<br>vagrant@saio:~$ tail /var/log/syslog | grep "object-"<br>Feb  3 18:54:37 saio object-6020: STDERR: (6752) accepted ('127.0.0.1', 56050)<br>Feb  3 18:54:37 saio object-6020: 127.0.0.1 - - [03/Feb/2022:18:54:37 +0000] "HEAD /sdb2/40/AUTH_test/test/test" 200 8 "HEAD <a href="http://saio:8080/v1/AUTH_test/test/test">http://saio:8080/v1/AUTH_test/test/test</a>" "tx1cc84ff96e4b40d18bdb0-0061fc24ed" "proxy-server 6480" 0.0006 "-" 6752 0<br>Feb  3 18:54:37 saio object-6020: STDERR: 127.0.0.1 - - [03/Feb/2022 18:54:37] "HEAD /sdb2/40/AUTH_test/test/test HTTP/1.1" 200 423 0.001149 (txn: tx1cc84ff96e4b40d18bdb0-0061fc24ed)<br>vagrant@saio:~$ swift-get-nodes /etc/swift/object.ring.gz AUTH_test test test | grep /srv/node<br>such as "export DEVICE=/srv/node"<br>ssh 127.0.0.2 "ls -lah ${DEVICE:-/srv/node*}/sdb2/objects/40/35a/a161102fba1710ef912af194b8d4635a"<br>ssh 127.0.0.3 "ls -lah ${DEVICE:-/srv/node*}/sdb3/objects/40/35a/a161102fba1710ef912af194b8d4635a"<br>ssh 127.0.0.4 "ls -lah ${DEVICE:-/srv/node*}/sdb4/objects/40/35a/a161102fba1710ef912af194b8d4635a"<br>ssh 127.0.0.1 "ls -lah ${DEVICE:-/srv/node*}/sdb1/objects/40/35a/a161102fba1710ef912af194b8d4635a" # [Handoff]<br>note: `/srv/node*` is used as default value of `devices`, the real value is set in the config file on each storage node.<br>vagrant@saio:~$ ls /srv/node2/sdb2/objects/40/35a/a161102fba1710ef912af194b8d4635a/<br>1643914310.47773.data<br></div><div><br></div><div>...  so you could look at how that does it:</div><div><br></div><div><div><a href="https://github.com/openstack/swift/blob/master/swift/cli/info.py#L105">https://github.com/openstack/swift/blob/master/swift/cli/info.py#L105</a></div></div><div><br></div><div>If you're doing something more sophisticated (maybe in the HPC space with direct/non-proxy access) - checkout the "ListEndpoints" middleware:</div><div><br></div><div><a href="https://docs.openstack.org/swift/latest/middleware.html#module-swift.common.middleware.list_endpoints">https://docs.openstack.org/swift/latest/middleware.html#module-swift.common.middleware.list_endpoints</a></div></div><div><br></div><div>If you have some more questions, come say Hi in #openstack-swift on OFTC</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 3, 2022 at 12:45 PM <a href="mailto:admin@gibdev.ru">admin@gibdev.ru</a> <<a href="mailto:admin@gibdev.ru">admin@gibdev.ru</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  

    
  
  <div>
    <p>I have installed openstack swift 2.25.2</p>
    <p>object-server writes and serves local files from disk</p>
    <p>It receives http requests from a proxy-server, for example:</p>
    <p><br>
    </p>
    <p>http get:
/sdb4/525/AUTH_xxxxxxxxxxxxxxxxxxxxxxxx/panda/2c34a941f581d848e2799e7a0956ea14f3cb27b0e516aef99a438fdaebbd7592</p>
    <p><br>
    </p>
    <p>reads a file from disk:</p>
    <p><br>
    </p>
    <p>/srv/node/sdb4/objects/525/346/835ee70dce07217d8e33147e0864f346/1643910916.71556.data</p>
    <p><br>
    </p>
    <p>how can I calculate the path by which the file will be read by
      object-server?</p>
    <p><br>
    </p>
    <p>thanks<br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br>
        </span></span></p>
  </div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Clay Gerrard<div>210 788 9431<br></div></div></div>