'juju deploy' takes 5min without giving any information

Hi,

I am currently developing a machine charm and testing it locally with LXD.

When I run ‘juju deploy --debug’ the command gets stuck for nearly 5min without printing anything.

$ juju deploy ./avalanche-node_ubuntu-22.04-amd64.charm --config --debug
18:57:34 INFO  cmd charm.go:317 Preparing to deploy local charm: "avalanche-node_ubuntu-22.04-amd64.charm" 
19:02:24 INFO  cmd charm.go:341 Located local charm "avalanche-node", revision 2
19:02:24 DEBUG juju.api monitor.go:35 RPC connection died
19:02:24 DEBUG juju.api monitor.go:35 RPC connection died
19:02:24 INFO  cmd supercommand.go:555 command finished

I also have a ‘juju debug-log --debug’ shell open on the side and nothing is logged there before the end of the deploy command.

Do you know what could be the reason for such a long time before issuing the command? What is happening under the hood there?

1 Like

Which version of juju are you working with?

Do you have your repo available so I could see what goes on it would be easier to help out.

Sorry for the late response.

Juju version: 3.2.0-genericlinux-amd64

After playing around with the charm dependencies, I noticed that removing Ansible from the dependencies solved the issue.

Whenever I had Ansible as a charm dependency, whether in requirements.txt or in charmcraft.yml#/parts/charm/build-packages, the charm took a very long time to be deployed. I wonder if this has to do with the size of the charm which is then significantly bigger.

Anyway I ended up removing Ansible from the charm dependencies and I am now installing it as part of the on_install event.