Hi,

I tried bugzilla #1778 RA and attached patch file. I will throw this
patch to bugzilla. In addition, migration is well working and I do not
need to fix.

2007/12/13, Dejan Muhamedagic <[EMAIL PROTECTED]>:
> Hi,
>
> On Thu, Dec 13, 2007 at 08:58:56AM +0900, DAIKI MATSUDA wrote:
> > Hi,
> >
> > 2007/12/13, Dejan Muhamedagic <[EMAIL PROTECTED]>:
> > > Hi,
> > >
> > > On Tue, Dec 11, 2007 at 06:45:48PM -0000, Rodrigo Borges Pereira wrote:
> > > > Hello,
> > > >
> > > > My Xen RA wasn't working as it should, due to the fact that it's
> > > > Xen_Status() function expects output differently.
> > > >
> > > > I've found on the changelog for 2.1.1 that the status function was 
> > > > updated
> > > > for newer Xen versions (Novell 250625).
> > > >
> > > > I had to revert that function back to a simple xm list $DOMAIN_NAME and
> > > > check rc.
> > >
> > > You may want to take a look for a newer Xen RA here:
> > >
> > > http://developerbugs.linux-foundation.org/show_bug.cgi?id=1778
> > >
> > > Testing for this RA is still pending. Perhaps you can lend a hand
> > > with it.
> > >
> > > Cheers,
> > >
> > > Dejan
> >
> > I also modified the Xen RA script without knowing the bug report id
> > 1778. So, may I post the merged script to the bugzilla ? Maybe
> > original does not work for migration.
>
> Yes, please attach it.
>
> > And I have a suggestion that to describe the primitive id domU name is
> > not good, domU name may be picked up from domU config xml file, like
> > following,
> > DOMAIN_NAME=`grep ^name $OCF_RESKEY_xmfile | head -1 | sed -e 's,=,
> > ,g' -e 's,",,g' | awk '{print $2}'`
>             ^^ it's also possible to use a single quote!

Sorry, it is already implemented to bugzilla's RA.

Regards
MATSUDA, Daiki

> Thanks,
>
> Dejan
>
> >
> > Best Reagards
> > MATSUDA, Daiki
> > _______________________________________________
> > Linux-HA mailing list
> > [email protected]
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
--- Xen	2007-12-13 09:24:30.000000000 +0900
+++ XenM	2007-12-17 09:59:59.000000000 +0900
@@ -40,7 +40,7 @@
 
 
 : ${OCF_RESKEY_xmfile=/etc/xen/vm/MyDomU}
-: ${OCF_RESKEY_allow_migration=0}
+: ${OCF_RESKEY_allow_migrate=0}
 : ${OCF_RESKEY_allow_mem_management=0}
 : ${OCF_RESKEY_reserved_Dom0_memory=512}
 DOMAIN_NAME=`awk '$1~/^name(=|$)/{print}' ${OCF_RESKEY_xmfile} | sed 's/.*=[[:space:]]*//' | tr -d "[\"']"`
@@ -213,9 +214,11 @@
     return $OCF_SUCCESS
   else
     Xen_Adjust_Memory 1
-    ocf_log info "New memory for virtual domains: ${NEWMEM}"
-    sed -i -e "/^memory=/ s/^memory=.*/memory=${NEWMEM}/" ${OCF_RESKEY_xmfile}
-    xm mem-set ${DOMAIN_NAME} ${NEWMEM} 
+    if [ "${OCF_RESKEY_allow_mem_management}" != 0 ];then
+      ocf_log info "New memory for virtual domains: ${NEWMEM}"
+      sed -i -e "/^memory=/ s/^memory=.*/memory=${NEWMEM}/" ${OCF_RESKEY_xmfile}
+      xm mem-set ${DOMAIN_NAME} ${NEWMEM} 
+    fi
     xm create ${OCF_RESKEY_xmfile} name=$DOMAIN_NAME
     rc=$?
     if
@@ -223,7 +226,9 @@
     then
       return $OCF_ERR_GENERIC
     else 
-      xm mem-set ${DOMAIN_NAME} ${NEWMEM}
+      if [ "${OCF_RESKEY_allow_mem_management}" != 0 ];then
+        xm mem-set ${DOMAIN_NAME} ${NEWMEM}
+      fi
       return $OCF_SUCCESS
     fi
   fi  
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to