Damans227 opened a new pull request, #14881:
URL: https://github.com/apache/cloudstack/pull/14881

   Fixes #14880
   
   Registering an adaptive storage pool (FlashArray, Primera) with a URL that 
has no port fails with "Data truncation: Out of range value for column 'port'", 
because the port is saved as -1. This saves the scheme's default port instead, 
443 for https and 80 for http. A URL with a port keeps it.
   
   ### Test:
   
   **Before:** from the FlashArray lab, registration with 
`https://<array>/api?pod=...` fails:
   
       ERROR [o.a.c.s.d.d.PrimaryDataStoreDaoImpl] DB Exception on: ... INSERT 
INTO storage_pool (..., storage_pool.port, ...) VALUES (..., -1, ...)
       com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Out 
of range value for column 'port' at row 1
   
   The same command with `:443` registers the pool with port 443.
   
   **After:** the port saved for a URL without one is the scheme default. Unit 
tests:
   
       https://array/api?pod=p1        -> 443
       http://array/api?pod=p1         -> 80
       https://array:8443/api?pod=p1   -> 8443
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to