[ClusterLabs] Pacemaker: Custom Health Checks possible?

2015-09-23 Thread Sebish

Dear all on clusterlabs mailing list,

there remains a question, even google could not deliver the answer for:

 * *Does Pacemaker + Heartbeat 2 / Corosync  (/openAIS) provide the
   possibility to use custom health checks?*
 * *Which part of the constellation must it be added to?*

Especially I need to be able to integrate a health check for a SIP Proxy 
(Kamailio) and perhaps openHAB.
SIP: Trying to establish call, getting ACK (or correct answer) back -> 
Check okay || No or false answer -> Check failed.



I am googling this for days, read papers, but did not find an answer.


Thanks for your interest and time!

Have a nice day
Sebish
___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Antw: Need bash instead of /bin/sh

2015-09-23 Thread dan
ons 2015-09-23 klockan 14:08 +0200 skrev Ulrich Windl:
> >>> dan  schrieb am 23.09.2015 um 13:39 in 
> >>> Nachricht
> <1443008370.2386.8.ca...@intraphone.com>:
> > Hi
> > 
> > As I had problem with corosync 2.3.3 and pacemaker 1.1.10 which was
> > default in my version of ubuntu, I have now compiled and installed
> > corosync 2.3.4 and pacemaker 1.1.12.
> > 
> > And now it works.
> > 
> > Though the file /usr/lib/ocf/resource.d/pacemaker/controld
> > does not work as /bin/sh is linked to dash on ubuntu (and I think
> > several other Linux variants).
> > 
> > It is line 182:
> > local addr_list=$(cat 
> > /sys/kernel/config/dlm/cluster/comms/*/addr_list 2>/dev/null)
> 
> That looks like plain POSIX shell to me. What part is causing the problem?

Did a small test:
---test.sh
controld_start() {
local addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)
echo $addr_list
}

controld_start
--

dash test.sh
test.sh: 2: local: 10.1.1.1: bad variable name

bash test.sh
AF_INET 10.1.1.1 AF_INET 10.1.1.2


Dan


___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Antw: Re: Antw: Need bash instead of /bin/sh

2015-09-23 Thread dan
ons 2015-09-23 klockan 15:20 +0200 skrev Ulrich Windl:
> >>> dan  schrieb am 23.09.2015 um 14:42 in 
> >>> Nachricht
> <1443012134.2386.11.ca...@intraphone.com>:
> > ons 2015-09-23 klockan 14:08 +0200 skrev Ulrich Windl:
> >> >>> dan  schrieb am 23.09.2015 um 13:39 in 
> > Nachricht
> >> <1443008370.2386.8.ca...@intraphone.com>:
> >> > Hi
> >> > 
> >> > As I had problem with corosync 2.3.3 and pacemaker 1.1.10 which was
> >> > default in my version of ubuntu, I have now compiled and installed
> >> > corosync 2.3.4 and pacemaker 1.1.12.
> >> > 
> >> > And now it works.
> >> > 
> >> > Though the file /usr/lib/ocf/resource.d/pacemaker/controld
> >> > does not work as /bin/sh is linked to dash on ubuntu (and I think
> >> > several other Linux variants).
> >> > 
> >> > It is line 182:
> >> > local addr_list=$(cat 
> >> > /sys/kernel/config/dlm/cluster/comms/*/addr_list 2>/dev/null)
> >> 
> >> That looks like plain POSIX shell to me. What part is causing the problem?
> > 
> > Did a small test:
> > ---test.sh
> > controld_start() {
> > local addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)
> 
> I see: Dash needs quoting aound "$(...)" it seems.

I tested that and now my test script works fine.

> 
> > echo $addr_list
> > }
> > 
> > controld_start
> > --
> > 
> > dash test.sh
> > test.sh: 2: local: 10.1.1.1: bad variable name
> > 
> > bash test.sh
> > AF_INET 10.1.1.1 AF_INET 10.1.1.2
> > 
> > 
> > Dan
> > 
> > 
> > ___
> > Users mailing list: Users@clusterlabs.org 
> > http://clusterlabs.org/mailman/listinfo/users 
> > 
> > Project Home: http://www.clusterlabs.org 
> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf 
> > Bugs: http://bugs.clusterlabs.org 
> 
> 
> 
> 
> 
> ___
> Users mailing list: Users@clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org



___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Antw: Need bash instead of /bin/sh

2015-09-23 Thread Vladislav Bogdanov

23.09.2015 15:42, dan wrote:

ons 2015-09-23 klockan 14:08 +0200 skrev Ulrich Windl:

dan  schrieb am 23.09.2015 um 13:39 in Nachricht

<1443008370.2386.8.ca...@intraphone.com>:

Hi

As I had problem with corosync 2.3.3 and pacemaker 1.1.10 which was
default in my version of ubuntu, I have now compiled and installed
corosync 2.3.4 and pacemaker 1.1.12.

And now it works.

Though the file /usr/lib/ocf/resource.d/pacemaker/controld
does not work as /bin/sh is linked to dash on ubuntu (and I think
several other Linux variants).

It is line 182:
 local addr_list=$(cat
/sys/kernel/config/dlm/cluster/comms/*/addr_list 2>/dev/null)


That looks like plain POSIX shell to me. What part is causing the problem?


Did a small test:
---test.sh
controld_start() {
 local addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)

yep, that is a bashism.

posix shell denies assignment of local variables in the declaration.

local addr_list; addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)

should work


 echo $addr_list
}

controld_start
--

dash test.sh
test.sh: 2: local: 10.1.1.1: bad variable name

bash test.sh
AF_INET 10.1.1.1 AF_INET 10.1.1.2


 Dan


___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org




___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Pacemaker: Custom Health Checks possible?

2015-09-23 Thread Kai Dupke
On 09/23/2015 02:10 PM, Sebish wrote:
>  * *Does Pacemaker + Heartbeat 2 / Corosync  (/openAIS) provide the
>possibility to use custom health checks?*

Yes: write a resource agent for this.

However, there is a possibility to use Nagios/Icinga probes, which are
available for a wide range of scenarios. Not sure if something for SIP
is part of this.

Kai Dupke
Senior Product Manager
Server Product Line
-- 
Sell not virtue to purchase wealth, nor liberty to purchase power.
Phone:  +49-(0)5102-9310828 Mail: kdu...@suse.com
Mobile: +49-(0)173-5876766  WWW:  www.suse.com

SUSE Linux GmbH - Maxfeldstr. 5 - 90409 Nuernberg (Germany)
GF:Felix Imendörffer,Jane Smithard,Graham Norton,HRB 21284 (AG Nürnberg)

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


[ClusterLabs] Need bash instead of /bin/sh

2015-09-23 Thread dan
Hi

As I had problem with corosync 2.3.3 and pacemaker 1.1.10 which was
default in my version of ubuntu, I have now compiled and installed
corosync 2.3.4 and pacemaker 1.1.12.

And now it works.

Though the file /usr/lib/ocf/resource.d/pacemaker/controld
does not work as /bin/sh is linked to dash on ubuntu (and I think
several other Linux variants).

It is line 182:
local addr_list=$(cat 
/sys/kernel/config/dlm/cluster/comms/*/addr_list 2>/dev/null)

that does not work in ubuntu's version of dash.

I fixed it by changing so /bin/bash is used instead of /bin/sh (on line
1 of the script).

The current version in git looks like it has the same problem.

Maybe you should switch to /bin/bash for scripts that need it as not
everybody have /bin/sh linked to /bin/bash.

   Dan



___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Pacemaker: Custom Health Checks possible?

2015-09-23 Thread Michael Schwartzkopff
Am Mittwoch, 23. September 2015, 14:10:52 schrieb Sebish:
> Dear all on clusterlabs mailing list,
> 
> there remains a question, even google could not deliver the answer for:
> 
>   * *Does Pacemaker + Heartbeat 2 / Corosync  (/openAIS) provide the
> possibility to use custom health checks?*

Yes.

>   * *Which part of the constellation must it be added to?*

Add your health check as a normal resource.

> Especially I need to be able to integrate a health check for a SIP Proxy
> (Kamailio) and perhaps openHAB.

Stop. That sounds like a monitoring task of a resource. You have to add this 
checks to the monitoring part of the SIP Proxy and / or openHA.


> SIP: Trying to establish call, getting ACK (or correct answer) back ->
> Check okay || No or false answer -> Check failed.

Basically:
Health checks are for testing the health or a cluster node, i.e. CPU load, 
free space on a partition or something like that.
If you want to check a resource (application) then you have to improve the 
monitoring function of the according Resource Agent.


Mit freundlichen Grüßen,

Michael Schwartzkopff

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64, +49 (162) 165 0044
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein

signature.asc
Description: This is a digitally signed message part.
___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] [Linux-HA] Cluster for HA VM's serving our local network

2015-09-23 Thread Digimer
Hi Juergen,

  First; This list is deprecated and you should use the Cluster Labs -
Users list (which I've cc'ed here).

  Second; That tutorial is quite old and was replaced a while ago with
this one: https://alteeve.ca/w/AN!Cluster_Tutorial_2. It has a lot of
improvements we made after having many systems out in the field, so it
is well worth re-doing your setup to match it. It's mostly the same, so
it shouldn't be a big job.

  I'll address your comments in-line:

On 23/09/15 08:38 AM, J. Echter wrote:
> Hi,
> 
> i was using this guide
> https://alteeve.ca/w/2-Node_Red_Hat_KVM_Cluster_Tutorial_-_Archive to
> set up my cluster for some services, all works pretty good.
> 
> I decided to use this cluster as a HA vm provider for my network.
> 
> I have a little, maybe silly, question.
> 
> The guide tells me to disable qemu default network, like this:
> 
>>
>>   Disable the 'qemu' Bridge
>>
>> By default, libvirtd  creates a bridge
>> called virbr0 designed to connect virtual machines to the first eth0
>> interface. Our system will not need this, so we will remove it now.
>>
>> If libvirtd has started, skip to the next step. If you haven't started
>> libvirtd yet, you can manually disable the bridge by blanking out the
>> config file.
>>
>> cat  /dev/null>/etc/libvirt/qemu/networks/default.xml
> i skipped the step to create the bridge device, as it was not needed for
> my belongings.

OK.

>> vim  /etc/sysconfig/network-scripts/ifcfg-vbr2
>> # Internet-Facing Network - Bridge
>> DEVICE="vbr2"
>> TYPE="Bridge"
>> BOOTPROTO="static"
>> IPADDR="10.255.0.1"
>> NETMASK="255.255.0.0"
>> GATEWAY="10.255.255.254"
>> DNS1="8.8.8.8"
>> DNS2="8.8.4.4"
>> DEFROUTE="yes"
> 
> 
> Now i want to know how to proceed?
> 
> i have bond0 - connected to my network (both nodes got different ip's
> from my dhcp)
> bond1 & bond2 are used for corosync and drbd.
> 
> what would be the best decision to have some vm's served from this
> 2-node cluster too?

>From a bridging perspective, the quoted example config above is good.
The default libvirtd bridge is a NAT'ed bridge, so your VMs would get
IPs in the 192.168.122.0/24 subnet, and the libvirtd bridge would route
them to the outside world. Using the bridge type in the tutorial though,
your VMs would appear to be directly on your network and would get (or
you would assign) IPs just the same as the rest of your system.

> thanks, and please tell me what infos i may have forgotten to provide
> for you. :)
> 
> cheers
> 
> juergen

-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


[ClusterLabs] Antw: Re: Antw: Need bash instead of /bin/sh

