Count references to --remote-image-dir
Acloud creates acloud_ref_cnt.txt in --remote-image-dir. The file
records number of instances using the directory. Each instance's base
directory contains "image_dir_link" that links to the image directory.
The link and the reference count are atomically updated with flock
commands.
Test: acloud-dev create -vv --local-image ~/target_files.zip \
--cvd-host-package ~/cvd-host_package.tar.gz \
--local-system-image ~/system.img \
--host 192.168.9.2 --host-user vsoc-01 \
--host-ssh-private-key-path ~/id_rsa \
--remote-image-dir img
Bug: 293966645
Change-Id: I27a4c9e4f232d162e9b5e978b53845fd62c6a4b3
5 files changed