opensubscriber
   Find in this group all groups
 
Unknown more information…

o : oscar-devel@lists.sourceforge.net 13 November 2009 • 10:10PM -0500

[Oscar-devel] Can't delete node in v6.0.5svn9034
by Olivier LAHAYE

REPLY TO AUTHOR
 
REPLY TO GROUP







Hi,

Since 2 days I'm trying to find a bug in mksimachine -D oscarnode2 (systeminstaller-oscar-2.4.6-1)
Unfortunately, I don't know how to program in perl, and my perl knowledge is limited to what I've learned those last 48 hours.

I think that the bug is here:
/usr/bin/mksimachine:195
my @keys = map{$_->{primkey}} @machinelist;

Indeed,
p Dumper @machinelist gives:
$VAR1 = {
          'imagename' => 'oscarimage',
          'name' => 'oscarnode2',
          'hostname' => 'node2'
        };
and after running the line "my @keys = map{$_->{primkey}} @machinelist;"
@keys seems empty (no refs to oscarnode2 for example)

As I'm more that a newbee in perl, I don't understand the primkey. I doesn't look like a predefined variable name, although, some libs seems to use it as such...

p Dumper @keys gives nothing
p scalar @keys gives 0

p Dumper @machinelist[0]
$VAR1 = {
          'imagename' => 'oscarimage',
          'name' => 'oscarnode2',
          'hostname' => 'node2'
        };

p Dumper @machinelist[1]
$VAR1 = undef;

Thus, in /usr/lib/systeminstaller/SIS/NewDB.pm:354, the line below gives erroneous result
my @where = map { "$_='".$args{$_}."'" } keys(%args);
p @where
Nodes.=''
# instead of
# Nodes.name='oscarnode2'
p keys(%args)
Nodes.

So now, I'm stuck :'-(

The oscar database Nodes table contains:
mysql> select * from Nodes;
+------------+---------+-----------+--------------+------+---------------+-----------------------+----+----------+-----------+--------------+------+------+-------+---------+
| cluster_id | cpu_num | cpu_speed | dns_domain   | fqdn | group_name    | hostname              | id | image_id | installer | name         | ram  | swap | units | virtual |
+------------+---------+-----------+--------------+------+---------------+-----------------------+----+----------+-----------+--------------+------+------+-------+---------+
|          1 |    NULL | NULL      | intra.cea.fr | NULL | oscar_server  | is005760.intra.cea.fr |  1 |        0 | NULL      | oscar_server | NULL | NULL | NULL  | NULL    |
|          1 |    NULL | NULL      | NULL         | NULL | oscar_clients | node2                 |  5 |        6 | sis       | oscarnode2   | NULL | NULL | NULL  | NULL    |
|          1 |    NULL | NULL      | NULL         | NULL | oscar_clients | node1                 |  6 |        6 | sis       | oscarnode1   | NULL | NULL | NULL  | NULL    |
+------------+---------+-----------+--------------+------+---------------+-----------------------+----+----------+-----------+--------------+------+------+-------+---------+
3 rows in set (0.00 sec)

If a knowledged perl developper could help me on that point I would appreciate a lot.

Best regards.

Olivier.
--
Olivier LAHAYE
CEA Saclay
DRT-LIST-DETECS-SSTM

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Oscar-devel mailing list
Oscar-devel@list...
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

opensubscriber is not affiliated with the authors of this message nor responsible for its content.