2015-09-23 Thread Ulrich Windl
>>> Vladislav Bogdanov  schrieb am 23.09.2015 um 15:24 in
Nachricht <5602a808.1090...@hoster-ok.com>:
> 23.09.2015 15:42, dan wrote:
>> ons 2015-09-23 klockan 14:08 +0200 skrev Ulrich Windl:
>> dan  schrieb am 23.09.2015 um 13:39 in 
>> Nachricht
>>> <1443008370.2386.8.ca...@intraphone.com>:
 Hi

 As I had problem with corosync 2.3.3 and pacemaker 1.1.10 which was
 default in my version of ubuntu, I have now compiled and installed
 corosync 2.3.4 and pacemaker 1.1.12.

 And now it works.

 Though the file /usr/lib/ocf/resource.d/pacemaker/controld
 does not work as /bin/sh is linked to dash on ubuntu (and I think
 several other Linux variants).

 It is line 182:
  local addr_list=$(cat
 /sys/kernel/config/dlm/cluster/comms/*/addr_list 2>/dev/null)
>>>
>>> That looks like plain POSIX shell to me. What part is causing the problem?
>>
>> Did a small test:
>> ---test.sh
>> controld_start() {
>>  local addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)
> yep, that is a bashism.
> 
> posix shell denies assignment of local variables in the declaration.

In times of BASH it's hard to get POSIX shell documentation. The last we had 
was from HP-UX. But the problem seems to be more $() than assignment it seems.

> 
> local addr_list; addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)
> 
> should work
> 
>>  echo $addr_list
>> }
>>
>> controld_start
>> --
>>
>> dash test.sh
>> test.sh: 2: local: 10.1.1.1: bad variable name
>>
>> bash test.sh
>> AF_INET 10.1.1.1 AF_INET 10.1.1.2
>>
>>
>>  Dan
>>
>>
>> ___
>> Users mailing list: Users@clusterlabs.org 
>> http://clusterlabs.org/mailman/listinfo/users 
>>
>> Project Home: http://www.clusterlabs.org 
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf 
>> Bugs: http://bugs.clusterlabs.org 
>>
> 
> 
> ___
> Users mailing list: Users@clusterlabs.org 
> http://clusterlabs.org/mailman/listinfo/users 
> 
> Project Home: http://www.clusterlabs.org 
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf 
> Bugs: http://bugs.clusterlabs.org 





___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Antw: Re: Antw: Need bash instead of /bin/sh

2015-09-23 Thread Ken Gaillot
On 09/23/2015 08:38 AM, Ulrich Windl wrote:
 Vladislav Bogdanov  schrieb am 23.09.2015 um 15:24 in
> Nachricht <5602a808.1090...@hoster-ok.com>:
>> 23.09.2015 15:42, dan wrote:
>>> ons 2015-09-23 klockan 14:08 +0200 skrev Ulrich Windl:
>>> dan  schrieb am 23.09.2015 um 13:39 in 
>>> Nachricht
 <1443008370.2386.8.ca...@intraphone.com>:
> Hi
>
> As I had problem with corosync 2.3.3 and pacemaker 1.1.10 which was
> default in my version of ubuntu, I have now compiled and installed
> corosync 2.3.4 and pacemaker 1.1.12.
>
> And now it works.
>
> Though the file /usr/lib/ocf/resource.d/pacemaker/controld
> does not work as /bin/sh is linked to dash on ubuntu (and I think
> several other Linux variants).
>
> It is line 182:
>  local addr_list=$(cat
> /sys/kernel/config/dlm/cluster/comms/*/addr_list 2>/dev/null)

 That looks like plain POSIX shell to me. What part is causing the problem?
>>>
>>> Did a small test:
>>> ---test.sh
>>> controld_start() {
>>>  local addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)
>> yep, that is a bashism.
>>
>> posix shell denies assignment of local variables in the declaration.
> 
> In times of BASH it's hard to get POSIX shell documentation. The last we had 
> was from HP-UX. But the problem seems to be more $() than assignment it seems.

Good catch, thanks. I'll submit a patch upstream.

>>
>> local addr_list; addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)
>>
>> should work
>>
>>>  echo $addr_list
>>> }
>>>
>>> controld_start
>>> --
>>>
>>> dash test.sh
>>> test.sh: 2: local: 10.1.1.1: bad variable name
>>>
>>> bash test.sh
>>> AF_INET 10.1.1.1 AF_INET 10.1.1.2
>>>
>>>
>>>  Dan
=

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] [Linux-HA] Cluster for HA VM's serving our local network

2015-09-23 Thread Digimer
On 23/09/15 10:23 AM, J. Echter wrote:
> Hi Digimer,
> 
> Am 23.09.2015 um 15:38 schrieb Digimer:
>> Hi Juergen,
>>
>>First; This list is deprecated and you should use the Cluster Labs -
>> Users list (which I've cc'ed here).
> 
> i already got that reminder as i sent my message, and i subscribed :)

I'm switching the thread to there then.

>>Second; That tutorial is quite old and was replaced a while ago with
>> this one: https://alteeve.ca/w/AN!Cluster_Tutorial_2. It has a lot of
>> improvements we made after having many systems out in the field, so it
>> is well worth re-doing your setup to match it. It's mostly the same, so
>> it shouldn't be a big job.
> 
> i'll have a look over the new one.

The main change, relative to this discussion, is more descriptive
interface names.

>>I'll address your comments in-line:
>>
>> On 23/09/15 08:38 AM, J. Echter wrote:
>>> Hi,
>>>
>>> i was using this guide
>>> https://alteeve.ca/w/2-Node_Red_Hat_KVM_Cluster_Tutorial_-_Archive to
>>> set up my cluster for some services, all works pretty good.
>>>
>>> I decided to use this cluster as a HA vm provider for my network.
>>>
>>> I have a little, maybe silly, question.
>>>
>>> The guide tells me to disable qemu default network, like this:
>>>
Disable the 'qemu' Bridge

 By default, libvirtd  creates a bridge
 called virbr0 designed to connect virtual machines to the first eth0
 interface. Our system will not need this, so we will remove it now.

 If libvirtd has started, skip to the next step. If you haven't started
 libvirtd yet, you can manually disable the bridge by blanking out the
 config file.

 cat  /dev/null>/etc/libvirt/qemu/networks/default.xml
