BackROLL icon indicating copy to clipboard operation
BackROLL copied to clipboard

Error on visualization on backup

Open tanganellilore opened this issue 1 year ago • 3 comments

Hi team,

i notice that after two weeks of used, I receive some error on UI and core api under api/task/backup .

Checking on the log I notice that there are some error on cleanArgs function, due to the fact that object retrieved from flower is not a complete tuple and include some ... at the end of args.

Ref code: https://github.com/DIMSI-IS/BackROLL/blob/d69077d6fbd06f2781efb0c0eaa1983a265ef2df/src/core/app/task_handler.py#L85-L116

As workaround i simpli add a "replace" of ... at line 91 and all works fine.

I think that error is how task is added on celery, because is added as a string and retrieved as string, and string will be cropped (rif: https://stackoverflow.com/questions/53888127/advanced-task-formatting-in-flower-celery-monitoring and https://stackoverflow.com/questions/57973649/flower-doesnt-display-complete-result-string).

tanganellilore avatar Aug 23 '24 06:08 tanganellilore

Hello Lorenzo,

Thank you for your report. Indeed, we have worked with string replacements previously but you need to enumerate all the cases to make it work reliably and you may alter the data.

Then, we tried a new way: letting Python tell us where the problem is. It was introduced in https://github.com/DIMSI-IS/BackROLL/commit/571152eb6f3beb8b6e8c4264f9c64939606bedcc. However, an update of python was needed to make this work. Your problem should be fixed since https://github.com/DIMSI-IS/BackROLL/commit/d78395a0f5272e4ea7642c1f4333e4868af4471a.

We would appreciate a feedback. Mind that the database schema was updated so the database files need to be deleted. To keep your Backroll data (storage configuration, backup policies, hypervisor configuration, …) you must export the database data before deleting the database files. Then you can pull the new images, recreate the containers and start the project and finally import you data back into the database. The new schema should be backward compatible because the only changes are about allowing null values.

Or maybe you can try the developpement versions that are not yet mentioned in the main README : see https://github.com/DIMSI-IS/BackROLL/tree/main/compose_project.

Feel free to reach us again if you have any other issue or suggestion.

m-dhellin avatar Aug 27 '24 17:08 m-dhellin

Hi team,

i will try the updated version, but two points:

  1. why you work with task from flower instead ask directly to celery, flower will return a string averytime if you not pass it as something different. Calling directly celery, will return the enteri object and will not require any parsing or replacemente. last but not list, in you rif, replacement still present, so I don't think this will work for "old" tasks.

  2. why is not used something like alembic to manage upgrade or downgrade of table/databses?

Anyway, I will try the developer release.

tanganellilore avatar Aug 29 '24 06:08 tanganellilore

Hello @tanganellilore,

About Celery & Flower

Yes it would be great to only deal with Python objects ! Thank you for the suggestion. And indeed by deleting the string replacement it would not be backward compatible with old tasks with string task_args.

About alembic

Nice tool ! Thank you for the tip.

About the dev & staging versions

It was only tested internally by two people so you may experience some troubles, just let us now.

m-dhellin avatar Aug 29 '24 08:08 m-dhellin