vagga
vagga copied to clipboard
`vagga _clean --unused` is not chainable with other options (eg, --old/--tmp)
For instance, calling vagga _clean --unused --old throws the following warning:
$ vagga _clean --unused --old
WARN:vagga::wrapper::clean: No vagga directory exists
Calling _clean with option separately works as expected.
I think the problem is here,
wrapper "chroot"s into .vagga/.mnt but does not chroot back.
Well, the options meant to be mutually exclusive.
As a follow up of our private chat with @tailhook, following issue seems to be the same:
$ RUST_LOG=debug vagga _clean --unused --volumes
...
DEBUG:vagga::version: Got hash "72e7cb6a250ea3bc58942151dc42a7ad97b483a975d25c5c189c46687f1cb1c81b7b9e97fa0805acd82d127888a00a07974573a36ff666a4d6c65637d5905e5d"
INFO:vagga::wrapper::clean: Useful images {"test.72e7cb6a", "app-freezer.b61149e1", "mysql.4c37a6b3", "app.303ffc85"}
INFO:vagga::wrapper::clean: Useful volumes {}
ERROR:vagga::wrapper::clean: Error cleaning up: Can't read dir "~/src/gitlab/remak_team/not-open-source/tbe-microservice/.vagga/.volumes": No such file or directory (os error 2)
$ la -d ~/src/gitlab/remak_team/not-open-source/tbe-microservice/.vagga/.volumes
drwxr-xr-x 3 wk wk 4.0K Oct 30 11:58 ~/src/gitlab/remak_team/not-open-source/tbe-microservice/.vagga/.volumes/
$ la ~/src/gitlab/remak_team/not-open-source/tbe-microservice/.vagga/.volumes
total 4.0K
drwxr-xr-x 6 wk wk 4.0K Oct 31 17:27 mysql-data/
-rw-r--r-- 1 wk wk 0 Oct 30 11:58 .tmp.mysql-data.lock
$ stat ~/src/gitlab/remak_team/not-open-source/tbe-microservice/.vagga/.volumes
File: '~/src/gitlab/remak_team/not-open-source/tbe-microservice/.vagga/.volumes'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fd07h/64775d Inode: 1068218 Links: 3
Access: (0755/drwxr-xr-x) Uid: ( 1000/ wk) Gid: ( 1000/ wk)
Access: 2017-11-03 12:23:29.318771221 +0200
Modify: 2017-10-30 11:58:28.198509078 +0200
Change: 2017-10-30 11:58:28.198509078 +0200
Birth: -