>>> i skipped the step to create the bridge device, as it was not needed for
>>> my belongings.
>> OK.
>>
 vim  /etc/sysconfig/network-scripts/ifcfg-vbr2
 # Internet-Facing Network - Bridge
 DEVICE="vbr2"
 TYPE="Bridge"
 BOOTPROTO="static"
 IPADDR="10.255.0.1"
 NETMASK="255.255.0.0"
 GATEWAY="10.255.255.254"
 DNS1="8.8.8.8"
 DNS2="8.8.4.4"
 DEFROUTE="yes"
>>>
>>> Now i want to know how to proceed?
>>>
>>> i have bond0 - connected to my network (both nodes got different ip's
>>> from my dhcp)
>>> bond1 & bond2 are used for corosync and drbd.
>>>
>>> what would be the best decision to have some vm's served from this
>>> 2-node cluster too?
>>  From a bridging perspective, the quoted example config above is good.
>> The default libvirtd bridge is a NAT'ed bridge, so your VMs would get
>> IPs in the 192.168.122.0/24 subnet, and the libvirtd bridge would route
>> them to the outside world. Using the bridge type in the tutorial though,
>> your VMs would appear to be directly on your network and would get (or
>> you would assign) IPs just the same as the rest of your system.
> 
> so i can just use this example on my setup?
> 
> bond0 = LAN = 192.168.0.0/24

This is the BCN, and is usually on 10.20.0.0/16

> bridge = 10.255.0.1

The bridge is on the IFN, which in the tutorial is on 10.255.0.0/16, so
yes. Note that the IP assigned to the bridge has no bearing at all on
the IPs set in the VMs.

> can i use my own dns server, working on the lan?
> 
> like this:
> 
> DEVICE="vbr2"
> TYPE="Bridge"
> BOOTPROTO="static"
> IPADDR="10.255.0.1"
> NETMASK="255.255.0.0"
> GATEWAY="10.255.255.254"
> DNS1="192.168.0.1"
> DEFROUTE="yes"

Sure. With this style of bridging, it's like you VMs are plugged
directly into the physical switch. What you do on the node has no
bearing. The only thing is that you move the IP assignment for the node
out of the bond and into the bridge. In fact, you can assign no IP to
the bridge and traffic from the VMs will route fine.

So think of this bridge as being like a regular hardware switch that the
VMs plug into and that the node itself plugs into, and the bond as the
"cable" linking the vritual switch to the hardware switch. When you
think of it like that, you can see how the setup of the node has no
bearing on anything else.

>>> thanks, and please tell me what infos i may have forgotten to provide
>>> for you. :)
>>>
>>> cheers
>>>
>>> juergen
> thanks for your support.
> 
> cheers
> ___
> Linux-HA mailing list is closing down.
> Please subscribe to users@clusterlabs.org instead.
> http://clusterlabs.org/mailman/listinfo/users
> ___
> linux...@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha


-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: 

Re: [ClusterLabs] Need bash instead of /bin/sh

2015-09-23 Thread Jan Pokorný
On 23/09/15 15:38 +0200, Ulrich Windl wrote:
 Vladislav Bogdanov  schrieb am 23.09.2015 um 15:24
>> 23.09.2015 15:42, dan wrote:
>>> Did a small test:
>>> ---test.sh
>>> controld_start() {
>>>  local addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)
>> yep, that is a bashism.
>> 
>> posix shell denies assignment of local variables in the declaration.

This is supported by checkbashisms's finding (v2.15.5):

$ checkbashisms -p test.sh 
> script test.sh does not appear to have a #! interpreter line;
> you may get strange results
> possible bashism in test.sh line 2 (local foo=bar):
> local addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)

> In times of BASH it's hard to get POSIX shell documentation.

Oh, really?

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html

It doesn't seem to recognize the concept of "local" declaration,
though.

> The last we had was from HP-UX. But the problem seems to be more $()
> than assignment it seems.

That documentation recognizes $() form.

-- 
Jan (Poki)


pgp_suhcPtwYj.pgp
Description: PGP signature
___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org