canonical / charm-duplicity

A charm that provides functionality for both manual and automatic backups for a deployed application
0 stars 3 forks source link

Use of layer-venv leaves us with no way to update packages in the venv #3

Closed jneo8 closed 10 months ago

jneo8 commented 10 months ago

Using Layer-venv https://github.com/omnivector-solutions/layer-venv to install things like Fabric leaves us with no simple mechanism to update the packages in the venv other than redeploying the unit.

The charm should be using apt and/or snaps to install software.


Imported from Launchpad using lp2gh.

jneo8 commented 10 months ago

(by peter-sabaini) I guess the layer-venv route was chosen b/c there is no python3-fabric in xenial and bionic, only focal+

We might need to backport, either into bionic or a ppa

jneo8 commented 10 months ago

(by jfguedez) This also causes issues in certain environments with restrictive firewall/proxy server that don't allow access to python repositories.

The charm would have to be modified to bundle these dependencies. There are some references to the use of layer-venv because of fabric that would have to be revisited:

$ grep fabric src/lib/lib_duplicity.py

fabric can't be installed using wheelhouse. It is installed using layer:venv

    from fabric import Connection
jneo8 commented 10 months ago

(by guoqiao) MP created to get ride of layer:venv and use layer:basic to install fabric.

jneo8 commented 10 months ago

(by guoqiao) Although above MP will fix and improve current bug, but some further points are raised:

xav paice: "what about disconnected environments where they don't have access to pypi?"

That is a common issue in our charm dependency. if a python dependency: 1) has no deb package so we can not install via apt 2) need to compile so we can not add it in wheelhouse.txt Then we will not be able to install it in a env with no access to pypi.

I'd like to suggest to split this issue into 2 stage: 1) accept current solution (use layer:basic + pip + venv to install fabric). 2) create another bug to remove dependency for fabric, which is doable since in the code, fabric is actually only used to create remote dirs.

Bug created: https://bugs.launchpad.net/charm-duplicity/+bug/1914657