[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Linux-cluster] resource script vm.sh strange declare directive

Hi Lon,

It did affect live migration. Once corrected  migration worked like a charm.

On my FC13 box, the script is "correct"

2010/9/9 Lon Hohberger <lhh redhat com>:
> On Tue, 2010-08-24 at 17:57 +0200, brem belguebli wrote:
>> Hi,
>> After not being able to live migrate cluster resource vm's from one
>> node to the other using clusvcadm, I've put some debug in vm.sh and it
>> allowed me to see a strange variable assignement that I do not
>> understand and that prevents live migration to occur.
>> Rhel 5.5 /usr/share/cluster/vm.sh at line  790
>> virsh_migrate()
>>               declare $target=$1 <-- strange
>> Rhel 5.4 in /usr/share/cluster/vm.sh at line 631
>> virsh_migrate()
>>               declare $target=$1 <-- Same declaration
>> For information, when removing the $ before target, live migration
>> works like a charm.
> It should work either way.  That variable assignment doesn't actually
> matter because of the way bash works.  The higher up function which
> calls virsh_migrate function declares $target (correctly) and passes it
> in as $1 to virsh_migrate.
> Because $target's scope is actually global (declare does not create a
> 'local' variable; it creates a global one; the 'local' keyword creates a
> 'local' variable), the fact that there is a syntax error should not
> matter in this case.
> So, you'll get a weird error if you run this from the console but it
> should not affect migration.
> -- Lon
> --
> Linux-cluster mailing list
> Linux-cluster redhat com
> https://www.redhat.com/mailman/listinfo/linux-cluster

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]