-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GenerateVeleroBackupName
result is not unique
#90
Comments
We could drop all together the human readable name of the object and simply use our generated UUID as the Backup object name with retry generate similar to what @kaovilai proposed above. @mateusoliveira43 what do you think? We could also add suffix (not the prefix) to that uuid with namespace and stripped backup name, this way if it's longer then 240 characters, only part of name or namespace will be lost ensuring uniqueness of the name. |
Yeah, a retry on velero backup name seems a good approach We can discuss the ideas on next meeting |
I think this is handled by #101 Also I think we do not need to retry on velero backup name as we generate with UUID as suffix, so there is really minimum chance of collision of that suffix 1 in 2.71 x 10^18 . On top of that we are adding namespace and name of the original NAB object (stripped one), so we lower already minimal chance of such collision. |
Given different inputs,
GenerateVeleroBackupName
can return the same result.oadp-non-admin/internal/common/function/function.go
Line 111 in 282620c
This can result in bad user experience, as users can end using other users backup (or when UUID solution is implemented, #89, prevent users from using NonAdminBackup with certain names)
From what I studied, given 2 namespaces that have long names (more than 239 chars), if their names differ only in position 240 or above, any NonAdminBackup that have the same same in these namespaces, the associated VeleroBackup name will be the same.
Example
this
and this input
return the same result
Further investigation
Need to confirm no other scenarios will generate equal names.
The text was updated successfully, but these errors were encountered: