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

#131 fix incompatibility with remote storage #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JesKingDev
Copy link
Contributor

@JesKingDev JesKingDev commented Feb 9, 2023

Overview / Background

Fixes #131

When the Remote Storage implementation for AWS S3 is enabled, the module sets a preference for maintenance mode to use the remote filesystem (https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/RemoteStorage/etc/di.xml#L77-L80). The implementation uses a caching mechanism that results in the cron service never coming out of maintenance mode. The FileSystem object detects the maintenance flag being written, but then continues to use the cache of the file's existence (https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php#L139-L143). The only way to bring the cron service out of maintenance mode is to restart it

This change adds a preference to force the maintenance flag to be written using the standard filesystem implementation. A shared var dir mount is current practice for Commerce Cloud and a standard pattern for other clustered environments.

Testing

Start the cron service and observe it running without issue.
Enable maintenance mode.
Overserve the cron service pausing during maintenance mode.
Disable maintenance mode.
Observe the cron service resume.

…ce flag

Remote Storage implementation uses a caching mechanism incompatible with the cron service
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

Successfully merging this pull request may close these issues.

Maintenance mode check does not work properly if remote storage is enabled
1 participant