-
Notifications
You must be signed in to change notification settings - Fork 4
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
Unable to access protected datasets on PAVICS #122
Comments
Is there an estimate date of when this script was last executed successfully to see if any relevant version changes of Magpie/Twitcher since then could have caused this? My guess would be that it is not related to Magpie/Twitcher code changes themselves (as there was not really any change related to permissions resolution for a while), but maybe the default permissions and/or components loaded in birdhouse-deploy. |
@fmigneault script was working early to mid february. @tlvu Is there a history of deployment changes we can track? |
@tlogan2000 That said, @fmigneault concern that maybe there could be another cause than Twitcher/Magpie is valid. So to test that theory, I'll try to rollback Twitcher/Magpie to the previous version to see if the problem is fixed or not. If it is fixed, then it's clearly caused by the new Twitcher/Magpie on Feb 14. Hopefully the downgrade is easy since there was a DB upgrade for Magpie (see comment bird-house/birdhouse-deploy#283 (review)). In fact, is there a procedure to downgrade Magpie documented somewhere? |
So as I suspected, the previous Magpie do not start with the DB already upgraded to the new Magpie:
Identifier '5e5acc33adce' matched the upgrade in comment bird-house/birdhouse-deploy#283 (review). Do you happen to have the procedure to downgrade Magpie? |
@tlvu You can probably even set |
Documenting commands to pseudo downgrade Magpie DB:
|
Subsequent upgrade back to latest Magpie version do not work
|
@fmigneault I tried to follow this as you suggest https://github.com/Ouranosinc/Magpie/blob/e6a7c34b97877d28dc90538d157e3a948b91b6a4/Makefile#L272-L288 With the new Magpie version running, I run the following commands:
And it does not do anything. Is there something I missed? If possible, could you provide exact command to downgrade from the context of PAVICS environment and not from a dev environment. |
I tried to do this manually https://github.com/Ouranosinc/Magpie/blob/e6a7c34b97877d28dc90538d157e3a948b91b6a4/magpie/alembic/versions/2022-09-01_5e5acc33adce_case_insensitive_email_constraint.py#L29-L30
And it also hangs forever (waited 2 hours). I think the reason why my previous Can you advise how to drop that index or investigate the hanging problem when trying to drop that index? Because without dropping the index, I can not go back to the latest Magpie. |
@tlvu Then, using a Magpie Docker version before |
@fmigneault My problem is the I thought it is a problem with my VM, then I tried on the staging machine, it also hangs. If you happen to have a PAVICS stack running, can you try to rollback yourself? If not, it's okay, I'll try to figure this out next week. This week I am on Misha PR. |
@tlvu The corresponding command on a local environment applies the operations without hanging and changes are reflected in the database: There must be something specific happening due to docker runtime. |
@tlvu |
Relevant PR to address the issue: Ouranosinc/Magpie#580 |
Sorry for the late reply. I was busy with Misha PR. Taking clues from you, a simple Did it on our staging machine, rolled back to older Twitcher/Magpie. Will try to reproduce Travis problem with older Twitcher/Magpie. |
@tlogan2000 I think I found the root cause: it's the pydap engine of the I rolled back Magpie on our staging Boreas and I was able to also reproduce the problem (both behind Twitcher and direct with testthredds): https://pavics.ouranos.ca/jupyter/hub/user-redirect/lab/tree/public/lvu-public/Access-ESPO-G6_PAVICS_BROKEN-with-pydap-boreas-old-magpie.ipynb Then I remove the pydap engine and it works, both behind Twitcher and direct with testthredds: https://pavics.ouranos.ca/jupyter/hub/user-redirect/lab/tree/public/lvu-public/Access-ESPO-G6_PAVICS_WORKING-boreas-old-magpie.ipynb The production is still on the latest Magpie. We can re-run my notebooks against production and probably the same result. Magpie is probably not the cause. |
Confirmed it works on production with latest Magpie as well, as long as the engine is not pydap. @fmigneault I noticed however a performance problem with Twitcher/Magpie and maybe more with the newer version. When hitting production (on fast SSD), behind Nginx and newer Twitcher/Magpie 3.31.0, it took around 210s. Behind Nginx only, it took around 33s. Tried 3 times, taking the average, to remove the effect of caching. When hitting staging (on spinning HDD), behind Nginx and older Twitcher/Magpie 3.26.0, it took around 113s, Behind Nginx only, it took around 56s. Tried 3 times, taking the average, to remove the effect of caching. |
Yes pydap is required to access protected datasets using a session etc. Just removed group permission this week for the ESPO-G6 data so I think we may still have an issue |
OH ! So my test works simply because I did not need to use authentication because the dataset is public now. Had the dataset is still protected, we will need to use pydap engine and the problem is back? |
Is it possible to point me in the direction of the specific If the behaviour differs from using @tlvu |
@tlvu I updated the notebook to point to ESPO-R5 data (still protected) and problems are present https://pavics.ouranos.ca/jupyter/hub/user-redirect/lab/tree/public/logan-public/Tests/THREDDS_Issues_March2023/Access-ESPO-G6_PAVICS_BROKEN.ipynb |
@fmigneault I think you will need a PAVICS account to reproduce the issue even if I point towards the specific call. I think you have an account already but if you need to change your password etc let me know |
@tlogan2000 |
Good news, with this command It's a bit less safe with this setting turned on, but according @ldperron it should be okay since the conditions for it to be unsafe is pretty rare. Still I'll run a couple of Jenkins on Production just to be sure. In the mean time, @tlogan2000 if you can confirm the fix works for your use-cases, or test on a bigger use-case to see the limit of this work-around. |
FYI @moulab88, this is the issue I wanted to test |
You can go with the change. Although this setting was tested a few years ago, we will check the connections states. |
Describe the bug
Recent updates to twitcher (or possibly magpie) break previous workflows for accessing group protected datasets on PAVICS.
Code will successfully navigate thredds and create xarray datasets but will fail when trying to actually load data
Devs who wish to debug this can let me know so I can add their pavics username to the appropiriate group
To Reproduce
to run directly on PAVICS see example notebook:
https://pavics.ouranos.ca/jupyter/hub/user-redirect/lab/tree/public/logan-public/Tests/THREDDS_Issues_March2023/Access-ESPO-G6_PAVICS_BROKEN.ipynb
Expected behavior
access data
The text was updated successfully, but these errors were encountered: