Re: Subordinate charms

2016-06-01 Thread Samuel Cozannet
Hello,

What is then the recommendation for monitoring / logging / (...) agents
that run independently on the units and are loosely connected to the local
charms, but potentially still need to know about the apps running?

Wouldn´t colocation make them cumbersome? Still encoded as subordinate
charms they lack flexibility as they can´t change/be replaced.

For the Django example (and any framework sort of charms) I would have
thought that a layer is needed and the plugin is an option of the layer.

++
Sam





--
Samuel Cozannet
Cloud, Big Data and IoT Strategy Team
Business Development - Cloud and ISV Ecosystem
Changing the Future of Cloud
Ubuntu <http://ubuntu.com>  / Canonical UK LTD <http://canonical.com> / Juju
<https://jujucharms.com>
samuel.cozan...@canonical.com
mob: +33 616 702 389
skype: samnco
Twitter: @SaMnCo_23
[image: View Samuel Cozannet's profile on LinkedIn]
<https://es.linkedin.com/in/scozannet>

On Tue, May 31, 2016 at 2:50 PM, Rick Harding <rick.hard...@canonical.com>
wrote:

> Yes, this is the way that subordinates work. They can often do very
> intrusive things. Imagine a django subordinate that installs and sets up a
> plugin into the django application it's deployed to. We don't currently
> support the removal of them. They kind of become one with the principle
> application.
>
> On Thu, May 26, 2016 at 5:41 PM André Moreira <andre@gmail.com> wrote:
>
>> Hi Tom,
>>
>> I found this:
>>
>> The current model of subordinates doesn't include support for removing
>> subordinate units from their principal service apart from removing the
>> principal service itself. This limitation stems from the current policy
>> around service shutdown and the invocation of stop hooks.
>> https://jujucharms.com/docs/1.25/authors-subordinate-services
>>
>> Is this policy still valid?
>>
>> André
>>
>> 2016-05-26 18:38 GMT-03:00 Tom Barber <t...@analytical-labs.com>:
>>
>>> Hi Andre
>>>
>>> Can you give us a clue what you are installing/uninstalling because I
>>> believe Bilal is correct, I've not see it wipe out the parent charms either.
>>>
>>> Tom
>>>
>>> --
>>>
>>> Director Meteorite.bi - Saiku Analytics Founder
>>> Tel: +44(0)5603641316
>>>
>>> (Thanks to the Saiku community we reached our Kickstart
>>> <http://kickstarter.com/projects/2117053714/saiku-reporting-interactive-report-designer/>
>>> goal, but you can always help by sponsoring the project
>>> <http://www.meteorite.bi/products/saiku/sponsorship>)
>>>
>>> On 26 May 2016 at 22:36, André Moreira <andre@gmail.com> wrote:
>>>
>>>> Using this, it also removes the unit of the charm it is subordinated to.
>>>>
>>>> 2016-05-26 18:34 GMT-03:00 Bilal Baqar <bba...@plumgrid.com>:
>>>>
>>>>> Try the normal charm remove command:
>>>>> *juju remove-service  *
>>>>>
>>>>> Regards
>>>>>
>>>>> 2016-05-27 2:24 GMT+05:00 André Moreira <andre@gmail.com>:
>>>>>
>>>>>> How can I remove a subordinate charm without removing the principal?
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Le doux charme de maint songe
>>>>>> Par leur bel art inventé
>>>>>> Sous les habits du mensonge
>>>>>> Nous offre la vérité.
>>>>>> -La Fontaine
>>>>>>
>>>>>> --
>>>>>> Juju mailing list
>>>>>> Juju@lists.ubuntu.com
>>>>>> Modify settings or unsubscribe at:
>>>>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Bilal Baqar
>>>>> MTS - PLUMgrid Inc.
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Le doux charme de maint songe
>>>> Par leur bel art inventé
>>>> Sous les habits du mensonge
>>>> Nous offre la vérité.
>>>> -La Fontaine
>>>>
>>>> --
>>>> Juju mailing list
>>>> Juju@lists.ubuntu.com
>>>> Modify settings or unsubscribe at:
>>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>>
>>>>
>>>
>>
>>
>> --
>>
>> Le doux charme de maint songe
>> Par leur bel art inventé
>> Sous les habits du mensonge
>> Nous offre la vérité.
>> -La Fontaine
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Subordinate charms

2016-05-31 Thread Rick Harding
Yes, this is the way that subordinates work. They can often do very
intrusive things. Imagine a django subordinate that installs and sets up a
plugin into the django application it's deployed to. We don't currently
support the removal of them. They kind of become one with the principle
application.

On Thu, May 26, 2016 at 5:41 PM André Moreira  wrote:

> Hi Tom,
>
> I found this:
>
> The current model of subordinates doesn't include support for removing
> subordinate units from their principal service apart from removing the
> principal service itself. This limitation stems from the current policy
> around service shutdown and the invocation of stop hooks.
> https://jujucharms.com/docs/1.25/authors-subordinate-services
>
> Is this policy still valid?
>
> André
>
> 2016-05-26 18:38 GMT-03:00 Tom Barber :
>
>> Hi Andre
>>
>> Can you give us a clue what you are installing/uninstalling because I
>> believe Bilal is correct, I've not see it wipe out the parent charms either.
>>
>> Tom
>>
>> --
>>
>> Director Meteorite.bi - Saiku Analytics Founder
>> Tel: +44(0)5603641316
>>
>> (Thanks to the Saiku community we reached our Kickstart
>> 
>> goal, but you can always help by sponsoring the project
>> )
>>
>> On 26 May 2016 at 22:36, André Moreira  wrote:
>>
>>> Using this, it also removes the unit of the charm it is subordinated to.
>>>
>>> 2016-05-26 18:34 GMT-03:00 Bilal Baqar :
>>>
 Try the normal charm remove command:
 *juju remove-service  *

 Regards

 2016-05-27 2:24 GMT+05:00 André Moreira :

> How can I remove a subordinate charm without removing the principal?
>
> --
>
> Le doux charme de maint songe
> Par leur bel art inventé
> Sous les habits du mensonge
> Nous offre la vérité.
> -La Fontaine
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>


 --
 Bilal Baqar
 MTS - PLUMgrid Inc.



>>>
>>>
>>> --
>>>
>>> Le doux charme de maint songe
>>> Par leur bel art inventé
>>> Sous les habits du mensonge
>>> Nous offre la vérité.
>>> -La Fontaine
>>>
>>> --
>>> Juju mailing list
>>> Juju@lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>
>>>
>>
>
>
> --
>
> Le doux charme de maint songe
> Par leur bel art inventé
> Sous les habits du mensonge
> Nous offre la vérité.
> -La Fontaine
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Subordinate charms

2016-05-26 Thread André Moreira
José,

They are charms I created to deploy some services that I have.
I have a "principal" charm with something like this (I had to change the
actual names):

metadata.yaml:
name: charm-principal
summary: 
maintainer: OMMITED
description: |
  
tags:
  - misc
subordinate: false
provides:
  principal:
interface: principal


And a subordinate:
metadata.yaml:
name: charm-supordinate
summary: 
maintainer: OMMITED
description: |
  
tags:
  - misc
subordinate: true
requires:
  principal:
interface: principal
scope: container

When I deploy both charms, as expected, only the "charm-principal" get a
unit. I cannot destroy the relation between them and, if I remove
"charm-subordinate", the unit of the principal charm is destroyed.

André



2016-05-26 18:45 GMT-03:00 José Antonio Rey :

> André,
>
> What are you installing and trying to remove? I will do some quick testing
> around, and would like to reproduce the same scenario that you have.
>
> On 05/26/2016 04:43 PM, André Moreira wrote:
>
>> Hi Bilal,
>>
>> I think that is not possible. When I try, I receive this: "You may not
>> remove a subordinate relation."
>>
>> André
>>
>> 2016-05-26 18:41 GMT-03:00 Bilal Baqar > >:
>>
>> Try removing the relation between the two. The unit of the
>> subordinate charm will be removed from that node.
>>
>> Regards
>>
>> On Fri, May 27, 2016 at 2:38 AM, Tom Barber > > wrote:
>>
>> Hi Andre
>>
>> Can you give us a clue what you are installing/uninstalling
>> because I believe Bilal is correct, I've not see it wipe out the
>> parent charms either.
>>
>> Tom
>>
>> --
>>
>> Director Meteorite.bi - Saiku Analytics Founder
>> Tel: +44(0)5603641316 
>>
>> (Thanks to the Saiku community we reached our Kickstart
>> <
>> http://kickstarter.com/projects/2117053714/saiku-reporting-interactive-report-designer/
>> >
>> goal, but you can always help by sponsoring the project
>> )
>>
>> On 26 May 2016 at 22:36, André Moreira > > wrote:
>>
>> Using this, it also removes the unit of the charm it is
>> subordinated to.
>>
>> 2016-05-26 18:34 GMT-03:00 Bilal Baqar > >:
>>
>> Try the normal charm remove command:
>> *juju remove-service  *
>> *
>> *
>> Regards
>>
>> 2016-05-27 2:24 GMT+05:00 André Moreira
>> >:
>>
>> How can I remove a subordinate charm without
>> removing the principal?
>>
>> --
>>
>> Le doux charme de maint songe
>> Par leur bel art inventé
>> Sous les habits du mensonge
>> Nous offre la vérité.
>>  -La Fontaine
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com 
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>>
>>
>>
>> --
>> Bilal Baqar
>> MTS - PLUMgrid Inc.
>>
>>
>>
>>
>>
>> --
>>
>> Le doux charme de maint songe
>> Par leur bel art inventé
>> Sous les habits du mensonge
>> Nous offre la vérité.
>>  -La Fontaine
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com 
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>>
>>
>>
>>
>> --
>> Bilal Baqar
>> MTS - PLUMgrid Inc.
>>
>>
>>
>>
>>
>> --
>>
>> Le doux charme de maint songe
>> Par leur bel art inventé
>> Sous les habits du mensonge
>> Nous offre la vérité.
>>  -La Fontaine
>>
>>
>>
>
> --
> José Antonio Rey
>



-- 

Le doux charme de maint songe
Par leur bel art inventé
Sous les habits du mensonge
Nous offre la vérité.
-La Fontaine
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Subordinate charms

2016-05-26 Thread José Antonio Rey

André,

What are you installing and trying to remove? I will do some quick 
testing around, and would like to reproduce the same scenario that you have.


On 05/26/2016 04:43 PM, André Moreira wrote:

Hi Bilal,

I think that is not possible. When I try, I receive this: "You may not
remove a subordinate relation."

André

2016-05-26 18:41 GMT-03:00 Bilal Baqar >:

Try removing the relation between the two. The unit of the
subordinate charm will be removed from that node.

Regards

On Fri, May 27, 2016 at 2:38 AM, Tom Barber > wrote:

Hi Andre

Can you give us a clue what you are installing/uninstalling
because I believe Bilal is correct, I've not see it wipe out the
parent charms either.

Tom

--

Director Meteorite.bi - Saiku Analytics Founder
Tel: +44(0)5603641316 

(Thanks to the Saiku community we reached our Kickstart


goal, but you can always help by sponsoring the project
)

On 26 May 2016 at 22:36, André Moreira > wrote:

Using this, it also removes the unit of the charm it is
subordinated to.

2016-05-26 18:34 GMT-03:00 Bilal Baqar >:

Try the normal charm remove command:
*juju remove-service  *
*
*
Regards

2016-05-27 2:24 GMT+05:00 André Moreira
>:

How can I remove a subordinate charm without
removing the principal?

--

Le doux charme de maint songe
Par leur bel art inventé
Sous les habits du mensonge
Nous offre la vérité.
 -La Fontaine

--
Juju mailing list
Juju@lists.ubuntu.com 
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/juju




--
Bilal Baqar
MTS - PLUMgrid Inc.





--

Le doux charme de maint songe
Par leur bel art inventé
Sous les habits du mensonge
Nous offre la vérité.
 -La Fontaine

--
Juju mailing list
Juju@lists.ubuntu.com 
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/juju





--
Bilal Baqar
MTS - PLUMgrid Inc.





--

Le doux charme de maint songe
Par leur bel art inventé
Sous les habits du mensonge
Nous offre la vérité.
 -La Fontaine





--
José Antonio Rey

--
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Subordinate charms

2016-05-26 Thread André Moreira
Hi Bilal,

I think that is not possible. When I try, I receive this: "You may not
remove a subordinate relation."

André

2016-05-26 18:41 GMT-03:00 Bilal Baqar :

> Try removing the relation between the two. The unit of the subordinate
> charm will be removed from that node.
>
> Regards
>
> On Fri, May 27, 2016 at 2:38 AM, Tom Barber 
> wrote:
>
>> Hi Andre
>>
>> Can you give us a clue what you are installing/uninstalling because I
>> believe Bilal is correct, I've not see it wipe out the parent charms either.
>>
>> Tom
>>
>> --
>>
>> Director Meteorite.bi - Saiku Analytics Founder
>> Tel: +44(0)5603641316
>>
>> (Thanks to the Saiku community we reached our Kickstart
>> 
>> goal, but you can always help by sponsoring the project
>> )
>>
>> On 26 May 2016 at 22:36, André Moreira  wrote:
>>
>>> Using this, it also removes the unit of the charm it is subordinated to.
>>>
>>> 2016-05-26 18:34 GMT-03:00 Bilal Baqar :
>>>
 Try the normal charm remove command:
 *juju remove-service  *

 Regards

 2016-05-27 2:24 GMT+05:00 André Moreira :

> How can I remove a subordinate charm without removing the principal?
>
> --
>
> Le doux charme de maint songe
> Par leur bel art inventé
> Sous les habits du mensonge
> Nous offre la vérité.
> -La Fontaine
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>


 --
 Bilal Baqar
 MTS - PLUMgrid Inc.



>>>
>>>
>>> --
>>>
>>> Le doux charme de maint songe
>>> Par leur bel art inventé
>>> Sous les habits du mensonge
>>> Nous offre la vérité.
>>> -La Fontaine
>>>
>>> --
>>> Juju mailing list
>>> Juju@lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>
>>>
>>
>
>
> --
> Bilal Baqar
> MTS - PLUMgrid Inc.
>
>
>


-- 

Le doux charme de maint songe
Par leur bel art inventé
Sous les habits du mensonge
Nous offre la vérité.
-La Fontaine
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Subordinate charms

2016-05-26 Thread Bilal Baqar
Try removing the relation between the two. The unit of the subordinate
charm will be removed from that node.

Regards

On Fri, May 27, 2016 at 2:38 AM, Tom Barber  wrote:

> Hi Andre
>
> Can you give us a clue what you are installing/uninstalling because I
> believe Bilal is correct, I've not see it wipe out the parent charms either.
>
> Tom
>
> --
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart
> 
> goal, but you can always help by sponsoring the project
> )
>
> On 26 May 2016 at 22:36, André Moreira  wrote:
>
>> Using this, it also removes the unit of the charm it is subordinated to.
>>
>> 2016-05-26 18:34 GMT-03:00 Bilal Baqar :
>>
>>> Try the normal charm remove command:
>>> *juju remove-service  *
>>>
>>> Regards
>>>
>>> 2016-05-27 2:24 GMT+05:00 André Moreira :
>>>
 How can I remove a subordinate charm without removing the principal?

 --

 Le doux charme de maint songe
 Par leur bel art inventé
 Sous les habits du mensonge
 Nous offre la vérité.
 -La Fontaine

 --
 Juju mailing list
 Juju@lists.ubuntu.com
 Modify settings or unsubscribe at:
 https://lists.ubuntu.com/mailman/listinfo/juju


>>>
>>>
>>> --
>>> Bilal Baqar
>>> MTS - PLUMgrid Inc.
>>>
>>>
>>>
>>
>>
>> --
>>
>> Le doux charme de maint songe
>> Par leur bel art inventé
>> Sous les habits du mensonge
>> Nous offre la vérité.
>> -La Fontaine
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>>
>


-- 
Bilal Baqar
MTS - PLUMgrid Inc.
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Subordinate charms

2016-05-26 Thread Tom Barber
Hi Andre

Can you give us a clue what you are installing/uninstalling because I
believe Bilal is correct, I've not see it wipe out the parent charms either.

Tom

--

Director Meteorite.bi - Saiku Analytics Founder
Tel: +44(0)5603641316

(Thanks to the Saiku community we reached our Kickstart

goal, but you can always help by sponsoring the project
)

On 26 May 2016 at 22:36, André Moreira  wrote:

> Using this, it also removes the unit of the charm it is subordinated to.
>
> 2016-05-26 18:34 GMT-03:00 Bilal Baqar :
>
>> Try the normal charm remove command:
>> *juju remove-service  *
>>
>> Regards
>>
>> 2016-05-27 2:24 GMT+05:00 André Moreira :
>>
>>> How can I remove a subordinate charm without removing the principal?
>>>
>>> --
>>>
>>> Le doux charme de maint songe
>>> Par leur bel art inventé
>>> Sous les habits du mensonge
>>> Nous offre la vérité.
>>> -La Fontaine
>>>
>>> --
>>> Juju mailing list
>>> Juju@lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>
>>>
>>
>>
>> --
>> Bilal Baqar
>> MTS - PLUMgrid Inc.
>>
>>
>>
>
>
> --
>
> Le doux charme de maint songe
> Par leur bel art inventé
> Sous les habits du mensonge
> Nous offre la vérité.
> -La Fontaine
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Subordinate charms

2016-05-26 Thread André Moreira
Using this, it also removes the unit of the charm it is subordinated to.

2016-05-26 18:34 GMT-03:00 Bilal Baqar :

> Try the normal charm remove command:
> *juju remove-service  *
>
> Regards
>
> 2016-05-27 2:24 GMT+05:00 André Moreira :
>
>> How can I remove a subordinate charm without removing the principal?
>>
>> --
>>
>> Le doux charme de maint songe
>> Par leur bel art inventé
>> Sous les habits du mensonge
>> Nous offre la vérité.
>> -La Fontaine
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>>
>
>
> --
> Bilal Baqar
> MTS - PLUMgrid Inc.
>
>
>


-- 

Le doux charme de maint songe
Par leur bel art inventé
Sous les habits du mensonge
Nous offre la vérité.
-La Fontaine
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Subordinate charms

2016-05-26 Thread Bilal Baqar
Try the normal charm remove command:
*juju remove-service  *

Regards

2016-05-27 2:24 GMT+05:00 André Moreira :

> How can I remove a subordinate charm without removing the principal?
>
> --
>
> Le doux charme de maint songe
> Par leur bel art inventé
> Sous les habits du mensonge
> Nous offre la vérité.
> -La Fontaine
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>


-- 
Bilal Baqar
MTS - PLUMgrid Inc.
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Subordinate charms

2016-05-26 Thread André Moreira
How can I remove a subordinate charm without removing the principal?

-- 

Le doux charme de maint songe
Par leur bel art inventé
Sous les habits du mensonge
Nous offre la vérité.
-La Fontaine
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: relation-* events for subordinate charms

2016-02-05 Thread Marco Ceppi
Hi Iain,

upgrade-charm is the /right/ step for this, however the problem is that
upgrade charm does not explicitly run all the previous hooks (events) that
fired. The files and updated hooks will only be run on future hook
invocations. What I'd recommend is to abstract the bits that do this
updating in the hook to a file that can be included/executed from other
hooks (like the upgrade-charm hook) so that you can refresh them as the
charms are upgraded.

Marco

On Fri, Feb 5, 2016 at 6:50 AM Iain Lane  wrote:

> [ please keep me in CC as I'm not subscribed ]
>
> Hey,
>
> Just got redirected here from #juju.
>
> I have a charm appstream-dep11 that has a subordinate relationship to
> nrpe-external-master so that it can provide some nagios checks. I just
> wrote a hook nrpe-external-master-relation-changed that puts some files
> in the right directories for nagios/nrpe to pick them up. The problem is
> that when I ran "juju upgrade-charm --repository=charms/
> appstream-dep11", the hook wasn't called and so the checks aren't
> installed.
>
> Can anyone let me know what I'm doing wrong here? I ideally want to just
> be able to run upgrade-charm (or some other command) after dropping new
> checks in so that they are easily picked up and exported.
>
> Cheers,
>
> --
> Iain Lane  [ i...@orangesquash.org.uk ]
> Debian Developer   [ la...@debian.org ]
> Ubuntu Developer   [ la...@ubuntu.com ]
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


relation-* events for subordinate charms

2016-02-05 Thread Iain Lane
[ please keep me in CC as I'm not subscribed ]

Hey,

Just got redirected here from #juju.

I have a charm appstream-dep11 that has a subordinate relationship to
nrpe-external-master so that it can provide some nagios checks. I just
wrote a hook nrpe-external-master-relation-changed that puts some files
in the right directories for nagios/nrpe to pick them up. The problem is
that when I ran "juju upgrade-charm --repository=charms/
appstream-dep11", the hook wasn't called and so the checks aren't
installed.

Can anyone let me know what I'm doing wrong here? I ideally want to just
be able to run upgrade-charm (or some other command) after dropping new
checks in so that they are easily picked up and exported.

Cheers,

-- 
Iain Lane  [ i...@orangesquash.org.uk ]
Debian Developer   [ la...@debian.org ]
Ubuntu Developer   [ la...@ubuntu.com ]


signature.asc
Description: Digital signature
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Swift middleware subordinate charms?

2014-09-25 Thread James Page
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 24/09/14 12:09, Andrew Wilkins wrote:
 
 Anyway, normally I think you'd want the primary charm's 
 (swift-proxy's) relevant relation-changed hook to do the restart 
 itself when the middleware changes (ie. when middleware-changed is 
 triggered). This just makes sure that the responsibility and
 knowledge of restarts stays within the charm responsible for the
 service.
 
 
 That makes sense. I was coming from the angle of how to do this
 without touching any existing charms, which is wrong.
 
 I think to do this right I'd need to modify the swift-proxy and 
 swift-storage charms, and have them modify their configuration
 files rather than having the subordinate do it. The subordinate
 would effectively just provide configuration parameters and install
 the middleware dependencies. I'll hack around for now, and maybe
 I'll propose something later if anything becomes of my charm.

That sounds like the best approach - we did something similar for
cinder backends - see the cinder and cinder-ceph or cinder-vmware charms.


- -- 
James Page
Ubuntu and Debian Developer
james.p...@ubuntu.com
jamesp...@debian.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBCAAGBQJUJEjVAAoJEL/srsug59jDJjsQAJt5XXwvMeCUAl0N5lBHYKQs
d/SAz0Wxsi5EoLZkIYl2woJlvwO8/vfeIcBJ3+f6OOG1Xa52An+OHgxi3tSqJfNT
dhxOU5aFkiawNrakDofnxxmTxDIZln3IcdCrh3SypB4s6t4yGkeRSzcnXo2AnINH
Xt/sTsYtCtZG6aeKjtUp331ITtjtbyz0+WMlSnGRaXUbpmrr5kVcf4R4PMvqAk+Q
OjqMle5dSHStT7EkdWSepOXsfxIu7Hb6F9gEuzzNUKi8IhGiuuiprB5uoZ/we31c
FXFy8ArL+Q3MG+kuV8SJqD79cxWjPaL0hLKelLo3GWUJN1E+VvaKnREzSqCIgRvW
aenbp/cj7Q3WwnS0Cvm2quWSknFc9BvTORk9ITtHWHrcyJ8/snDFlgDZ1whqDS+V
ZMkefHMerxpl9tcWayyyq+rHfkiDj9RTzAnmumOp1uM8e8epN4PRm6scQfT8Q7t+
Ywl1MojloYDTaWQFCiNeEIjHY6WEFI5E7Agym/iKwCtnGqFJaWV3LaxSJIHnrBCQ
eRDNezVG/gz6wNl/Mv4W1hXRrFHh1Vb1FnkA7lQDBodzeWZdc1otz+vLelsSg8p6
uguxu6193khXYoJQgp33KMK+QvU5tAZq1MWoWVWzzuzPd9aYgdNv1YCS8Lq3+BDb
plWkSAOmnCWs/fUTJG/x
=gLEx
-END PGP SIGNATURE-

-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Swift middleware subordinate charms?

2014-09-25 Thread Andrew Wilkins
On Fri, Sep 26, 2014 at 12:54 AM, James Page james.p...@ubuntu.com wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 On 24/09/14 12:09, Andrew Wilkins wrote:
 
  Anyway, normally I think you'd want the primary charm's
  (swift-proxy's) relevant relation-changed hook to do the restart
  itself when the middleware changes (ie. when middleware-changed is
  triggered). This just makes sure that the responsibility and
  knowledge of restarts stays within the charm responsible for the
  service.
 
 
  That makes sense. I was coming from the angle of how to do this
  without touching any existing charms, which is wrong.
 
  I think to do this right I'd need to modify the swift-proxy and
  swift-storage charms, and have them modify their configuration
  files rather than having the subordinate do it. The subordinate
  would effectively just provide configuration parameters and install
  the middleware dependencies. I'll hack around for now, and maybe
  I'll propose something later if anything becomes of my charm.

 That sounds like the best approach - we did something similar for
 cinder backends - see the cinder and cinder-ceph or cinder-vmware charms.


Perfect, just what I was after. Thanks James.
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Swift middleware subordinate charms?

2014-09-24 Thread Andrew Wilkins
Hi folks,

I've just started looking into writing a charm (possibly two charms?) to
deploy some middleware to Swift; both the proxy and storage will have
middleware added. Today was the first time I've deployed any OpenStack
component, so my terminology could be off.

I imagine a middleware charm would make most sense as a subordinate to
swift-{proxy,storage}. Are there any existing examples of such a thing? Is
there a friendly way for the subordinate to tell the swift services to
restart, or is it just a matter of sudo restart swift-object-server or
whatever?

Cheers,
Andrew
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Swift middleware subordinate charms?

2014-09-24 Thread Michael Nelson
On Wed, Sep 24, 2014 at 7:52 PM, Andrew Wilkins
andrew.wilk...@canonical.com wrote:
 Hi folks,

 I've just started looking into writing a charm (possibly two charms?) to
 deploy some middleware to Swift; both the proxy and storage will have
 middleware added. Today was the first time I've deployed any OpenStack
 component, so my terminology could be off.

 I imagine a middleware charm would make most sense as a subordinate to
 swift-{proxy,storage}. Are there any existing examples of such a thing? Is
 there a friendly way for the subordinate to tell the swift services to
 restart, or is it just a matter of sudo restart swift-object-server or
 whatever?

Hi Andrew. If you're writing a subordinate charm, it'll be relating to
the primary charm via some relation (say middleware-changed) right?
Which I assume you'll need to add to the swift-proxy charm (ie. to
support middleware subordinates generally? Not sure.)

Anyway, normally I think you'd want the primary charm's
(swift-proxy's) relevant relation-changed hook to do the restart
itself when the middleware changes (ie. when middleware-changed is
triggered). This just makes sure that the responsibility and knowledge
of restarts stays within the charm responsible for the service.

Sometimes your subordinate might need to cause a restart even though
nothing else about the relation has changed, which you can do with a
relation-set with an additional timestamp to ensure that the
relation-changed will still be triggered in the related charm which in
turn ensures the restart.

You could of course just have your subordinate restarting the service
itself, but it may bite later on (I think this issue in reverse hit
the gunicorn subordinate charm, which changed the service name and
hence the way restarts happen, but some charms using the gunicorn
charm had done the restarts themselves rather than via the
relationship, causing compatibility issues).

-Michael


 Cheers,
 Andrew

 --
 Juju mailing list
 Juju@lists.ubuntu.com
 Modify settings or unsubscribe at:
 https://lists.ubuntu.com/mailman/listinfo/juju


-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Swift middleware subordinate charms?

2014-09-24 Thread Andrew Wilkins
On Wed, Sep 24, 2014 at 6:59 PM, Michael Nelson 
michael.nel...@canonical.com wrote:

 On Wed, Sep 24, 2014 at 7:52 PM, Andrew Wilkins
 andrew.wilk...@canonical.com wrote:
  Hi folks,
 
  I've just started looking into writing a charm (possibly two charms?) to
  deploy some middleware to Swift; both the proxy and storage will have
  middleware added. Today was the first time I've deployed any OpenStack
  component, so my terminology could be off.
 
  I imagine a middleware charm would make most sense as a subordinate to
  swift-{proxy,storage}. Are there any existing examples of such a thing?
 Is
  there a friendly way for the subordinate to tell the swift services to
  restart, or is it just a matter of sudo restart swift-object-server or
  whatever?

 Hi Andrew. If you're writing a subordinate charm, it'll be relating to
 the primary charm via some relation (say middleware-changed) right?
 Which I assume you'll need to add to the swift-proxy charm (ie. to
 support middleware subordinates generally? Not sure.)

 Anyway, normally I think you'd want the primary charm's
 (swift-proxy's) relevant relation-changed hook to do the restart
 itself when the middleware changes (ie. when middleware-changed is
 triggered). This just makes sure that the responsibility and knowledge
 of restarts stays within the charm responsible for the service.


That makes sense. I was coming from the angle of how to do this without
touching any existing charms, which is wrong.

I think to do this right I'd need to modify the swift-proxy and
swift-storage charms, and have them modify their configuration files rather
than having the subordinate do it. The subordinate would effectively just
provide configuration parameters and install the middleware dependencies.
I'll hack around for now, and maybe I'll propose something later if
anything becomes of my charm.

Thanks for the advice!

Sometimes your subordinate might need to cause a restart even though
 nothing else about the relation has changed, which you can do with a
 relation-set with an additional timestamp to ensure that the
 relation-changed will still be triggered in the related charm which in
 turn ensures the restart.

 You could of course just have your subordinate restarting the service
 itself, but it may bite later on (I think this issue in reverse hit
 the gunicorn subordinate charm, which changed the service name and
 hence the way restarts happen, but some charms using the gunicorn
 charm had done the restarts themselves rather than via the
 relationship, causing compatibility issues).

 -Michael

 
  Cheers,
  Andrew
 
  --
  Juju mailing list
  Juju@lists.ubuntu.com
  Modify settings or unsubscribe at:
  https://lists.ubuntu.com/mailman/listinfo/juju
 

-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju