Skip to content

[Bug]: charm upgrade does not work #883

@esunar

Description

@esunar

Description

when I try to run the below code I got the following error.

await model.connect()
app = model.applications["keystone"]
await app.upgrade_charm(channel="victoria/stable")

juju.errors.JujuError: while adding pending resource info for "policyd-override": bad resource metadata: bad info: bad metadata: resource missing filename

Hower below code runs succesfully. What could be the problem?

juju refresh --channel victoria/stable  keystone

log , code, bundle, thread

juju client: 2.9.43-ubuntu-amd64
controller: 2.9.42, python juju==2.9.42.4

@cderici

Urgency

Blocker for our release

Python-libjuju version

2.9.42.4

Juju version

2.9.43-ubuntu-amd64

Reproduce / Test

import asyncio
import logging

from juju.model import Model

JUJU_MAX_FRAME_SIZE = 2**30


def setup_logging(log_level: str = "DEBUG") -> None:
    log_formatter = logging.Formatter(
        fmt="%(asctime)s [%(levelname)s] %(message)s", datefmt="%Y-%m-%d %H:%M:%S"
    )
    root_logger = logging.getLogger()
    root_logger.setLevel(log_level)
    if not root_logger.hasHandlers():
        console_handler = logging.StreamHandler()
        console_handler.setFormatter(log_formatter)
        root_logger.addHandler(console_handler)


async def update():
    model = Model(max_frame_size=JUJU_MAX_FRAME_SIZE)
    await model.connect()
    app = model.applications["keystone"]
    await app.upgrade_charm(channel="victoria/stable")


setup_logging()
loop = asyncio.new_event_loop()
loop.run_until_complete(update())

Metadata

Metadata

Assignees

Labels

hint/2.9going on 2.9 branchkind/bugindicates a bug in the project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions