Skip to content
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

Updating URLs after changing hostname in ClearML Server #274

Open
finickyDrone opened this issue Feb 10, 2025 · 2 comments
Open

Updating URLs after changing hostname in ClearML Server #274

finickyDrone opened this issue Feb 10, 2025 · 2 comments

Comments

@finickyDrone
Copy link

finickyDrone commented Feb 10, 2025

When using ClearML Sever 1.15, I ran into a problem when the file server http links broke when the machine hostname changed from data-01 to data-00. This is all it took to break the file server images as there is no automatic check and renaming of the machine hostname from say http://data-01:8081/picture123.jpg to http://data-00:8081/picture123.jpg

I found this new file in version 1.17 and upwards of ClearML server:
apiserver/fix_mongo_urls.py

It seems to have been created to solve exactly the problem that I'm running into. However, I'm not sure how to run it. I have upgraded to ClearML Server 1.17, but I'm not sure what the procedure is for executing this file to rename the file server image URLs. Does anyone know?

Thanks!

EDIT: I ran the fix_mongo_urls.py script from withing the container:

root@356d0f511a4d:/opt/clearml/apiserver# python fix_mongo_urls.py -hs http://data-01:8081 -ht http://data-00:8081

This was the output:
INFO:root:Connecting to Mongo on mongodb://mongo:27017 INFO:root:Updating model uris INFO:root:Updated 11 models from 49 INFO:root:Updating task uris INFO:root:Updated 29 tasks from 118 INFO:root:Completed successfully
It still appending the 'data-01instead ofdata-00` to the http location of the images.

So, manually running that script didn't seem to solve the issue of the wrong hostname URL issue.

Any input would be greatly appreciated!

@finickyDrone
Copy link
Author

Some good news. It appears the the files with the old hostname URL only applies to the preview of the dataset imagery. This is what the missing files with the old hostname URL look like:

Image

It's only the preview files that still have the old hostname linkage. The dataset itself is zip/tarred and can still be used with the updated hostname. I just tested by issuing:
clearml-data get --verbose --id f64039f761114bd8b00b052ca34f9267 --copy .

ClearML devs can probably clarify better how this all works. Maybe the issue is only the imagery for the previews is missing, but the dataset itself is fine. Could this be considered a bug?

@ainoam
Copy link
Collaborator

ainoam commented Feb 11, 2025

@finickyDrone As you'll note in the ClearML FAQ, to resolve storage change, one should migrate URLs for both task artifacts (which you did through the fixup script), as well as update image stored in the ClearML elastic DB (relevant for the dataset preview above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants