You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
adaptive storage pool registration fails when the url has no port #14880
Registering a FlashArray (or Primera) primary storage pool fails with a raw database error when the API URL has no port:
Error: (HTTP 530, error code 9999) Failed to add data store: Unable to persist on DB,
due to: Data truncation: Out of range value for column 'port' at row 1
AdaptiveDataStoreLifeCycleImpl.initialize() saves uri.getPort() as the pool port. java.net.URL returns -1 when there is no port in the URL, and storage_pool.port cannot hold -1, so the insert fails and the registration rolls back. A URL like https://array/api?pod=... is the natural thing to write. The FlashArray adapter itself already falls back to 443 for the same URL, only the saved pool row is wrong.
versions
ACS 4.22.1.1, FlashArray over FibreChannel, Purity//FA 6.10.6. Same on 4.22 and main.
The steps to reproduce the bug
Register a FlashArray pool with no port in the URL: url='https://<user>:<pass>@<array>/api?pod=<pod>&api_skiptlsvalidation=true'
It fails with the error above. management-server.log shows the insert with -1:
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
at o.a.c.s.d.l.AdaptiveDataStoreLifeCycleImpl.initialize(AdaptiveDataStoreLifeCycleImpl.java:239)
Add :443 to the URL and the same command works.
What to do about it?
When the URL has no port, save the scheme's default port (443 for https, 80 for http).
Activity