Sebastian, are you sure the namespace is the problem? The template seems to 
define a default value for namepsace [2].

Anyway, I've tried to pass a NAMESPACE value and I still the same WARN messages 
and no cluster formed.

Cheers,

[2] 
https://github.com/infinispan/infinispan-openshift-templates/blob/master/templates/infinispan-ephemeral.json#L338

> On 25 Sep 2017, at 13:18, Galder Zamarreño <gal...@redhat.com> wrote:
> 
> Hmmm, is there a way to say that if you don't pass in namespace, you take the 
> application name as namespace?
> 
>> On 25 Sep 2017, at 13:11, Sebastian Laskawiec <slask...@redhat.com> wrote:
>> 
>> Seems like you didn't fill the namespace parameter while creating an app: 
>> https://github.com/infinispan/infinispan-openshift-templates/blob/master/templates/infinispan-ephemeral.json#L336
>> 
>> I already tried to eliminate this parameter (because it seems redundant) but 
>> currently there is no way to do it [1]. It s required for Role Binding which 
>> enables the Pod to query Kubernetes API and ask about Pods [2].
>> 
>> You may also try to use the third way:
>> oc policy add-role-to-user view system:serviceaccount:<<your 
>> namespace>>:<<service account used for Deployment Config>>
>> 
>> [1] 
>> https://github.com/infinispan/infinispan-openshift-templates/pull/9#discussion_r131409849
>> [2] https://docs.openshift.com/enterprise/3.0/dev_guide/service_accounts.html
>> 
>> On Mon, Sep 25, 2017 at 12:54 PM Galder Zamarreño <gal...@redhat.com> wrote:
>> Hey Sebastian,
>> 
>> I've started 2 instances of Infinispan ephemeral [1] and they don't seem to 
>> cluster together with the pods showing this message:
>> 
>> 10:51:12,014 WARN  [org.jgroups.protocols.kubernetes.KUBE_PING] 
>> (jgroups-4,datagrid-1-187kx) failed getting JSON response from Kubernetes 
>> Client[masterUrl=https://172.30.0.1:443/api/v1, 
>> headers={Authorization=#MASKED:862#}, connectTimeout=5000, 
>> readTimeout=30000, operationAttempts=3, operationSleep=1000, 
>> streamProvider=org.jgroups.protocols.kubernetes.stream.InsecureStreamProvider@51522f72]
>>  for cluster [cluster], namespace [openshift], labels 
>> [application=datagrid]; encountered [java.lang.Exception: 3 attempt(s) with 
>> a 1000ms sleep to execute [OpenStream] failed. Last failure was 
>> [java.io.IOException: Server returned HTTP response code: 403 for URL: 
>> https://172.30.0.1:443/api/v1/namespaces/openshift/pods?labelSelector=application%3Ddatagrid]]
>> 
>> These are the options I'm giving to the template:
>> 
>> oc process infinispan-ephemeral -p \
>>  NUMBER_OF_INSTANCES=2 \
>>  APPLICATION_NAME=datagrid \
>>  APPLICATION_USER=developer \
>>  APPLICATION_PASSWORD=developer
>> 
>> I'd expect this to work out of the box, or do you need to pass in a 
>> management usr/pwd for it to work?
>> 
>> Cheers,
>> 
>> [1] https://github.com/infinispan/infinispan-openshift-templates
>> --
>> Galder Zamarreño
>> Infinispan, Red Hat
>> 
> 
> --
> Galder Zamarreño
> Infinispan, Red Hat
> 

--
Galder Zamarreño
Infinispan, Red Hat


_______________________________________________
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev

Reply via email to