Changeset 62 for trunk/cgi-bin
- Timestamp:
- 11/11/04 16:27:28 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/consistency-check.pl
r11 r62 65 65 print " done.\n"; 66 66 67 print "Done checking master containment.\n\nChecking block-alignment consistency:\n"; 67 print "Done checking master containment.\n\nChecking pool containment:\n"; 68 69 $sth = $dbh->prepare("select pool,ip from poolips order by ip"); 70 $sth->execute; 71 while (@data = $sth->fetchrow_array) { 72 $pool = new NetAddr::IP $data[0]; 73 $ip = new NetAddr::IP $data[1]; 74 print "IP $ip listed with incorrect pool $pool\n" 75 if !$pool->contains($ip); 76 } 77 $sth = $dbh->prepare("select distinct pool from poolips order by pool"); 78 $sth->execute; 79 while (@data = $sth->fetchrow_array) { 80 $sth2 = $dbh->prepare("select cidr from allocations where cidr='$data[0]'"); 81 $sth2->execute; 82 print "Pool $data[0] does not exist in allocations table\n" 83 if (($sth2->fetchrow_array)[0] eq ''); 84 } 85 86 print "Done checking pool containment.\n\nChecking block-alignment consistency:\n"; 68 87 69 88 # Block alignment consistency: All allocated+free blocks within a master
Note:
See TracChangeset
for help on using the changeset viewer.