Here we go again with sys-cacher

My last comment was that i post again if the error occurs again. I am not sure if i posted again, however this occurred again and again in different templates. I tried rebooting my cacher and sys-whonix and the error would still be there. Next day after rebooting and updating again it would work.

This was really annoying. Fast updates were awesome, but the inconsistency made it unusable for me.

Besides of the tutorials that are there on this forum I additionally tried lots of things but never made it work.

I setup everything via saltstack, so I should be able to reproduce this. The most interesting states to keep it clear:

file 50_user.conf:

binds+=( '/var/cache/apt-cacher-ng' )
binds+=( '/var/log/apt-cacher-ng' )
binds+=( '/etc/anacrontab' )

file acng.conf:

...
Port:8082
...
Remap-alxrep: file:archlx_mirrors file:archlx_mirrors_extra   /archlinux
Remap-blackarch: file:blackarch_mirror-list  /blackarch
Remap-debrep: file:deb_mirror*.gz file:debian_mirrors_extra /debian ; file:backends_debian # Debian Archives
Remap-fedrep: file:fedora_mirrors file:fedora_mirrors_extra ; https://mirrors.kernel.org/fedora/ https://ftp-stud.hs-esslingen.de/pub/fedora/linux/  # Fedora Linux
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu Archives
Remap-Qubes: file:Qubes_mirrors
Remap-klxrep: file:kali_mirrors /kali ; file:backends_kali # Kali Linux Archives
Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file or specify preferred mirrors here
Remap-sfnet:  file:sfnet_mirrors # ; file:backends_sfnet # incomplete, please create this file or specify preferred mirrors here
Remap-epel:   file:epel_mirrors # Fedora EPEL
Remap-slrep:  file:sl_mirrors # Scientific Linux
Remap-gentoo: file:gentoo_mirrors.gz /gentoo ; file:backends_gentoo # Gentoo Archives
Remap-secdeb: https://security.debian.org https://security.debian.org/debian-security https://deb.debian.org/debian-security /debian-security cdn-fastly.deb.debian.org/debian-security #; deb.debian.org/debian-security security.debian.org cdn-fastly.deb.debian.org/debian-security
...
PassThroughPattern: ^dl\.flathub\.org:443$
PassThroughPattern: ^(extrepo-team\.pages\.debian\.net|salsa\.debian\.org):443$
PassThroughPattern: ^(codecs\.fedoraproject\.org):443$
Proxy: http://127.0.0.1:8118

file config.sls:

{% if grains['id'] == 'tpl-sys-apt-cacher-ng' %}

template-sys-apt-cacher-ng--mask:
  service.masked:
    - name: apt-cacher-ng

template-sys-apt-cacher-ng--mask-privoxy:
  service.masked:
    - name: privoxy

template-sys-apt-cacher-ng--configure:
  file.managed:
    - name: /etc/apt-cacher-ng/acng.conf
    - source: salt://sys-apt-cacher-ng/files/acng.conf
    - user: root
    - group: root
    - makedirs: True

template-sys-apt-cacher-ng-privoxy:
  file.append:
    - name: /etc/privoxy/config
    - text: forward-socks5t / 10.152.152.10:9153 .

'chown -R apt-cacher-ng:apt-cacher-ng /var/cache/apt-cacher-ng':
  cmd.run

'chmod -R a+rX,g+rw,u+rw /var/cache/apt-cacher-ng':
  cmd.run


{% endif %}