<div dir="ltr">I think I have a pretty custom setup, so the IPaddr script is being run by hacluster (added a whoami echo and checked the logs to be sure).<div><br></div><div>Anyway, the passwordless sudo works around the problem :)!</div><div><br></div><div>Thanks,</div><div>Vincenzo.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-24 7:37 GMT+02:00 Andrew Beekhof <span dir="ltr">&lt;<a href="mailto:andrew@beekhof.net" target="_blank">andrew@beekhof.net</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; On 24 Oct 2014, at 3:13 am, Andrei Borzenkov &lt;<a href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; В Thu, 23 Oct 2014 17:51:24 +0200<br>
&gt; Vincenzo Pii &lt;<a href="mailto:piiv@zhaw.ch">piiv@zhaw.ch</a>&gt; пишет:<br>
&gt;<br>
</span><span class="">&gt;&gt; I am trying to run the IPaddr resource agent on an active/passive cluster<br>
&gt;&gt; on Illumos nodes (pacemaker, corosync, crm... built from updated sources).<br>
&gt;&gt;<br>
&gt;&gt; By reading the example from Saso here<br>
&gt;&gt; <a href="http://zfs-create.blogspot.ch/2013/06/building-zfs-storage-appliance-part-1.html" target="_blank">http://zfs-create.blogspot.ch/2013/06/building-zfs-storage-appliance-part-1.html</a>,<br>
&gt;&gt; this would seem straightforward and this makes me think that I am doing<br>
&gt;&gt; something wrong :)!<br>
&gt;&gt;<br>
&gt;&gt; I patched the IPaddr script to use /usr/bin/gnu/sh and to avoid finding a<br>
&gt;&gt; free interface with \&quot; grep &quot;^$NIC:[0-9]&quot; \&quot; as that is just not the case,<br>
&gt;&gt; but now I am stuck at trying to configure the ip address.<br>
&gt;&gt;<br>
&gt;&gt; This, in the script, is done with ifconfig (something like<br>
&gt;&gt;<br>
&gt;&gt;    ifconfig e1000g2 inet 10.0.100.4 &amp;&amp; ifconfig e1000g2 netmask<br>
&gt;&gt; 255.255.255.0 &amp;&amp; ifconfig e1000g2 up<br>
&gt;&gt;<br>
&gt;&gt; ).<br>
&gt;&gt;<br>
&gt;&gt; However, the script is run by the hacluster user, which cannot write<br>
&gt;&gt; network configuration settings.<br>
&gt;&gt;<br>
&gt;<br>
</span><span class="">&gt; Unless I&#39;m completely confused, resource scripts are launched by lrmd<br>
&gt; which runs as root.<br>
<br>
</span>Correct<br>
<span class=""><br>
&gt;<br>
&gt;&gt; To solve this problem, I am now looking at profiles, roles and<br>
&gt;&gt; authorizations, which seems to be a very &quot;user friendly&quot; way to handle<br>
&gt;&gt; permissions in Solaris.<br>
&gt;&gt;<br>
&gt;&gt; My question is: there is no mention of this in Saso&#39;s post, or other<br>
&gt;&gt; discussions (even thought old ones) that I&#39;ve come across today; am I<br>
&gt;&gt; missing something obvious, or this is just the way it has to be?<br>
&gt;&gt;<br>
&gt;&gt; This is how I configure the IPaddr prmitive:<br>
&gt;&gt;<br>
&gt;&gt; # ipadm create-if e1000g2<br>
&gt;&gt; # crm configure primitive frontend_IP ocf:heartbeat:IPaddr params<br>
&gt;&gt; ip=&quot;10.0.100.4&quot; cidr_netmask=&quot;255.255.255.0&quot; nic=&quot;e1000g2&quot;<br>
&gt;&gt;<br>
&gt;&gt; Many thanks,<br>
&gt;&gt; Vincenzo.<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
</span>&gt; _______________________________________________<br>
&gt; Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
&gt; <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
&gt;<br>
&gt; Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
&gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
&gt; Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Vincenzo Pii<br></div>Researcher, InIT Cloud Computing Lab<br>Zurich University of Applied Sciences (ZHAW)<br><a href="http://blog.zhaw.ch/icclab" style="color:rgb(17,85,204)" target="_blank">blog.zhaw.ch/icclab</a><br></div>
</div>