juju / python-libjuju

Python library for the Juju API
Apache License 2.0
59 stars 99 forks source link

[Bug]: Local Proxy Charm in LXD fails to be deployed #839

Closed gcalvinos closed 1 year ago

gcalvinos commented 1 year ago

Description

When trying to deploy a local charm in LXD python libjuju returns the following error:

2023-04-20T07:44:50 ERROR lcm.ns ns.py:4829 Task ns=8eb21604-9e55-4e08-ae17-c2d260750f32 instantiate=0beca26a-4c7b-44da-8dd2-eb22b13d9747 Deploying VCA vnf2.: Install configuration Software Error deploying charm into ee=8eb21604-9e55-4e08-ae17-c2d260750f32.app-vnf-ea396e3481-z0-uce1s.1 : ('Unknown version : %s', '')

I checked that this error happens in the method deploy in model.py, when it calls the following line:

base = utils.get_local_charm_base( charm_series, channel, metadata, charm_dir, client.Base)

Urgency

Blocker for our release

Python-libjuju version

2.9.42.1

Juju version

2.9.42

Reproduce / Test

To reproduce this error I used the following Charm:
https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/charm-packages/nopasswd_proxy_charm_vnf/charms/simple

I already commented this issue with @juanmanuel-tirado
juanmanuel-tirado commented 1 year ago

This issue seems to be fixed with the last changes in the 2.9 branch. @gcalvinos has to confirm it

gcalvinos commented 1 year ago

After testing the 2.9 branch, I still see the same issue:

+-------------------------+--------------------------------------+---------------------+----------+-------------------+------------------------------------------+
| ns instance name        | id                                   | date                | ns state | current operation | error details                            |
+-------------------------+--------------------------------------+---------------------+----------+-------------------+------------------------------------------+
| nopasswd_proxy_charm-ns | e8d239e0-2638-43fd-bae8-8a121c090180 | 2023-05-09T08:32:20 | BROKEN   | IDLE (None)       | Operation: INSTANTIATING.aa5f365f-ac45-4 |
|                         |                                      |                     |          |                   | 2a0-a5b3-9d138b83424d, Stage 2/5:        |
|                         |                                      |                     |          |                   | deployment of KDUs, VMs and execution    |
|                         |                                      |                     |          |                   | environments.                            |
|                         |                                      |                     |          |                   | Detail: Deploying VCA vnf2.: Install     |
|                         |                                      |                     |          |                   | configuration Software Error deploying   |
|                         |                                      |                     |          |                   | charm into ee=e8d239e0-2638-43fd-        |
|                         |                                      |                     |          |                   | bae8-8a121c090180.app-                   |
|                         |                                      |                     |          |                   | vnf-28344fc1eb-z0-bc5cy.0 : ('Unknown    |
|                         |                                      |                     |          |                   | version : %s', ''). Deploying VCA vnf1.: |
|                         |                                      |                     |          |                   | Install configuration Software Error     |
|                         |                                      |                     |          |                   | deploying charm into                     |
|                         |                                      |                     |          |                   | ee=e8d239e0-2638-43fd-                   |
|                         |                                      |                     |          |                   | bae8-8a121c090180.app-                   |
|                         |                                      |                     |          |                   | vnf-38c5da05a0-z0-mtpdy.1 : ('Unknown    |
|                         |                                      |                     |          |                   | version : %s', '')                       |
+-------------------------+--------------------------------------+---------------------+----------+-------------------+------------------------------------------+
juanmanuel-tirado commented 1 year ago

@cderici I think we need some cherry-picking to fix this issue

cderici commented 1 year ago

yeah looks like one of the base fixes needs to be cherry picked from https://github.com/juju/python-libjuju/pull/830, I'm on it :+1: just to make sure, @gcalvinos, are you deploying this as a local charm? nevermind I just saw the title :+1:

cderici commented 1 year ago

Interesting. I'm having trouble reproducing this with the 2.9 branch, i.e. I'm able to deploy that charm just fine:

>>> import asyncio
>>> from juju import model
>>> m = model.Model()
>>> await m.connect()
>>> await m.deploy("./tmp/osm-packages-master/charm-packages/nopasswd_proxy_charm_vnf/charms/simple")
<Application entity_id="simple-ha-proxy">
>>> 

Note that I'm using the tip of the 2.9 branch, so this might've been already fixed (maybe we just need a new 2.9 release to get it upstream). @gcalvinos can you try this with the 2.9 branch of libjuju to confirm?

juanmanuel-tirado commented 1 year ago

A fix was already committed in #846. I will close this issue.