[Maintain-dev] [JIRA] Commented: (MNT-1347) Batch Host Move -
Moving hosts from static range to dynamic that share a subnet
results in error
Brandon Philips (JIRA)
jira at osuosl.org
Fri Apr 15 09:41:46 PDT 2005
[ http://bugs.osuosl.org/browse/MNT-1347?page=comments#action_10552 ]
Brandon Philips commented on MNT-1347:
--------------------------------------
--- docs/range.php 2004-08-08 16:29:59.000000000 -0700
+++ /home/philips/public_html/maintain/docs/range.php 2005-04-15 09:38:57.000000000 -0700
@@ -695,48 +695,6 @@
}
- /*
- check to see if we are duplicating any mac addresses
- */
-
- //get all the dst range siblings (all ranges in the same subnet)
- $dst_ranges = $dst_range_obj->get_sibling_ranges();
-
- //get the hosts in the source range
- $src_hosts = $src_range_obj->get_range_hosts();
-
- //recurse through all the hosts!
- foreach ($src_hosts as $src_host) {
-
- $sql = "SELECT * FROM host WHERE ha='$src_host->ha' AND (";
-
- //add dynamic_range = '' or ip >= '' and <= '' to sql statement
- foreach ($dst_ranges as $temp_range) {
- if ($temp_range->type == 'static') {
- if (substr_count($sql, "ip") OR substr_count($sql,"range") ) { $sql .= " OR ( ip<='". $temp_range->end->ip_int ."' AND ip>='" . $temp_range->start->ip_int ."' ) "; }
- else { $sql .= " ( ip<='" . $temp_range->end->ip_int ."' AND ip>='" . $temp_range->start->ip_int ."' ) "; }
- }
- elseif ($temp_range->type == 'dynamic' OR $temp_range->type == 'ddns') {
- if (substr_count($sql, "ip") OR substr_count($sql,"range") ) { $sql .= " OR dynamic_range='" . $temp_range->id ."' "; }
- else { $sql .= " dynamic_range='" . $temp_range->id ."' "; }
- }
-
- } //recurse through ranges
-
- //exclude ha's with 000000000000
- $sql .= " ) AND ha!='000000000000'";
-
- $db_results = mysql_query($sql, $conf['dbh']);
-
- if ($r = mysql_fetch_row($db_results)) {
- $conf['error']->add_error('dst_range',"Duplicate Hardware Address found [" . $src_host->ha ."] (".$src_host->ip->ip_addr.")");
- }
-
-
- } //recurse through hosts
-
-
-
//if an error has occured return to the show
if ($conf['error']->error_state) {
$action = "show_batch_move";
@@ -866,7 +824,7 @@
} //end else
- $conf['ui']->display_confirmation("Hosts Moved", "All Hosts moved to new Range....", $conf['web_path'] . "/admin.php");
+ $conf['ui']->display_confirmation("Hosts Moved", "All Hosts moved to new Range.", $conf['web_path'] . "/admin.php");
} // batch_move
> Batch Host Move - Moving hosts from static range to dynamic that share a subnet results in error
> -------------------------------------------------------------------------------------------------
>
> Key: MNT-1347
> URL: http://bugs.osuosl.org/browse/MNT-1347
> Project: Maintain
> Type: Bug
> Reporter: Brandon Philips
> Assignee: Brandon Philips
> Priority: Urgent
>
>
> Admin -> Batch Host Move
> Duplicate Hardware Address found [080009b4b557] (140.211.17.203)
> Duplicate Hardware Address found [0001e6af334f] (140.211.17.197)
> Duplicate Hardware Address found [080009d894a1] (140.211.17.196)
> Duplicate Hardware Address found [0030c1c3953a] (140.211.17.195)
> Duplicate Hardware Address found [0000850a3d7e] (140.211.17.194)
--
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