affinity breaks when trying to have more than 27 shares in the same group

Bug #2031669 reported by Maurice Escher
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Triaged
Undecided
Unassigned

Bug Description

Hi,

a customer of mine wanted to place a 28th share next to 27 others on the same back end using same host affinity scheduler hints.

But the share create request broke with an internal server error like
https://paste.opendev.org/show/btGOZSWsdSxplNOMQYif/

save_scheduler_hints() appends the IDs of each referenced share to the special internal metadata key https://opendev.org/openstack/manila/src/commit/0b99fdaa9a6ee33244e4560ddf2cc767afb5bf80/manila/share/api.py#L2367-L2385, but since the value column of share_metadata can only hold 1023 characters (see https://opendev.org/openstack/manila/src/commit/0b99fdaa9a6ee33244e4560ddf2cc767afb5bf80/manila/db/sqlalchemy/models.py#L538), it breaks when trying to add number 28 (it needs 36 characters per share uuid plus 1 char for the separator ',' and math.floor(1023/37)=27)

At least this needs some validation.

Better would be, if the list can get longer, e.g. by using additional metadata keys for storing that information or by an even bigger redesign..
Wdyt?

Best,
Maurice

Vida Haririan (vhariria)
Changed in manila:
status: New → Triaged
Revision history for this message
Vida Haririan (vhariria) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.