mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
The $() notation not only calls the function, it also creates subshell,
which is a separate process. Additionally in debug mode all the content
of the function get_asok_path is printed out in the logs each time
whenever it is called, for example:
...stderr://home/ubuntu/cephtest/clone.client.0/qa/standalone/ceph-helpers.sh:552: run_mgr: get_asok_path
...stderr://home/ubuntu/cephtest/clone.client.0/qa/standalone/ceph-helpers.sh:107: get_asok_path: local name=
...stderr://home/ubuntu/cephtest/clone.client.0/qa/standalone/ceph-helpers.sh:108: get_asok_path: '[' -n '' ']'
...stderr:///home/ubuntu/cephtest/clone.client.0/qa/standalone/ceph-helpers.sh:111: get_asok_path: get_asok_dir
...stderr:///home/ubuntu/cephtest/clone.client.0/qa/standalone/ceph-helpers.sh:99: get_asok_dir: '[' -n '' ']'
...stderr:///home/ubuntu/cephtest/clone.client.0/qa/standalone/ceph-helpers.sh:102: get_asok_dir: echo /tmp/ceph-asok.48301
...stderr://home/ubuntu/cephtest/clone.client.0/qa/standalone/ceph-helpers.sh:111: get_asok_path: echo '/tmp/ceph-asok.48301/$cluster-$name.asok'
Instead of calling get_asok_path each time we need to define osd.0,
etc. asok file path, we just predefine corresponding variables.
It not only avoids extra resource usage, but also removes a lot of
noise from the logs.
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
|
||
|---|---|---|
| .. | ||
| mclock-config.sh | ||
| network-ping.sh | ||
| ok-to-stop.sh | ||
| ok-to-upgrade.sh | ||
| rados-striper.sh | ||
| test-ceph-helpers.sh | ||
| test-snaptrim-stats.sh | ||
| ver-health.sh | ||