Open ByJacob opened 1 year ago
Hi @ByJacob. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Description
When running magento2 on several servers, some of the files must be shared. Unfortunately, the var directory may contain various elements that must be shared between store instances. Therefore, it is impossible to set the
var/.maintenance.flag
file to not be shared by an instance. Currently, when we have several servers with a shared var directory, when we turn on maintenance mode on one (e.g., when doing a Blue/Green deployment) the other stores also turned on maintenance mode.Expected behavior
The
.maintenance.flag
file marking the maintenance mode is located in a separate folder, such asvar/flags/.maintenance.flag
or allowing this path to be configured via the CLI.Benefits
Making it easier when running multiple magento2 nodes. This will make it easier to separate the folder to be stored locally only.
Additional information
The folder for this file must be changed: https://github.com/magento/magento2/blob/2.4-develop/lib/internal/Magento/Framework/App/MaintenanceMode.php#L33
Release note
Separate the maintenance flag
.maintenance.flag
into a separatevar/flags
folder. This way, only this folder from the var folder can be set as local in case of architecture with several magento2 servers.