<div dir="ltr">Hi <span style="color:rgb(33,33,33)">Raghavendra Talur,</span><div><span style="color:rgb(33,33,33)"><br></span></div><div><font color="#212121">this does not work for me. Most certainly because I forgot something.</font></div><div><font color="#212121">So just put the file in the folder, make it executable and create a volume? Thats all?</font></div><div><font color="#212121"><br></font></div><div><font color="#212121">If I am doing this, there is no </font><span style="color:rgb(33,33,33)">/var/lib/glusterd/hooks/1/crea</span><span style="color:rgb(33,33,33)">te/post/log file and the </span><font color="#212121">Performance Translator is still on.</font></div><div><font color="#212121"><br></font></div><div><font color="#212121">and idea?</font></div></div><br><div class="gmail_quote"><div dir="ltr">Raghavendra Talur <<a href="mailto:rtalur@redhat.com">rtalur@redhat.com</a>> schrieb am Fr., 26. Mai 2017 um 07:34 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, May 25, 2017 at 8:39 PM, Joe Julian <<a href="mailto:joe@julianfamily.org" target="_blank">joe@julianfamily.org</a>> wrote:<br>
> Maybe hooks?<br>
<br>
Yes, we were thinking of the same :)<br>
<br>
Christopher,<br>
Gluster has hook-scripts facility that admins can write and set those<br>
to be run on certain events in Gluster. We have a event for volume<br>
creation.<br>
Here are the steps for using hook scripts.<br>
<br>
1. deploy the gluster pods and create a cluster as you have already done.<br>
2. on the kubernetes nodes that are running gluster pods(make sure<br>
they are running now, because we want to write into the bind mount),<br>
create a new file in location /var/lib/glusterd/hooks/1/create/post/<br>
3. name of the fie could be S29disable-perf.sh , important part being<br>
that the number should have capital S as first letter.<br>
4. I tried out a sample script with content as below<br>
<br>
```<br>
#!/bin/bash<br>
<br>
<br>
<br>
PROGNAME="Sdisable-perf"<br>
OPTSPEC="volname:,gd-workdir:"<br>
VOL=<br>
CONFIGFILE=<br>
LOGFILEBASE=<br>
PIDDIR=<br>
GLUSTERD_WORKDIR=<br>
<br>
function parse_args () {<br>
ARGS=$(getopt -l $OPTSPEC -name $PROGNAME $@)<br>
eval set -- "$ARGS"<br>
<br>
while true; do<br>
case $1 in<br>
--volname)<br>
shift<br>
VOL=$1<br>
;;<br>
--gd-workdir)<br>
shift<br>
GLUSTERD_WORKDIR=$1<br>
;;<br>
*)<br>
shift<br>
break<br>
;;<br>
esac<br>
shift<br>
done<br>
}<br>
<br>
function disable_perf_xlators () {<br>
volname=$1<br>
gluster volume set $volname performance.write-behind off<br>
echo "executed and return is $?" >><br>
/var/lib/glusterd/hooks/1/create/post/log<br>
}<br>
<br>
echo "starting" >> /var/lib/glusterd/hooks/1/create/post/log<br>
parse_args $@<br>
disable_perf_xlators $VOL<br>
```<br>
5. set execute permissions on the file<br>
<br>
I tried this out and it worked for me. Let us know if that helps!<br>
<br>
Thanks,<br>
Raghavendra Talur<br>
<br>
<br>
<br>
><br>
><br>
> On May 25, 2017 6:48:04 AM PDT, Christopher Schmidt <<a href="mailto:fakod666@gmail.com" target="_blank">fakod666@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi Humble,<br>
>><br>
>> thanks for that, it is really appreciated.<br>
>><br>
>> In the meanwhile, using K8s 1.5, what can I do to disable the performance<br>
>> translator that doesn't work with Kafka? Maybe something while generating<br>
>> the Glusterfs container for Kubernetes?<br>
>><br>
>> Best Christopher<br>
>><br>
>> Humble Chirammal <<a href="mailto:hchiramm@redhat.com" target="_blank">hchiramm@redhat.com</a>> schrieb am Do., 25. Mai 2017,<br>
>> 09:36:<br>
>>><br>
>>> On Thu, May 25, 2017 at 12:57 PM, Raghavendra Talur <<a href="mailto:rtalur@redhat.com" target="_blank">rtalur@redhat.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> On Thu, May 25, 2017 at 11:21 AM, Christopher Schmidt<br>
>>>> <<a href="mailto:fakod666@gmail.com" target="_blank">fakod666@gmail.com</a>> wrote:<br>
>>>> > So this change of the Gluster Volume Plugin will make it into K8s 1.7<br>
>>>> > or<br>
>>>> > 1.8. Unfortunately too late for me.<br>
>>>> ><br>
>>>> > Does anyone know how to disable performance translators by default?<br>
>>>><br>
>>>> Humble,<br>
>>>><br>
>>>> Do you know of any way Christopher can proceed here?<br>
>>><br>
>>><br>
>>> I am trying to get it in 1.7 branch, will provide an update here as soon<br>
>>> as its available.<br>
>>>><br>
>>>><br>
>>>> ><br>
>>>> ><br>
>>>> > Raghavendra Talur <<a href="mailto:rtalur@redhat.com" target="_blank">rtalur@redhat.com</a>> schrieb am Mi., 24. Mai 2017,<br>
>>>> > 19:30:<br>
>>>> >><br>
>>>> >> On Wed, May 24, 2017 at 4:08 PM, Christopher Schmidt<br>
>>>> >> <<a href="mailto:fakod666@gmail.com" target="_blank">fakod666@gmail.com</a>><br>
>>>> >> wrote:<br>
>>>> >> ><br>
>>>> >> ><br>
>>>> >> > Vijay Bellur <<a href="mailto:vbellur@redhat.com" target="_blank">vbellur@redhat.com</a>> schrieb am Mi., 24. Mai 2017 um<br>
>>>> >> > 05:53<br>
>>>> >> > Uhr:<br>
>>>> >> >><br>
>>>> >> >> On Tue, May 23, 2017 at 1:39 AM, Christopher Schmidt<br>
>>>> >> >> <<a href="mailto:fakod666@gmail.com" target="_blank">fakod666@gmail.com</a>><br>
>>>> >> >> wrote:<br>
>>>> >> >>><br>
>>>> >> >>> OK, seems that this works now.<br>
>>>> >> >>><br>
>>>> >> >>> A couple of questions:<br>
>>>> >> >>> - What do you think, are all these options necessary for Kafka?<br>
>>>> >> >><br>
>>>> >> >><br>
>>>> >> >> I am not entirely certain what subset of options will make it work<br>
>>>> >> >> as I<br>
>>>> >> >> do<br>
>>>> >> >> not understand the nature of failure with Kafka and the default<br>
>>>> >> >> gluster<br>
>>>> >> >> configuration. It certainly needs further analysis to identify the<br>
>>>> >> >> list<br>
>>>> >> >> of<br>
>>>> >> >> options necessary. Would it be possible for you to enable one<br>
>>>> >> >> option<br>
>>>> >> >> after<br>
>>>> >> >> the other and determine the configuration that ?<br>
>>>> >> >><br>
>>>> >> >><br>
>>>> >> >>><br>
>>>> >> >>> - You wrote that there have to be kind of application profiles.<br>
>>>> >> >>> So to<br>
>>>> >> >>> find out, which set of options work is currently a matter of<br>
>>>> >> >>> testing<br>
>>>> >> >>> (and<br>
>>>> >> >>> hope)? Or are there any experiences for MongoDB / ProstgreSQL /<br>
>>>> >> >>> Zookeeper<br>
>>>> >> >>> etc.?<br>
>>>> >> >><br>
>>>> >> >><br>
>>>> >> >> Application profiles are work in progress. We have a few that are<br>
>>>> >> >> focused<br>
>>>> >> >> on use cases like VM storage, block storage etc. at the moment.<br>
>>>> >> >><br>
>>>> >> >>><br>
>>>> >> >>> - I am using Heketi and Dynamik Storage Provisioning together<br>
>>>> >> >>> with<br>
>>>> >> >>> Kubernetes. Can I set this volume options somehow by default or<br>
>>>> >> >>> by<br>
>>>> >> >>> volume<br>
>>>> >> >>> plugin?<br>
>>>> >> >><br>
>>>> >> >><br>
>>>> >> >><br>
>>>> >> >> Adding Raghavendra and Michael to help address this query.<br>
>>>> >> ><br>
>>>> >> ><br>
>>>> >> > For me it would be sufficient to disable some (or all) translators,<br>
>>>> >> > for<br>
>>>> >> > all<br>
>>>> >> > volumes that'll be created, somewhere here:<br>
>>>> >> > <a href="https://github.com/gluster/gluster-containers/tree/master/CentOS" rel="noreferrer" target="_blank">https://github.com/gluster/gluster-containers/tree/master/CentOS</a><br>
>>>> >> > This is the container used by the GlusterFS DaemonSet for<br>
>>>> >> > Kubernetes.<br>
>>>> >><br>
>>>> >> Work is in progress to give such option at volume plugin level. We<br>
>>>> >> currently have a patch[1] in review for Heketi that allows users to<br>
>>>> >> set Gluster options using heketi-cli instead of going into a Gluster<br>
>>>> >> pod. Once this is in, we can add options in storage-class of<br>
>>>> >> Kubernetes that pass down Gluster options for every volume created in<br>
>>>> >> that storage-class.<br>
>>>> >><br>
>>>> >> [1] <a href="https://github.com/heketi/heketi/pull/751" rel="noreferrer" target="_blank">https://github.com/heketi/heketi/pull/751</a><br>
>>>> >><br>
>>>> >> Thanks,<br>
>>>> >> Raghavendra Talur<br>
>>>> >><br>
>>>> >> ><br>
>>>> >> >><br>
>>>> >> >><br>
>>>> >> >> -Vijay<br>
>>>> >> >><br>
>>>> >> >><br>
>>>> >> >><br>
>>>> >> >>><br>
>>>> >> >>><br>
>>>> >> >>> Thanks for you help... really appreciated.. Christopher<br>
>>>> >> >>><br>
>>>> >> >>> Vijay Bellur <<a href="mailto:vbellur@redhat.com" target="_blank">vbellur@redhat.com</a>> schrieb am Mo., 22. Mai 2017 um<br>
>>>> >> >>> 16:41<br>
>>>> >> >>> Uhr:<br>
>>>> >> >>>><br>
>>>> >> >>>> Looks like a problem with caching. Can you please try by<br>
>>>> >> >>>> disabling<br>
>>>> >> >>>> all<br>
>>>> >> >>>> performance translators? The following configuration commands<br>
>>>> >> >>>> would<br>
>>>> >> >>>> disable<br>
>>>> >> >>>> performance translators in the gluster client stack:<br>
>>>> >> >>>><br>
>>>> >> >>>> gluster volume set <volname> performance.quick-read off<br>
>>>> >> >>>> gluster volume set <volname> performance.io-cache off<br>
>>>> >> >>>> gluster volume set <volname> performance.write-behind off<br>
>>>> >> >>>> gluster volume set <volname> performance.stat-prefetch off<br>
>>>> >> >>>> gluster volume set <volname> performance.read-ahead off<br>
>>>> >> >>>> gluster volume set <volname> performance.readdir-ahead off<br>
>>>> >> >>>> gluster volume set <volname> performance.open-behind off<br>
>>>> >> >>>> gluster volume set <volname> performance.client-io-threads off<br>
>>>> >> >>>><br>
>>>> >> >>>> Thanks,<br>
>>>> >> >>>> Vijay<br>
>>>> >> >>>><br>
>>>> >> >>>><br>
>>>> >> >>>><br>
>>>> >> >>>> On Mon, May 22, 2017 at 9:46 AM, Christopher Schmidt<br>
>>>> >> >>>> <<a href="mailto:fakod666@gmail.com" target="_blank">fakod666@gmail.com</a>> wrote:<br>
>>>> >> >>>>><br>
>>>> >> >>>>> Hi all,<br>
>>>> >> >>>>><br>
>>>> >> >>>>> has anyone ever successfully deployed a Kafka (Cluster) on<br>
>>>> >> >>>>> GlusterFS<br>
>>>> >> >>>>> volumes?<br>
>>>> >> >>>>><br>
>>>> >> >>>>> I my case it's a Kafka Kubernetes-StatefulSet and a Heketi<br>
>>>> >> >>>>> GlusterFS.<br>
>>>> >> >>>>> Needless to say that I am getting a lot of filesystem related<br>
>>>> >> >>>>> exceptions like this one:<br>
>>>> >> >>>>><br>
>>>> >> >>>>> Failed to read `log header` from file channel<br>
>>>> >> >>>>> `sun.nio.ch.FileChannelImpl@67afa54a`. Expected to read 12<br>
>>>> >> >>>>> bytes,<br>
>>>> >> >>>>> but<br>
>>>> >> >>>>> reached end of file after reading 0 bytes. Started read from<br>
>>>> >> >>>>> position<br>
>>>> >> >>>>> 123065680.<br>
>>>> >> >>>>><br>
>>>> >> >>>>> I limited the amount of exceptions with the<br>
>>>> >> >>>>> log.flush.interval.messages=1 option, but not all...<br>
>>>> >> >>>>><br>
>>>> >> >>>>> best Christopher<br>
>>>> >> >>>>><br>
>>>> >> >>>>><br>
>>>> >> >>>>> _______________________________________________<br>
>>>> >> >>>>> Gluster-users mailing list<br>
>>>> >> >>>>> <a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
>>>> >> >>>>> <a href="http://lists.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://lists.gluster.org/mailman/listinfo/gluster-users</a><br>
>>>> >> >>>><br>
>>>> >> >>>><br>
>>>> >> ><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Cheers,<br>
>>> Humble<br>
>>><br>
>>> Sr.Software Engineer - Red Hat Storage Engineering<br>
>>> website: <a href="http://humblec.com" rel="noreferrer" target="_blank">http://humblec.com</a><br>
><br>
><br>
> --<br>
> Sent from my Android device with K-9 Mail. Please excuse my brevity.<br>
><br>
> _______________________________________________<br>
> Gluster-users mailing list<br>
> <a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
> <a href="http://lists.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://lists.gluster.org/mailman/listinfo/gluster-users</a><br>
</blockquote></div>