Re: resource script vm.sh strange declare directive

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

 



Hi Lon,

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

On my FC13 box, the script is "correct"


Brem
2010/9/9 Lon Hohberger <lhh@xxxxxxxxxx>:
> 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@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/linux-cluster
>

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster



[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux