[Maintain-dev] [JIRA] Created: (MNT-1372) dynamic hosts that are disabled get into build file anyway

Kirsten Petersen (JIRA) jira at osuosl.org
Tue Aug 30 13:05:07 PDT 2005


dynamic hosts that are disabled get into build file anyway
----------------------------------------------------------

         Key: MNT-1372
         URL: http://bugs.osuosl.org/browse/MNT-1372
     Project: Maintain
        Type: Bug
  Components: Build Scripts  
    Versions: 2.4.0    
    Reporter: Kirsten Petersen
 Assigned to: Danny Robert 


The sql query for dynamic hosts in build-dhcp doesn't specify that they should be enabled hosts.  I have a patch for this below.  Also, in this patch I removed a sql query that doesn't seem to get used anywhere, which is kind of confusing.  You might want to double-check me, but I don't see $global_ha_sth being used anywhere in the dhcp build script or elsewhere.


--- build-dhcp  2005-03-04 11:48:46.000000000 -0800
+++ build-dhcp.new      2005-08-30 13:00:44.000000000 -0700
@@ -63,7 +63,7 @@
 $sql = qq{SELECT id FROM host WHERE ip >= ? AND ip <= ?};
 my $host_range_sth = $maintain->{_dbh}->prepare($sql);
 
-$sql = qq{SELECT ha FROM host where dynamic_range=? AND zone=?};
+$sql = qq{SELECT ha FROM host where dynamic_range=? AND zone=? and enabled=1};
 my $dynamic_ha_sth = $maintain->{_dbh}->prepare($sql);
 
 # setup $maintain->{_dhcp_options}
@@ -186,9 +186,6 @@
         print DATA "# end $zone->{name}\n";
 }
 
-$sql = qq{SELECT DISTINCT ha FROM host WHERE `enabled` =1 AND `ha` != '' AND `ha` != '000000000000' GROUP BY ha};
-my $global_ha_sth = $maintain->{_dbh}->prepare($sql);
-
 $sql = qq{SELECT id FROM subnet WHERE status='visible'};
 my $sth = $maintain->{_dbh}->prepare($sql);
 $sth->execute();


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://bugs.osuosl.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



More information about the Maintain-dev mailing list