Moodle blob storage plugin not working

Moodle blob storage plugin not working

Vignesh R -
回帖数:8

I am facing the issue in my Moodle 3.11.11 data is not updated in blob container but connection established in settings

Error encountered:

PHP message: \r\n2024-12-13 01:52:45 Error code: generalexceptionmessage, Message: Exception - Fail:\nCode: 404\nValue: The specified blob does not exist.\ndetails (if any): ., Link: http://localhost:8080/moodle/course/modedit.php?update=1556&return=1, Debug Info: \nError code: generalexceptionmessage ', referer: http://localhost:8080/moodle/course/modedit.php?update=1556&return=1

objectfs: https://github.com/catalyst/moodle-tool_objectfs

azure sdk: https://github.com/catalyst/moodle-local_azure_storage

settings :  https://github.com/catalyst/moodle-tool_objectfs/blob/DEPRECATED_master/README.md#moodle-configuration

Could anyone please help me with this?

Moodle version: 3.11.11
PHP version: 8.0.3

I need to use Azure Blob Storage in Moodle without relying on cron, as I am running the application in Kubernetes pods.

回复Vignesh R

Re: Moodle blob storage plugin not working

Dan Marsden -
Core developers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像 Plugins guardians的头像 Testers的头像 Translators的头像
you can't use objectfs without cron. It uses cron for transferring the data to the object storage container.

If you can't use cron, you may need to just use local disk instead of object storage.
回复Dan Marsden

Re: Moodle blob storage plugin not working

Vignesh R -
Hi Dan Marsden,

Thanks for the details, Is there any alternate suggestion to achieve the same. It will be a great help, is it possible to join a call to discuss more about this.


Thanks.
回复Vignesh R

Re: Moodle blob storage plugin not working

Vignesh R -
I can't use a pod as a local disk because it can be deleted at any time based on load. I tried mounting an Azure File Share with the pod, but it also has slower performance compared to the VM NFS disk. Please help me on this.
回复Vignesh R

Re: Moodle blob storage plugin not working

Mark Johnson -
Core developers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

I'm not clear why you say you can't rely on cron, can you not have Kubernetes run Moodle's cron script on a regular schedule?

回复Mark Johnson

Re: Moodle blob storage plugin not working

Vignesh R -
Hi Mark,

As per the Moodle Blob plugin, when upload a course, it gets stored on the pod's local disk path, right? If I am running 5 pods and 2 pods get deleted due to low traffic, how can I retrieve the data from the deleted pods, especially if my cron is not running on the particular pod at that time?

Additionally, I attempted to run the cron job locally with this command (php 

moodle/admin/tool/task/cli/schedule_task.php --execute=\\tool_objectfs\\task\\push_objects_to_storage

), but I encountered the following error:

'No candidate objects found.'

Version:
Moodle: 3.11.11
PHP : 8.0.30
Could you please help me to resolve this issue?
附件 Screenshot 2024-12-17 at 9.05.41 PM.png
回复Vignesh R

Re: Moodle blob storage plugin not working

Mark Johnson -
Core developers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

If you are running Moodle in a clustered environment (not specific to Kubernetes, but any setup with multiple webservers) it is necessary to store the path configured as $CFG->dataroot on a shared persistent filesystem that is available on the same path to all nodes. I'd suggest reading through https://docs.moodle.org/405/en/Server_cluster and ensuring you're confident with all of that before introducing objectFS.

回复Mark Johnson

Re: Moodle blob storage plugin not working

Vignesh R -
Hi Mark,

Thanks for the update. We will check from our side. Any updates on the issue I mentioned above: 'No candidate objects found' in Moodle 3.11.11?

Thanks.
回复Vignesh R

Re: Moodle blob storage plugin not working

Mark Johnson -
Core developers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

I can't say specifically why it's not finding any files to upload, but if your dataroot is not set up correctly that could be why. Otherwise, you'll need to look at the objectfs plugin settings regarding the size and age of files that it will upload.