majduk / charm-apt-mirror Goto Github PK
View Code? Open in Web Editor NEWCharmed APT Mirror
License: GNU General Public License v3.0
Charmed APT Mirror
License: GNU General Public License v3.0
I've encountered this on a cloud where we're using charm-apt-mirror:
2021-09-09 22:55:38 INFO juju-log /var/spool/apt-mirror/mirror/<REDACTED>/apt-mirror/archive.ubuntu.com/ubuntu/pool -> /var/spool/apt-mirror/snapshot-20210909225538//archive.ubu
[...]
2021-09-09 22:57:51 ERROR juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
File "./src/charm.py", line 201, in <module>
main(AptMirrorCharm)
File "/var/lib/juju/agents/unit-apt-mirror-0/charm/venv/ops/main.py", line 402, in main
_emit_charm_event(charm, dispatcher.event_name)
File "/var/lib/juju/agents/unit-apt-mirror-0/charm/venv/ops/main.py", line 140, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-apt-mirror-0/charm/venv/ops/framework.py", line 278, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-apt-mirror-0/charm/venv/ops/framework.py", line 722, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-apt-mirror-0/charm/venv/ops/framework.py", line 767, in _reemit
custom_handler(event)
File "./src/charm.py", line 117, in _on_create_snapshot_action
os.symlink(src_pool, dst_pool)
FileExistsError: [Errno 17] File exists: '/var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/pool' -> '/var/spool/apt-mirror/snapshot-20210909225538/archive.ubuntu.com/ubuntu/pool'
This is in an environment where we have one central mirror pulling from upstream, and several secondary mirrors pulling from the central mirror. It appears that one of the secondary mirrors was at one point pulling from upstream and had a /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu
directory present in addition to the /var/spool/apt-mirror/mirror/<REDACTED>/apt-mirror/archive.ubuntu.com/ubuntu
directory.
It may be necessary to clean up old repository directories in some way to avoid this conflict.
The use-case is to run in a proxied environment with internally accessilbe apt-mirror source. Charm currently only supports proxy either fully on or off based on the model defaults and it is not possible to configure proxy exceptions as it doesn't support juju-no-proxy.
Heya!
I'm trying out the charm but its not clear from the README how to:
Great work!
That means if you have to mirror another mirror created with that charm and you have source mirror URL in the form of http://source.mirror.server/source-mirror-path/repo then in your repo URL will look something like http://mirror.server/mirror-path/source.mirror.server/source-mirror-path/repo. Mirrored URLs diverge from the upstream repo pattern because of that and it is not very convenient in every-day operations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.