Zookeeper charm zkpeer-relation-changed issue.

José Pekkarinen jose.pekkarinen at canonical.com
Wed Feb 28 08:48:44 UTC 2018


 
> The missing arg that it's complaining about happens because you're running
> a relation hook without the relation context.  You might have also noticed
> that zk-peer-joined and -departed would fail in the same way.  To do what
> you want, you'll need to find the relation id for zkpeer:
> 
> $ sudo juju-run unit-zookeeper-0 'relation-ids zkpeer'
> zkpeer:0
> 
> And then add the -r <id> option to your juju-run command:
> 
> $ sudo juju-run -r 0 unit-zookeeper-0 hooks/zkpeer-relation-joined
> Running reactive_handler_main for cuda.sh (test)
> Nothing to invoke
> End reactive_handler_main (test)
> Running reactive_handler_main for cuda.sh (test)
> Will invoke: check_cuda_support
> End reactive_handler_main (test)
> Running reactive_handler_main for cuda.sh (invoke)
> Invoking bash reactive handler: check_cuda_support
> End reactive_handler_main (invoke)
> Running reactive_handler_main for cuda.sh (test)
> Nothing to invoke
> End reactive_handler_main (test)
> 
> The -r will run your hook with the context from relation 0, which will be
> the 'self' that was missing in your earlier attempt.
> 
> Hope that helps!
> -Kevin

	Hi,

	You absolutely right, I didn't know about this picky detail.

	Thanks Kevin!

	José.



More information about the Bigdata mailing list