Skip to content

Conversation

@miaulalala
Copy link
Contributor

Summary

Currently, occ allows execution of commands even while in maintenance mode. The CLI does warn the admin that commands are limited but the execution still works.

This PR adds an exception to block any command that isn't maintenance:mode --off or status as executing other commands is unsafe.

(Either this, or remove the misleading sentence as commands can be executed and the database is indeed available - occ user:add for example works).

Checklist

@miaulalala miaulalala requested review from a team and szaimen March 23, 2023 13:24
@miaulalala miaulalala self-assigned this Mar 23, 2023
@miaulalala miaulalala requested review from ArtificialOwl, come-nc and icewind1991 and removed request for a team March 23, 2023 13:24
@szaimen szaimen requested review from juliusknorr and nickvergessen and removed request for szaimen March 23, 2023 13:25
@miaulalala
Copy link
Contributor Author

Alternative PR by Daniel here: #37178

@nickvergessen
Copy link
Member

nickvergessen commented Mar 23, 2023

We have quite some commands in the docs where we recommend to put the instance into maintenance before (and even turn off the webserver), so I think it's intended that it still works :/

Long running and expensive things like:

  • Add missing index
  • Add primary key
  • Convert to utf8mb4

And so on come to mind.

@miaulalala
Copy link
Contributor Author

We have quite some commands in the docs where we recommend to put the instance into maintenance before (and even turn off the webserver), so I think it's intended that it still works :/

Long running and expensive things like:

  • Add missing index
  • Add primary key
  • Convert to utf8mb4

And so on come to mind.

Then Daniel's version is the superior approach. Closing this then.

@miaulalala miaulalala closed this Mar 23, 2023
@szaimen szaimen deleted the enh/block-occ-commands-in-maintenance-mode branch March 23, 2023 19:50
violethaze74

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants