You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Fernando Ribeiro <fe...@upic.com.br> on 2013/12/12 20:58:24 UTC

Default Cluster Group

Hello,

Is there any particular reason why the default cluster group can't be
deleted and/or renamed?

Regards,

-- 
Fernando

Re: Default Cluster Group

Posted by Fernando Ribeiro <fe...@upic.com.br>.
Hi Jean-Baptiste,

I have confirmed the issue with 2.3.3-SNAPSHOT and 3.0.0-SNAPSHOT, and
reported it in KARAF-2625.

Regards,


On Fri, Dec 13, 2013 at 3:08 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> Hi Fernando,
>
> Thanks for that. If you can test with the latest Cellar snapshot too.
> AFAIR I already fixed something about that.
>
> Regards
> JB
>
>
> On 12/13/2013 05:46 AM, Fernando Ribeiro wrote:
>
>> Hi Jean-Baptiste,
>>
>> That's right, sorry for the mistake.
>>
>> I will make a new setup from scratch, verify the issue and open a ticket
>> if
>> it is still there.
>>
>> Regards,
>>
>>
>> On Fri, Dec 13, 2013 at 2:39 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>> >wrote:
>>
>>  Hi Fernando,
>>>
>>> KARAF-1319 was about the fact that you don't have any message explaining
>>> why a group can't be deleted.
>>>
>>> As I said, if default doesn't contain any node, you should be able to
>>> delete it.
>>> However, if you have at least one node in the default cluster group, you
>>> can execute cluster:group-delete but it has no effect (and you don't have
>>> error message).
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 12/12/2013 10:32 PM, Fernando Ribeiro wrote:
>>>
>>>  Hi Jean-Baptiste,
>>>>
>>>> Just realized this issue has already been reported in KARAF-1319, which
>>>> is
>>>> currently marked as resolved.
>>>>
>>>> Regards,
>>>>
>>>>
>>>> On Thu, Dec 12, 2013 at 7:09 PM, Fernando Ribeiro <
>>>> fernando.ribeiro@upic.com.br> wrote:
>>>>
>>>>   Hi Jean-Baptiste,
>>>>
>>>>>
>>>>> Even though that change has fixed the configuration saving, which was
>>>>> also
>>>>> an issue, I still can't delete the default cluster group, and found the
>>>>> reason in the HazelcastGroupManager class:
>>>>>
>>>>> public void deleteGroup(String groupName) {
>>>>>     ClassLoader originalClassLoader =
>>>>> Thread.currentThread().getContextClassLoader();
>>>>>
>>>>>     try {
>>>>>       Thread.currentThread().setContextClassLoader(
>>>>> combinedClassLoader);
>>>>>       if (!groupName.equals(Configurations.DEFAULT_GROUP_NAME)) {
>>>>>         listGroups().remove(groupName);
>>>>>         try {
>>>>>           // store the group list to configuration admin
>>>>>           persist(listGroups());
>>>>>         } catch (Exception e) {
>>>>>           LOGGER.warn("CELLAR HAZELCAST: can't store group list", e);
>>>>>         }
>>>>>       }
>>>>>     } finally {
>>>>>       Thread.currentThread().setContextClassLoader(
>>>>> originalClassLoader);
>>>>>     }
>>>>> }
>>>>>
>>>>> I can take care of the PR if you can confirm that it is really not the
>>>>> expected behavior.
>>>>>
>>>>> Regards,
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Dec 12, 2013 at 6:16 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>>>
>>>>>> wrote:
>>>>>>
>>>>>
>>>>>   On Karaf 2.3.3, in the etc/config.properties, do you have:
>>>>>
>>>>>>
>>>>>> felix.fileinstall.enableConfigSave = true
>>>>>>
>>>>>> and NOT
>>>>>>
>>>>>> felix.fileinstall.enableConfigSave = false
>>>>>>
>>>>>> It's bug that we introduced (and it will be fixed in 2.3.4 and next
>>>>>> releases). We should never have changed this to false, this property
>>>>>> should
>>>>>> be set to true.
>>>>>>
>>>>>> This property sets to false block the cfg update, that's why Cellar
>>>>>> can't
>>>>>> update the groups set.
>>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>>
>>>>>> On 12/12/2013 09:13 PM, Fernando Ribeiro wrote:
>>>>>>
>>>>>>   Hi Jean-Baptiste,
>>>>>>
>>>>>>>
>>>>>>> Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even
>>>>>>> though
>>>>>>> the command doesn't fail and nothing is written to the log, can you
>>>>>>> please
>>>>>>> verify?
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <
>>>>>>> jb@nanthrax.net
>>>>>>>
>>>>>>>  wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>    Hi Fernando,
>>>>>>>
>>>>>>>
>>>>>>>> Cellar needs at least one cluster group. If you have only default,
>>>>>>>> it
>>>>>>>> can't be removed.
>>>>>>>>
>>>>>>>> If you create another cluster group and move all nodes in this
>>>>>>>> group,
>>>>>>>> in
>>>>>>>> that case, you will be able to delete default cluster group.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> JB
>>>>>>>>
>>>>>>>>
>>>>>>>> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>>>>>>>>
>>>>>>>>    Hello,
>>>>>>>>
>>>>>>>>
>>>>>>>>> Is there any particular reason why the default cluster group can't
>>>>>>>>> be
>>>>>>>>> deleted and/or renamed?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>    --
>>>>>>>>>
>>>>>>>>>  Jean-Baptiste Onofré
>>>>>>>> jbonofre@apache.org
>>>>>>>> http://blog.nanthrax.net
>>>>>>>> Talend - http://www.talend.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>   --
>>>>>>>
>>>>>> Jean-Baptiste Onofré
>>>>>> jbonofre@apache.org
>>>>>> http://blog.nanthrax.net
>>>>>> Talend - http://www.talend.com
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Fernando Ribeiro
>>>>> Upic
>>>>> +55 11 9 8111 4078
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>  --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>>
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
Fernando Ribeiro
Upic
+55 11 9 8111 4078

Re: Default Cluster Group

Posted by Fernando Ribeiro <fe...@upic.com.br>.
No problems, thanks! Regards.
On Dec 14, 2013 12:32 PM, "Jean-Baptiste Onofré" <jb...@nanthrax.net> wrote:

> Hi Fernando,
>
> It sounds good to me, but not sure for new Cellar 2.3.x release. That's
> why the name is "default" group: it provides the default configuration.
>
> The current approach is to populate a ready to use
> etc/org.apache.karaf.cellar.groups.cfg file. It's what some custom
> distributions do (like Talend ESB for instance).
>
> I'm still on Karaf 3.0.0 right now, I will take a look on all Cellar Jira
> next week.
>
> I keep you posted.
>
> Regards
> JB
>
> On 12/14/2013 02:10 PM, Fernando Ribeiro wrote:
>
>> Hi Jean-Baptiste,
>>
>> I have worked a little bit on the current patch and need to share some
>> thoughts with you.
>>
>> When a new group is created, we currently copy the configuration from the
>> default group, which is required to be there.
>>
>> I'd think that we may need to change for the configured group manager to
>> create even the default cluster group at installation time, specially to
>> avoid having the default configuration also in a template configuration
>> file.
>>
>> A second reason to do it would be that the default configuration currently
>> blacklists the "hazelcast" feature, for example, which wouldn't be present
>> if a different group manager implementation (e.g. Infinispan) was used
>> instead.
>>
>> Regards,
>>
>>
>> On Fri, Dec 13, 2013 at 3:08 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>> >wrote:
>>
>>  Hi Fernando,
>>>
>>> Thanks for that. If you can test with the latest Cellar snapshot too.
>>> AFAIR I already fixed something about that.
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 12/13/2013 05:46 AM, Fernando Ribeiro wrote:
>>>
>>>  Hi Jean-Baptiste,
>>>>
>>>> That's right, sorry for the mistake.
>>>>
>>>> I will make a new setup from scratch, verify the issue and open a ticket
>>>> if
>>>> it is still there.
>>>>
>>>> Regards,
>>>>
>>>>
>>>> On Fri, Dec 13, 2013 at 2:39 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>>
>>>>> wrote:
>>>>>
>>>>
>>>>   Hi Fernando,
>>>>
>>>>>
>>>>> KARAF-1319 was about the fact that you don't have any message
>>>>> explaining
>>>>> why a group can't be deleted.
>>>>>
>>>>> As I said, if default doesn't contain any node, you should be able to
>>>>> delete it.
>>>>> However, if you have at least one node in the default cluster group,
>>>>> you
>>>>> can execute cluster:group-delete but it has no effect (and you don't
>>>>> have
>>>>> error message).
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>>
>>>>> On 12/12/2013 10:32 PM, Fernando Ribeiro wrote:
>>>>>
>>>>>   Hi Jean-Baptiste,
>>>>>
>>>>>>
>>>>>> Just realized this issue has already been reported in KARAF-1319,
>>>>>> which
>>>>>> is
>>>>>> currently marked as resolved.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>>
>>>>>> On Thu, Dec 12, 2013 at 7:09 PM, Fernando Ribeiro <
>>>>>> fernando.ribeiro@upic.com.br> wrote:
>>>>>>
>>>>>>    Hi Jean-Baptiste,
>>>>>>
>>>>>>
>>>>>>> Even though that change has fixed the configuration saving, which was
>>>>>>> also
>>>>>>> an issue, I still can't delete the default cluster group, and found
>>>>>>> the
>>>>>>> reason in the HazelcastGroupManager class:
>>>>>>>
>>>>>>> public void deleteGroup(String groupName) {
>>>>>>>      ClassLoader originalClassLoader =
>>>>>>> Thread.currentThread().getContextClassLoader();
>>>>>>>
>>>>>>>      try {
>>>>>>>        Thread.currentThread().setContextClassLoader(
>>>>>>> combinedClassLoader);
>>>>>>>        if (!groupName.equals(Configurations.DEFAULT_GROUP_NAME)) {
>>>>>>>          listGroups().remove(groupName);
>>>>>>>          try {
>>>>>>>            // store the group list to configuration admin
>>>>>>>            persist(listGroups());
>>>>>>>          } catch (Exception e) {
>>>>>>>            LOGGER.warn("CELLAR HAZELCAST: can't store group list",
>>>>>>> e);
>>>>>>>          }
>>>>>>>        }
>>>>>>>      } finally {
>>>>>>>        Thread.currentThread().setContextClassLoader(
>>>>>>> originalClassLoader);
>>>>>>>      }
>>>>>>> }
>>>>>>>
>>>>>>> I can take care of the PR if you can confirm that it is really not
>>>>>>> the
>>>>>>> expected behavior.
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Dec 12, 2013 at 6:16 PM, Jean-Baptiste Onofré <
>>>>>>> jb@nanthrax.net
>>>>>>>
>>>>>>>  wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>    On Karaf 2.3.3, in the etc/config.properties, do you have:
>>>>>>>
>>>>>>>
>>>>>>>> felix.fileinstall.enableConfigSave = true
>>>>>>>>
>>>>>>>> and NOT
>>>>>>>>
>>>>>>>> felix.fileinstall.enableConfigSave = false
>>>>>>>>
>>>>>>>> It's bug that we introduced (and it will be fixed in 2.3.4 and next
>>>>>>>> releases). We should never have changed this to false, this property
>>>>>>>> should
>>>>>>>> be set to true.
>>>>>>>>
>>>>>>>> This property sets to false block the cfg update, that's why Cellar
>>>>>>>> can't
>>>>>>>> update the groups set.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> JB
>>>>>>>>
>>>>>>>>
>>>>>>>> On 12/12/2013 09:13 PM, Fernando Ribeiro wrote:
>>>>>>>>
>>>>>>>>    Hi Jean-Baptiste,
>>>>>>>>
>>>>>>>>
>>>>>>>>> Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even
>>>>>>>>> though
>>>>>>>>> the command doesn't fail and nothing is written to the log, can you
>>>>>>>>> please
>>>>>>>>> verify?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <
>>>>>>>>> jb@nanthrax.net
>>>>>>>>>
>>>>>>>>>   wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>      Hi Fernando,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>  Cellar needs at least one cluster group. If you have only default,
>>>>>>>>>> it
>>>>>>>>>> can't be removed.
>>>>>>>>>>
>>>>>>>>>> If you create another cluster group and move all nodes in this
>>>>>>>>>> group,
>>>>>>>>>> in
>>>>>>>>>> that case, you will be able to delete default cluster group.
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>> JB
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>>>>>>>>>>
>>>>>>>>>>     Hello,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  Is there any particular reason why the default cluster group
>>>>>>>>>>> can't
>>>>>>>>>>> be
>>>>>>>>>>> deleted and/or renamed?
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>     --
>>>>>>>>>>>
>>>>>>>>>>>   Jean-Baptiste Onofré
>>>>>>>>>>>
>>>>>>>>>> jbonofre@apache.org
>>>>>>>>>> http://blog.nanthrax.net
>>>>>>>>>> Talend - http://www.talend.com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>    --
>>>>>>>>>
>>>>>>>>>  Jean-Baptiste Onofré
>>>>>>>> jbonofre@apache.org
>>>>>>>> http://blog.nanthrax.net
>>>>>>>> Talend - http://www.talend.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> Fernando Ribeiro
>>>>>>> Upic
>>>>>>> +55 11 9 8111 4078
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>   --
>>>>>>
>>>>> Jean-Baptiste Onofré
>>>>> jbonofre@apache.org
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>  --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>>
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Default Cluster Group

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Fernando,

It sounds good to me, but not sure for new Cellar 2.3.x release. That's 
why the name is "default" group: it provides the default configuration.

The current approach is to populate a ready to use 
etc/org.apache.karaf.cellar.groups.cfg file. It's what some custom 
distributions do (like Talend ESB for instance).

I'm still on Karaf 3.0.0 right now, I will take a look on all Cellar 
Jira next week.

I keep you posted.

Regards
JB

On 12/14/2013 02:10 PM, Fernando Ribeiro wrote:
> Hi Jean-Baptiste,
>
> I have worked a little bit on the current patch and need to share some
> thoughts with you.
>
> When a new group is created, we currently copy the configuration from the
> default group, which is required to be there.
>
> I'd think that we may need to change for the configured group manager to
> create even the default cluster group at installation time, specially to
> avoid having the default configuration also in a template configuration
> file.
>
> A second reason to do it would be that the default configuration currently
> blacklists the "hazelcast" feature, for example, which wouldn't be present
> if a different group manager implementation (e.g. Infinispan) was used
> instead.
>
> Regards,
>
>
> On Fri, Dec 13, 2013 at 3:08 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:
>
>> Hi Fernando,
>>
>> Thanks for that. If you can test with the latest Cellar snapshot too.
>> AFAIR I already fixed something about that.
>>
>> Regards
>> JB
>>
>>
>> On 12/13/2013 05:46 AM, Fernando Ribeiro wrote:
>>
>>> Hi Jean-Baptiste,
>>>
>>> That's right, sorry for the mistake.
>>>
>>> I will make a new setup from scratch, verify the issue and open a ticket
>>> if
>>> it is still there.
>>>
>>> Regards,
>>>
>>>
>>> On Fri, Dec 13, 2013 at 2:39 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>> wrote:
>>>
>>>   Hi Fernando,
>>>>
>>>> KARAF-1319 was about the fact that you don't have any message explaining
>>>> why a group can't be deleted.
>>>>
>>>> As I said, if default doesn't contain any node, you should be able to
>>>> delete it.
>>>> However, if you have at least one node in the default cluster group, you
>>>> can execute cluster:group-delete but it has no effect (and you don't have
>>>> error message).
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>> On 12/12/2013 10:32 PM, Fernando Ribeiro wrote:
>>>>
>>>>   Hi Jean-Baptiste,
>>>>>
>>>>> Just realized this issue has already been reported in KARAF-1319, which
>>>>> is
>>>>> currently marked as resolved.
>>>>>
>>>>> Regards,
>>>>>
>>>>>
>>>>> On Thu, Dec 12, 2013 at 7:09 PM, Fernando Ribeiro <
>>>>> fernando.ribeiro@upic.com.br> wrote:
>>>>>
>>>>>    Hi Jean-Baptiste,
>>>>>
>>>>>>
>>>>>> Even though that change has fixed the configuration saving, which was
>>>>>> also
>>>>>> an issue, I still can't delete the default cluster group, and found the
>>>>>> reason in the HazelcastGroupManager class:
>>>>>>
>>>>>> public void deleteGroup(String groupName) {
>>>>>>      ClassLoader originalClassLoader =
>>>>>> Thread.currentThread().getContextClassLoader();
>>>>>>
>>>>>>      try {
>>>>>>        Thread.currentThread().setContextClassLoader(
>>>>>> combinedClassLoader);
>>>>>>        if (!groupName.equals(Configurations.DEFAULT_GROUP_NAME)) {
>>>>>>          listGroups().remove(groupName);
>>>>>>          try {
>>>>>>            // store the group list to configuration admin
>>>>>>            persist(listGroups());
>>>>>>          } catch (Exception e) {
>>>>>>            LOGGER.warn("CELLAR HAZELCAST: can't store group list", e);
>>>>>>          }
>>>>>>        }
>>>>>>      } finally {
>>>>>>        Thread.currentThread().setContextClassLoader(
>>>>>> originalClassLoader);
>>>>>>      }
>>>>>> }
>>>>>>
>>>>>> I can take care of the PR if you can confirm that it is really not the
>>>>>> expected behavior.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Dec 12, 2013 at 6:16 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>>>>
>>>>>>> wrote:
>>>>>>>
>>>>>>
>>>>>>    On Karaf 2.3.3, in the etc/config.properties, do you have:
>>>>>>
>>>>>>>
>>>>>>> felix.fileinstall.enableConfigSave = true
>>>>>>>
>>>>>>> and NOT
>>>>>>>
>>>>>>> felix.fileinstall.enableConfigSave = false
>>>>>>>
>>>>>>> It's bug that we introduced (and it will be fixed in 2.3.4 and next
>>>>>>> releases). We should never have changed this to false, this property
>>>>>>> should
>>>>>>> be set to true.
>>>>>>>
>>>>>>> This property sets to false block the cfg update, that's why Cellar
>>>>>>> can't
>>>>>>> update the groups set.
>>>>>>>
>>>>>>> Regards
>>>>>>> JB
>>>>>>>
>>>>>>>
>>>>>>> On 12/12/2013 09:13 PM, Fernando Ribeiro wrote:
>>>>>>>
>>>>>>>    Hi Jean-Baptiste,
>>>>>>>
>>>>>>>>
>>>>>>>> Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even
>>>>>>>> though
>>>>>>>> the command doesn't fail and nothing is written to the log, can you
>>>>>>>> please
>>>>>>>> verify?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <
>>>>>>>> jb@nanthrax.net
>>>>>>>>
>>>>>>>>   wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>     Hi Fernando,
>>>>>>>>
>>>>>>>>
>>>>>>>>> Cellar needs at least one cluster group. If you have only default,
>>>>>>>>> it
>>>>>>>>> can't be removed.
>>>>>>>>>
>>>>>>>>> If you create another cluster group and move all nodes in this
>>>>>>>>> group,
>>>>>>>>> in
>>>>>>>>> that case, you will be able to delete default cluster group.
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>> JB
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>>>>>>>>>
>>>>>>>>>     Hello,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Is there any particular reason why the default cluster group can't
>>>>>>>>>> be
>>>>>>>>>> deleted and/or renamed?
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>     --
>>>>>>>>>>
>>>>>>>>>>   Jean-Baptiste Onofré
>>>>>>>>> jbonofre@apache.org
>>>>>>>>> http://blog.nanthrax.net
>>>>>>>>> Talend - http://www.talend.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>    --
>>>>>>>>
>>>>>>> Jean-Baptiste Onofré
>>>>>>> jbonofre@apache.org
>>>>>>> http://blog.nanthrax.net
>>>>>>> Talend - http://www.talend.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Fernando Ribeiro
>>>>>> Upic
>>>>>> +55 11 9 8111 4078
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>   --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>>
>>>>
>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Default Cluster Group

Posted by Fernando Ribeiro <fe...@upic.com.br>.
Hi Jean-Baptiste,

I have worked a little bit on the current patch and need to share some
thoughts with you.

When a new group is created, we currently copy the configuration from the
default group, which is required to be there.

I'd think that we may need to change for the configured group manager to
create even the default cluster group at installation time, specially to
avoid having the default configuration also in a template configuration
file.

A second reason to do it would be that the default configuration currently
blacklists the "hazelcast" feature, for example, which wouldn't be present
if a different group manager implementation (e.g. Infinispan) was used
instead.

Regards,


On Fri, Dec 13, 2013 at 3:08 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> Hi Fernando,
>
> Thanks for that. If you can test with the latest Cellar snapshot too.
> AFAIR I already fixed something about that.
>
> Regards
> JB
>
>
> On 12/13/2013 05:46 AM, Fernando Ribeiro wrote:
>
>> Hi Jean-Baptiste,
>>
>> That's right, sorry for the mistake.
>>
>> I will make a new setup from scratch, verify the issue and open a ticket
>> if
>> it is still there.
>>
>> Regards,
>>
>>
>> On Fri, Dec 13, 2013 at 2:39 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>> >wrote:
>>
>>  Hi Fernando,
>>>
>>> KARAF-1319 was about the fact that you don't have any message explaining
>>> why a group can't be deleted.
>>>
>>> As I said, if default doesn't contain any node, you should be able to
>>> delete it.
>>> However, if you have at least one node in the default cluster group, you
>>> can execute cluster:group-delete but it has no effect (and you don't have
>>> error message).
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 12/12/2013 10:32 PM, Fernando Ribeiro wrote:
>>>
>>>  Hi Jean-Baptiste,
>>>>
>>>> Just realized this issue has already been reported in KARAF-1319, which
>>>> is
>>>> currently marked as resolved.
>>>>
>>>> Regards,
>>>>
>>>>
>>>> On Thu, Dec 12, 2013 at 7:09 PM, Fernando Ribeiro <
>>>> fernando.ribeiro@upic.com.br> wrote:
>>>>
>>>>   Hi Jean-Baptiste,
>>>>
>>>>>
>>>>> Even though that change has fixed the configuration saving, which was
>>>>> also
>>>>> an issue, I still can't delete the default cluster group, and found the
>>>>> reason in the HazelcastGroupManager class:
>>>>>
>>>>> public void deleteGroup(String groupName) {
>>>>>     ClassLoader originalClassLoader =
>>>>> Thread.currentThread().getContextClassLoader();
>>>>>
>>>>>     try {
>>>>>       Thread.currentThread().setContextClassLoader(
>>>>> combinedClassLoader);
>>>>>       if (!groupName.equals(Configurations.DEFAULT_GROUP_NAME)) {
>>>>>         listGroups().remove(groupName);
>>>>>         try {
>>>>>           // store the group list to configuration admin
>>>>>           persist(listGroups());
>>>>>         } catch (Exception e) {
>>>>>           LOGGER.warn("CELLAR HAZELCAST: can't store group list", e);
>>>>>         }
>>>>>       }
>>>>>     } finally {
>>>>>       Thread.currentThread().setContextClassLoader(
>>>>> originalClassLoader);
>>>>>     }
>>>>> }
>>>>>
>>>>> I can take care of the PR if you can confirm that it is really not the
>>>>> expected behavior.
>>>>>
>>>>> Regards,
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Dec 12, 2013 at 6:16 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>>>
>>>>>> wrote:
>>>>>>
>>>>>
>>>>>   On Karaf 2.3.3, in the etc/config.properties, do you have:
>>>>>
>>>>>>
>>>>>> felix.fileinstall.enableConfigSave = true
>>>>>>
>>>>>> and NOT
>>>>>>
>>>>>> felix.fileinstall.enableConfigSave = false
>>>>>>
>>>>>> It's bug that we introduced (and it will be fixed in 2.3.4 and next
>>>>>> releases). We should never have changed this to false, this property
>>>>>> should
>>>>>> be set to true.
>>>>>>
>>>>>> This property sets to false block the cfg update, that's why Cellar
>>>>>> can't
>>>>>> update the groups set.
>>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>>
>>>>>> On 12/12/2013 09:13 PM, Fernando Ribeiro wrote:
>>>>>>
>>>>>>   Hi Jean-Baptiste,
>>>>>>
>>>>>>>
>>>>>>> Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even
>>>>>>> though
>>>>>>> the command doesn't fail and nothing is written to the log, can you
>>>>>>> please
>>>>>>> verify?
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <
>>>>>>> jb@nanthrax.net
>>>>>>>
>>>>>>>  wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>    Hi Fernando,
>>>>>>>
>>>>>>>
>>>>>>>> Cellar needs at least one cluster group. If you have only default,
>>>>>>>> it
>>>>>>>> can't be removed.
>>>>>>>>
>>>>>>>> If you create another cluster group and move all nodes in this
>>>>>>>> group,
>>>>>>>> in
>>>>>>>> that case, you will be able to delete default cluster group.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> JB
>>>>>>>>
>>>>>>>>
>>>>>>>> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>>>>>>>>
>>>>>>>>    Hello,
>>>>>>>>
>>>>>>>>
>>>>>>>>> Is there any particular reason why the default cluster group can't
>>>>>>>>> be
>>>>>>>>> deleted and/or renamed?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>    --
>>>>>>>>>
>>>>>>>>>  Jean-Baptiste Onofré
>>>>>>>> jbonofre@apache.org
>>>>>>>> http://blog.nanthrax.net
>>>>>>>> Talend - http://www.talend.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>   --
>>>>>>>
>>>>>> Jean-Baptiste Onofré
>>>>>> jbonofre@apache.org
>>>>>> http://blog.nanthrax.net
>>>>>> Talend - http://www.talend.com
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Fernando Ribeiro
>>>>> Upic
>>>>> +55 11 9 8111 4078
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>  --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>>
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
Fernando Ribeiro
Upic
+55 11 9 8111 4078

