From d3cc7c21ea19b011e7447d9bed516968865f6347 Mon Sep 17 00:00:00 2001
From: Jeremy Stanley <fungi@yuggoth.org>
Date: Sat, 8 Aug 2015 15:30:44 +0000
Subject: [PATCH] Disable DIB internal APT cache for nodepool

The default behavior of the dpkg DIB element is to overlay a
directory from the host filesystem at /var/cache/apt/archives in the
chroot so that the cache of packages can persist to subsequent image
builds. This has a side effect of not actually populating the cache
within the chroot at all. Disable the local cache on the host so
that we can cache DEB packages in our images.

Change-Id: I1e33cb2e6049c83b3aad4a18885d8bd909f09195
---
 modules/openstack_project/templates/nodepool/nodepool.yaml.erb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/openstack_project/templates/nodepool/nodepool.yaml.erb b/modules/openstack_project/templates/nodepool/nodepool.yaml.erb
index fdee2ca6ee..e373fd8d14 100644
--- a/modules/openstack_project/templates/nodepool/nodepool.yaml.erb
+++ b/modules/openstack_project/templates/nodepool/nodepool.yaml.erb
@@ -1001,6 +1001,7 @@ diskimages:
     env-vars:
       TMPDIR: /opt/dib_tmp
       DIB_IMAGE_CACHE: /opt/dib_cache
+      DIB_APT_LOCAL_CACHE: '0'
       DIB_DISABLE_APT_CLEANUP: '1'
   - name: devstack-trusty
     elements:
@@ -1014,6 +1015,7 @@ diskimages:
     env-vars:
       TMPDIR: /opt/dib_tmp
       DIB_IMAGE_CACHE: /opt/dib_cache
+      DIB_APT_LOCAL_CACHE: '0'
       DIB_DISABLE_APT_CLEANUP: '1'
       QEMU_IMG_OPTIONS: compat=0.10
   - name: devstack-precise
@@ -1028,6 +1030,7 @@ diskimages:
     env-vars:
       TMPDIR: /opt/dib_tmp
       DIB_IMAGE_CACHE: /opt/dib_cache
+      DIB_APT_LOCAL_CACHE: '0'
       DIB_DISABLE_APT_CLEANUP: '1'
       QEMU_IMG_OPTIONS: compat=0.10
   - name: devstack-centos7-dib