Haw Loeung (hloeung) wrote on 2013-12-04:
> This worked for me to reclaim space:
It's a little more complicated than that. Juju appears to work by git pulling from the newly deployed deployer dir (which is a branch of the previously deployed deployer dir) to the charm dir. Therefore, the charm dir must be a git ancestor of the last deployed deployer dir to work. Otherwise upgrade-charm falls on its face.
This procedure seems be the minimum you can clean down to, after an upgrade. It results in two .gits without history:
Also, if you're looking for stuff to clean in a fat charm environment, keep in mind /var/lib/juju/agents/unit-${UNIT}/state/bundles has previous zips as well.
Haw Loeung (hloeung) wrote on 2013-12-04:
> This worked for me to reclaim space:
It's a little more complicated than that. Juju appears to work by git pulling from the newly deployed deployer dir (which is a branch of the previously deployed deployer dir) to the charm dir. Therefore, the charm dir must be a git ancestor of the last deployed deployer dir to work. Otherwise upgrade-charm falls on its face.
This procedure seems be the minimum you can clean down to, after an upgrade. It results in two .gits without history:
UNIT=foo-0 eshold 10m juju/agents/ unit-${ UNIT} update- */.git current/ current/ .git/ charm/.git/
git config --global core.bigFileThr
git config --global pack.windowMemory 256m
cd /var/lib/
rm -rf charm/.git state/deployer/
(
cd state/deployer/
git init
git add .
git commit -m '[rfinnie] clean slate'
)
rsync -a state/deployer/
Also, if you're looking for stuff to clean in a fat charm environment, keep in mind /var/lib/ juju/agents/ unit-${ UNIT}/state/ bundles has previous zips as well.