Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The behavior of model.run_on_unit has been changed to run only actions #649

Closed
rgildein opened this issue Feb 22, 2024 · 4 comments · Fixed by #650 or #655
Closed

The behavior of model.run_on_unit has been changed to run only actions #649

rgildein opened this issue Feb 22, 2024 · 4 comments · Fixed by #650 or #655

Comments

@rgildein
Copy link
Contributor

The async_run_on_unit function was changed (by commit) to wait for actions and like this is no longer possible to run command with it.
I'm not sure if there's any way to fix this, but I'd at least suggest renaming the command parameter to action.

@agileshaw
Copy link

It seems that this is the line where running command instead of action hangs.

@ajkavanagh
Copy link
Collaborator

@rgildein it's probably that actions on Juju 3.x wait by default, whereas on Juju 2.x they didn't. Maybe this has been propagated to libjuju aswell? (i.e. Juju 3.x run needs the --background flag to have the same behaviour as Juju 2.x. run-action).

@wolsen wolsen linked a pull request Mar 4, 2024 that will close this issue
@wolsen
Copy link
Contributor

wolsen commented Mar 4, 2024

This should be fixed with the above PR being merged. Please re-open if not.

@rgildein
Copy link
Contributor Author

rgildein commented Mar 6, 2024

I can confirm that it's working now.

@ajkavanagh the libjuju 2.9 is by default waiting if you are using run, but in libjuju 3.1 you need to provide block=True or wait yourself.

rgildein added a commit to canonical/charmed-openstack-upgrader that referenced this issue Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants