Josh Thompson created VCL-904:
---------------------------------

             Summary: BIGINT UNSIGNED issue in isAvailable function
                 Key: VCL-904
                 URL: https://issues.apache.org/jira/browse/VCL-904
             Project: VCL
          Issue Type: Bug
          Components: web gui (frontend)
            Reporter: Josh Thompson


Using mariadb 5.5.41, the frontend encounters an error with a query in the 
isAvailable function under certain conditions. If a vmhost only has VMs 
assigned to with currentimageid pointing to noimage, they query that checks for 
a vmhost having enough RAM available has a problem with (v.allocRAM - i.minram 
+ {$images[$imageid]['minram']). Apparently, something internal to mariadb 
casts that to be BIGINT UNSIGNED but also considers something in there to be 
negative, causing an error. This is easily dealt with by creating allocRAM as 
'int' instead of 'unsigned mediumint' and casting i.minram as signed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to