Re: Default Cluster Group

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Fernando,

Thanks for that. If you can test with the latest Cellar snapshot too. 
AFAIR I already fixed something about that.

Regards
JB

On 12/13/2013 05:46 AM, Fernando Ribeiro wrote:
> Hi Jean-Baptiste,
>
> That's right, sorry for the mistake.
>
> I will make a new setup from scratch, verify the issue and open a ticket if
> it is still there.
>
> Regards,
>
>
> On Fri, Dec 13, 2013 at 2:39 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:
>
>> Hi Fernando,
>>
>> KARAF-1319 was about the fact that you don't have any message explaining
>> why a group can't be deleted.
>>
>> As I said, if default doesn't contain any node, you should be able to
>> delete it.
>> However, if you have at least one node in the default cluster group, you
>> can execute cluster:group-delete but it has no effect (and you don't have
>> error message).
>>
>> Regards
>> JB
>>
>>
>> On 12/12/2013 10:32 PM, Fernando Ribeiro wrote:
>>
>>> Hi Jean-Baptiste,
>>>
>>> Just realized this issue has already been reported in KARAF-1319, which is
>>> currently marked as resolved.
>>>
>>> Regards,
>>>
>>>
>>> On Thu, Dec 12, 2013 at 7:09 PM, Fernando Ribeiro <
>>> fernando.ribeiro@upic.com.br> wrote:
>>>
>>>   Hi Jean-Baptiste,
>>>>
>>>> Even though that change has fixed the configuration saving, which was
>>>> also
>>>> an issue, I still can't delete the default cluster group, and found the
>>>> reason in the HazelcastGroupManager class:
>>>>
>>>> public void deleteGroup(String groupName) {
>>>>     ClassLoader originalClassLoader =
>>>> Thread.currentThread().getContextClassLoader();
>>>>
>>>>     try {
>>>>       Thread.currentThread().setContextClassLoader(combinedClassLoader);
>>>>       if (!groupName.equals(Configurations.DEFAULT_GROUP_NAME)) {
>>>>         listGroups().remove(groupName);
>>>>         try {
>>>>           // store the group list to configuration admin
>>>>           persist(listGroups());
>>>>         } catch (Exception e) {
>>>>           LOGGER.warn("CELLAR HAZELCAST: can't store group list", e);
>>>>         }
>>>>       }
>>>>     } finally {
>>>>       Thread.currentThread().setContextClassLoader(originalClassLoader);
>>>>     }
>>>> }
>>>>
>>>> I can take care of the PR if you can confirm that it is really not the
>>>> expected behavior.
>>>>
>>>> Regards,
>>>>
>>>>
>>>>
>>>> On Thu, Dec 12, 2013 at 6:16 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>>> wrote:
>>>>
>>>>   On Karaf 2.3.3, in the etc/config.properties, do you have:
>>>>>
>>>>> felix.fileinstall.enableConfigSave = true
>>>>>
>>>>> and NOT
>>>>>
>>>>> felix.fileinstall.enableConfigSave = false
>>>>>
>>>>> It's bug that we introduced (and it will be fixed in 2.3.4 and next
>>>>> releases). We should never have changed this to false, this property
>>>>> should
>>>>> be set to true.
>>>>>
>>>>> This property sets to false block the cfg update, that's why Cellar
>>>>> can't
>>>>> update the groups set.
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>>
>>>>> On 12/12/2013 09:13 PM, Fernando Ribeiro wrote:
>>>>>
>>>>>   Hi Jean-Baptiste,
>>>>>>
>>>>>> Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even
>>>>>> though
>>>>>> the command doesn't fail and nothing is written to the log, can you
>>>>>> please
>>>>>> verify?
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>>>>
>>>>>>> wrote:
>>>>>>>
>>>>>>
>>>>>>    Hi Fernando,
>>>>>>
>>>>>>>
>>>>>>> Cellar needs at least one cluster group. If you have only default, it
>>>>>>> can't be removed.
>>>>>>>
>>>>>>> If you create another cluster group and move all nodes in this group,
>>>>>>> in
>>>>>>> that case, you will be able to delete default cluster group.
>>>>>>>
>>>>>>> Regards
>>>>>>> JB
>>>>>>>
>>>>>>>
>>>>>>> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>>>>>>>
>>>>>>>    Hello,
>>>>>>>
>>>>>>>>
>>>>>>>> Is there any particular reason why the default cluster group can't be
>>>>>>>> deleted and/or renamed?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>>
>>>>>>>>    --
>>>>>>>>
>>>>>>> Jean-Baptiste Onofré
>>>>>>> jbonofre@apache.org
>>>>>>> http://blog.nanthrax.net
>>>>>>> Talend - http://www.talend.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>   --
>>>>> Jean-Baptiste Onofré
>>>>> jbonofre@apache.org
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Fernando Ribeiro
>>>> Upic
>>>> +55 11 9 8111 4078
>>>>
>>>>
>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Default Cluster Group

Posted by Fernando Ribeiro <fe...@upic.com.br>.
Hi Jean-Baptiste,

That's right, sorry for the mistake.

I will make a new setup from scratch, verify the issue and open a ticket if
it is still there.

Regards,


On Fri, Dec 13, 2013 at 2:39 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> Hi Fernando,
>
> KARAF-1319 was about the fact that you don't have any message explaining
> why a group can't be deleted.
>
> As I said, if default doesn't contain any node, you should be able to
> delete it.
> However, if you have at least one node in the default cluster group, you
> can execute cluster:group-delete but it has no effect (and you don't have
> error message).
>
> Regards
> JB
>
>
> On 12/12/2013 10:32 PM, Fernando Ribeiro wrote:
>
>> Hi Jean-Baptiste,
>>
>> Just realized this issue has already been reported in KARAF-1319, which is
>> currently marked as resolved.
>>
>> Regards,
>>
>>
>> On Thu, Dec 12, 2013 at 7:09 PM, Fernando Ribeiro <
>> fernando.ribeiro@upic.com.br> wrote:
>>
>>  Hi Jean-Baptiste,
>>>
>>> Even though that change has fixed the configuration saving, which was
>>> also
>>> an issue, I still can't delete the default cluster group, and found the
>>> reason in the HazelcastGroupManager class:
>>>
>>> public void deleteGroup(String groupName) {
>>>    ClassLoader originalClassLoader =
>>> Thread.currentThread().getContextClassLoader();
>>>
>>>    try {
>>>      Thread.currentThread().setContextClassLoader(combinedClassLoader);
>>>      if (!groupName.equals(Configurations.DEFAULT_GROUP_NAME)) {
>>>        listGroups().remove(groupName);
>>>        try {
>>>          // store the group list to configuration admin
>>>          persist(listGroups());
>>>        } catch (Exception e) {
>>>          LOGGER.warn("CELLAR HAZELCAST: can't store group list", e);
>>>        }
>>>      }
>>>    } finally {
>>>      Thread.currentThread().setContextClassLoader(originalClassLoader);
>>>    }
>>> }
>>>
>>> I can take care of the PR if you can confirm that it is really not the
>>> expected behavior.
>>>
>>> Regards,
>>>
>>>
>>>
>>> On Thu, Dec 12, 2013 at 6:16 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>> >wrote:
>>>
>>>  On Karaf 2.3.3, in the etc/config.properties, do you have:
>>>>
>>>> felix.fileinstall.enableConfigSave = true
>>>>
>>>> and NOT
>>>>
>>>> felix.fileinstall.enableConfigSave = false
>>>>
>>>> It's bug that we introduced (and it will be fixed in 2.3.4 and next
>>>> releases). We should never have changed this to false, this property
>>>> should
>>>> be set to true.
>>>>
>>>> This property sets to false block the cfg update, that's why Cellar
>>>> can't
>>>> update the groups set.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>> On 12/12/2013 09:13 PM, Fernando Ribeiro wrote:
>>>>
>>>>  Hi Jean-Baptiste,
>>>>>
>>>>> Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even
>>>>> though
>>>>> the command doesn't fail and nothing is written to the log, can you
>>>>> please
>>>>> verify?
>>>>>
>>>>> Regards,
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>>>
>>>>>> wrote:
>>>>>>
>>>>>
>>>>>   Hi Fernando,
>>>>>
>>>>>>
>>>>>> Cellar needs at least one cluster group. If you have only default, it
>>>>>> can't be removed.
>>>>>>
>>>>>> If you create another cluster group and move all nodes in this group,
>>>>>> in
>>>>>> that case, you will be able to delete default cluster group.
>>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>>
>>>>>> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>>>>>>
>>>>>>   Hello,
>>>>>>
>>>>>>>
>>>>>>> Is there any particular reason why the default cluster group can't be
>>>>>>> deleted and/or renamed?
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>>
>>>>>>>   --
>>>>>>>
>>>>>> Jean-Baptiste Onofré
>>>>>> jbonofre@apache.org
>>>>>> http://blog.nanthrax.net
>>>>>> Talend - http://www.talend.com
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>  --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>>
>>>>
>>>
>>>
>>> --
>>> Fernando Ribeiro
>>> Upic
>>> +55 11 9 8111 4078
>>>
>>>
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
Fernando Ribeiro
Upic
+55 11 9 8111 4078

Re: Default Cluster Group

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Fernando,

KARAF-1319 was about the fact that you don't have any message explaining 
why a group can't be deleted.

As I said, if default doesn't contain any node, you should be able to 
delete it.
However, if you have at least one node in the default cluster group, you 
can execute cluster:group-delete but it has no effect (and you don't 
have error message).

Regards
JB

On 12/12/2013 10:32 PM, Fernando Ribeiro wrote:
> Hi Jean-Baptiste,
>
> Just realized this issue has already been reported in KARAF-1319, which is
> currently marked as resolved.
>
> Regards,
>
>
> On Thu, Dec 12, 2013 at 7:09 PM, Fernando Ribeiro <
> fernando.ribeiro@upic.com.br> wrote:
>
>> Hi Jean-Baptiste,
>>
>> Even though that change has fixed the configuration saving, which was also
>> an issue, I still can't delete the default cluster group, and found the
>> reason in the HazelcastGroupManager class:
>>
>> public void deleteGroup(String groupName) {
>>    ClassLoader originalClassLoader =
>> Thread.currentThread().getContextClassLoader();
>>
>>    try {
>>      Thread.currentThread().setContextClassLoader(combinedClassLoader);
>>      if (!groupName.equals(Configurations.DEFAULT_GROUP_NAME)) {
>>        listGroups().remove(groupName);
>>        try {
>>          // store the group list to configuration admin
>>          persist(listGroups());
>>        } catch (Exception e) {
>>          LOGGER.warn("CELLAR HAZELCAST: can't store group list", e);
>>        }
>>      }
>>    } finally {
>>      Thread.currentThread().setContextClassLoader(originalClassLoader);
>>    }
>> }
>>
>> I can take care of the PR if you can confirm that it is really not the
>> expected behavior.
>>
>> Regards,
>>
>>
>>
>> On Thu, Dec 12, 2013 at 6:16 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:
>>
>>> On Karaf 2.3.3, in the etc/config.properties, do you have:
>>>
>>> felix.fileinstall.enableConfigSave = true
>>>
>>> and NOT
>>>
>>> felix.fileinstall.enableConfigSave = false
>>>
>>> It's bug that we introduced (and it will be fixed in 2.3.4 and next
>>> releases). We should never have changed this to false, this property should
>>> be set to true.
>>>
>>> This property sets to false block the cfg update, that's why Cellar can't
>>> update the groups set.
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 12/12/2013 09:13 PM, Fernando Ribeiro wrote:
>>>
>>>> Hi Jean-Baptiste,
>>>>
>>>> Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even though
>>>> the command doesn't fail and nothing is written to the log, can you
>>>> please
>>>> verify?
>>>>
>>>> Regards,
>>>>
>>>>
>>>>
>>>> On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>>> wrote:
>>>>
>>>>   Hi Fernando,
>>>>>
>>>>> Cellar needs at least one cluster group. If you have only default, it
>>>>> can't be removed.
>>>>>
>>>>> If you create another cluster group and move all nodes in this group, in
>>>>> that case, you will be able to delete default cluster group.
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>>
>>>>> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>>>>>
>>>>>   Hello,
>>>>>>
>>>>>> Is there any particular reason why the default cluster group can't be
>>>>>> deleted and/or renamed?
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>>
>>>>>>   --
>>>>> Jean-Baptiste Onofré
>>>>> jbonofre@apache.org
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>>
>>
>> --
>> Fernando Ribeiro
>> Upic
>> +55 11 9 8111 4078
>>
>
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Default Cluster Group

Posted by Fernando Ribeiro <fe...@upic.com.br>.
Hi Jean-Baptiste,

Just realized this issue has already been reported in KARAF-1319, which is
currently marked as resolved.

Regards,


On Thu, Dec 12, 2013 at 7:09 PM, Fernando Ribeiro <
fernando.ribeiro@upic.com.br> wrote:

> Hi Jean-Baptiste,
>
> Even though that change has fixed the configuration saving, which was also
> an issue, I still can't delete the default cluster group, and found the
> reason in the HazelcastGroupManager class:
>
> public void deleteGroup(String groupName) {
>   ClassLoader originalClassLoader =
> Thread.currentThread().getContextClassLoader();
>
>   try {
>     Thread.currentThread().setContextClassLoader(combinedClassLoader);
>     if (!groupName.equals(Configurations.DEFAULT_GROUP_NAME)) {
>       listGroups().remove(groupName);
>       try {
>         // store the group list to configuration admin
>         persist(listGroups());
>       } catch (Exception e) {
>         LOGGER.warn("CELLAR HAZELCAST: can't store group list", e);
>       }
>     }
>   } finally {
>     Thread.currentThread().setContextClassLoader(originalClassLoader);
>   }
> }
>
> I can take care of the PR if you can confirm that it is really not the
> expected behavior.
>
> Regards,
>
>
>
> On Thu, Dec 12, 2013 at 6:16 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:
>
>> On Karaf 2.3.3, in the etc/config.properties, do you have:
>>
>> felix.fileinstall.enableConfigSave = true
>>
>> and NOT
>>
>> felix.fileinstall.enableConfigSave = false
>>
>> It's bug that we introduced (and it will be fixed in 2.3.4 and next
>> releases). We should never have changed this to false, this property should
>> be set to true.
>>
>> This property sets to false block the cfg update, that's why Cellar can't
>> update the groups set.
>>
>> Regards
>> JB
>>
>>
>> On 12/12/2013 09:13 PM, Fernando Ribeiro wrote:
>>
>>> Hi Jean-Baptiste,
>>>
>>> Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even though
>>> the command doesn't fail and nothing is written to the log, can you
>>> please
>>> verify?
>>>
>>> Regards,
>>>
>>>
>>>
>>> On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>> >wrote:
>>>
>>>  Hi Fernando,
>>>>
>>>> Cellar needs at least one cluster group. If you have only default, it
>>>> can't be removed.
>>>>
>>>> If you create another cluster group and move all nodes in this group, in
>>>> that case, you will be able to delete default cluster group.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>>>>
>>>>  Hello,
>>>>>
>>>>> Is there any particular reason why the default cluster group can't be
>>>>> deleted and/or renamed?
>>>>>
>>>>> Regards,
>>>>>
>>>>>
>>>>>  --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>>
>>>>
>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>
> --
> Fernando Ribeiro
> Upic
> +55 11 9 8111 4078
>



-- 
Fernando Ribeiro
Upic
+55 11 9 8111 4078

Re: Default Cluster Group

Posted by Fernando Ribeiro <fe...@upic.com.br>.
Hi Jean-Baptiste,

Even though that change has fixed the configuration saving, which was also
an issue, I still can't delete the default cluster group, and found the
reason in the HazelcastGroupManager class:

public void deleteGroup(String groupName) {
  ClassLoader originalClassLoader =
Thread.currentThread().getContextClassLoader();

  try {
    Thread.currentThread().setContextClassLoader(combinedClassLoader);
    if (!groupName.equals(Configurations.DEFAULT_GROUP_NAME)) {
      listGroups().remove(groupName);
      try {
        // store the group list to configuration admin
        persist(listGroups());
      } catch (Exception e) {
        LOGGER.warn("CELLAR HAZELCAST: can't store group list", e);
      }
    }
  } finally {
    Thread.currentThread().setContextClassLoader(originalClassLoader);
  }
}

I can take care of the PR if you can confirm that it is really not the
expected behavior.

Regards,



On Thu, Dec 12, 2013 at 6:16 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> On Karaf 2.3.3, in the etc/config.properties, do you have:
>
> felix.fileinstall.enableConfigSave = true
>
> and NOT
>
> felix.fileinstall.enableConfigSave = false
>
> It's bug that we introduced (and it will be fixed in 2.3.4 and next
> releases). We should never have changed this to false, this property should
> be set to true.
>
> This property sets to false block the cfg update, that's why Cellar can't
> update the groups set.
>
> Regards
> JB
>
>
> On 12/12/2013 09:13 PM, Fernando Ribeiro wrote:
>
>> Hi Jean-Baptiste,
>>
>> Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even though
>> the command doesn't fail and nothing is written to the log, can you please
>> verify?
>>
>> Regards,
>>
>>
>>
>> On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>> >wrote:
>>
>>  Hi Fernando,
>>>
>>> Cellar needs at least one cluster group. If you have only default, it
>>> can't be removed.
>>>
>>> If you create another cluster group and move all nodes in this group, in
>>> that case, you will be able to delete default cluster group.
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>>>
>>>  Hello,
>>>>
>>>> Is there any particular reason why the default cluster group can't be
>>>> deleted and/or renamed?
>>>>
>>>> Regards,
>>>>
>>>>
>>>>  --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>>
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
Fernando Ribeiro
Upic
+55 11 9 8111 4078

Re: Default Cluster Group

Posted by Fernando Ribeiro <fe...@upic.com.br>.
Hi Jean-Baptiste,

Even though that change has really fixed the configuration saving, which
was also an issue, I still can't delete the default cluster group, let me
know how you prefer me to proceed.

Regards,


On Thu, Dec 12, 2013 at 6:16 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> On Karaf 2.3.3, in the etc/config.properties, do you have:
>
> felix.fileinstall.enableConfigSave = true
>
> and NOT
>
> felix.fileinstall.enableConfigSave = false
>
> It's bug that we introduced (and it will be fixed in 2.3.4 and next
> releases). We should never have changed this to false, this property should
> be set to true.
>
> This property sets to false block the cfg update, that's why Cellar can't
> update the groups set.
>
> Regards
> JB
>
>
> On 12/12/2013 09:13 PM, Fernando Ribeiro wrote:
>
>> Hi Jean-Baptiste,
>>
>> Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even though
>> the command doesn't fail and nothing is written to the log, can you please
>> verify?
>>
>> Regards,
>>
>>
>>
>> On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>> >wrote:
>>
>>  Hi Fernando,
>>>
>>> Cellar needs at least one cluster group. If you have only default, it
>>> can't be removed.
>>>
>>> If you create another cluster group and move all nodes in this group, in
>>> that case, you will be able to delete default cluster group.
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>>>
>>>  Hello,
>>>>
>>>> Is there any particular reason why the default cluster group can't be
>>>> deleted and/or renamed?
>>>>
>>>> Regards,
>>>>
>>>>
>>>>  --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>>
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
Fernando Ribeiro
Upic
+55 11 9 8111 4078

Re: Default Cluster Group

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
On Karaf 2.3.3, in the etc/config.properties, do you have:

felix.fileinstall.enableConfigSave = true

and NOT

felix.fileinstall.enableConfigSave = false

It's bug that we introduced (and it will be fixed in 2.3.4 and next 
releases). We should never have changed this to false, this property 
should be set to true.

This property sets to false block the cfg update, that's why Cellar 
can't update the groups set.

Regards
JB

On 12/12/2013 09:13 PM, Fernando Ribeiro wrote:
> Hi Jean-Baptiste,
>
> Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even though
> the command doesn't fail and nothing is written to the log, can you please
> verify?
>
> Regards,
>
>
>
> On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:
>
>> Hi Fernando,
>>
>> Cellar needs at least one cluster group. If you have only default, it
>> can't be removed.
>>
>> If you create another cluster group and move all nodes in this group, in
>> that case, you will be able to delete default cluster group.
>>
>> Regards
>> JB
>>
>>
>> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>>
>>> Hello,
>>>
>>> Is there any particular reason why the default cluster group can't be
>>> deleted and/or renamed?
>>>
>>> Regards,
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Default Cluster Group

Posted by Fernando Ribeiro <fe...@upic.com.br>.
Hi Jean-Baptiste,

Actually I can't delete it in Karaf 2.3.3 with Cellar 2.3.2, even though
the command doesn't fail and nothing is written to the log, can you please
verify?

Regards,



On Thu, Dec 12, 2013 at 6:07 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> Hi Fernando,
>
> Cellar needs at least one cluster group. If you have only default, it
> can't be removed.
>
> If you create another cluster group and move all nodes in this group, in
> that case, you will be able to delete default cluster group.
>
> Regards
> JB
>
>
> On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
>
>> Hello,
>>
>> Is there any particular reason why the default cluster group can't be
>> deleted and/or renamed?
>>
>> Regards,
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
Fernando Ribeiro
Upic
+55 11 9 8111 4078

Re: Default Cluster Group

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Fernando,

Cellar needs at least one cluster group. If you have only default, it 
can't be removed.

If you create another cluster group and move all nodes in this group, in 
that case, you will be able to delete default cluster group.

Regards
JB

On 12/12/2013 08:58 PM, Fernando Ribeiro wrote:
> Hello,
>
> Is there any particular reason why the default cluster group can't be
> deleted and/or renamed?
>
> Regards,
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com