As a newbie to juju
framework, I'm invistigating simple machine
deployment with the aim of executing simple action
on it.
So, I've created a charm
bundle, built it and deployed it successfully using juju
. The bundle contains an action
called "touch" that takes a string (i.e.: filename) as an input and create a file with that name on the machine.
After the machine becomes "active" and when I list actions in the deployed machine using:
juju actions charmLayer
I get my action
listed alongside its description.
Now, when executing the actions "touch" using:
juju run-action charmLayer/0 touch filename="/home/ubuntu/manual.txt"
I get the following message:
Action queued with id: d6b39965-9a2c-41c6-8db7-b4060e587033
Then, when I check the action-status:
juju show-action-status d6b39965-9a2c-41c6-8db7-b4060e587033
I get the following:
actions:
action: touch
completed at: "2019-05-03 11:56:51"
id: d6b39965-9a2c-41c6-8db7-b4060e587033
status: failed
unit:
charmLayer/0
Then when I check the action-output:
juju show-action-output d6b39965-9a2c-41c6-8db7-b4060e587033
I get the following:
message: exit status 1
status: failed
timing:
completed: 2019-05-03 11:56:51 +0000 UTC
enqueued: 2019-05-03 11:56:48 +0000 UTC
started: 2019-05-03 11:56:51 +0000 UTC
when checking logs using :
juju debug-log
I see the following output:
unit-charmLayer-0: 13:23:14 DEBUG unit.charmLayer/0.touch Traceback (most recent call last):
unit-charmLayer-0: 13:23:14 DEBUG unit.charmLayer/0.touch File "/var/lib/juju/agents/unit-charmLayer-0/charm/actions/touch", line 6, in
unit-charmLayer-0: 13:23:14 DEBUG unit.charmLayer/0.touch from charms.reactive import main, set_flag
unit-charmLayer-0: 13:23:14 DEBUG unit.charmLayer/0.touch ImportError: No module named 'charms.reactive'
My question why am I getting this ImportError
for the charms.reactive
?