Package: openstack-cluster-installer
Version: 42.3.0~bpo12+1

When PXE booting a new node, on its first report there is an error in
the apache logs:

[Tue Oct 03 08:48:00.052212 2023] [php:error] [pid 83221] [client 
10.10.48.12:54344] PHP Fatal error:  Uncaught mysqli_sql_exception: Unknown 
column 'hwid' in 'field list' in 
/usr/share/openstack-cluster-installer/report.php:292\nStack trace:\n#0 
/usr/share/openstack-cluster-installer/report.php(292): mysqli_query()\n#1 
{main}\n  thrown in /usr/share/openstack-cluster-installer/report.php on line 
292

This appears to be due to an incorrect table name in an SQL statement.
Patch attached.

--

Regards
Jim
diff --git a/src/report.php b/src/report.php
index 6240fc36..1ade880a 100644
--- a/src/report.php
+++ b/src/report.php
@@ -289,7 +289,7 @@ if($n == 0){
                 if(!preg_match($reg_alpha, $blkdev_ctrl_product))          die("Block device controller product suspicious line ".__LINE__." file ".__FILE__);
                 if(!preg_match($reg_alpha, $blkdev_ctrl_ctrl_type))        die("Block device controller ctrl type suspicious line ".__LINE__." file ".__FILE__);
                 if(!preg_match($reg_int,   $blkdev_ctrl_firmware_version)) die("Block device controller fw version suspicious line ".__LINE__." file ".__FILE__);
-                $r = mysqli_query($con, "INSERT INTO physblockdevices (machine_id, hwid, vendor, product, ctrl_type, firmware_version) VALUES ('".$machine_id."', '".$blkdev_ctrl_hwid."', '".$blkdev_ctrl_vendor."', '".$blkdev_ctrl_product."', '".$blkdev_ctrl_ctrl_type."', '".$blkdev_ctrl_firmware_version."')");
+                $r = mysqli_query($con, "INSERT INTO blkdev_ctrl (machine_id, hwid, vendor, product, ctrl_type, firmware_version) VALUES ('".$machine_id."', '".$blkdev_ctrl_hwid."', '".$blkdev_ctrl_vendor."', '".$blkdev_ctrl_product."', '".$blkdev_ctrl_ctrl_type."', '".$blkdev_ctrl_firmware_version."')");
             }
         }
     }

Reply via email to