Last modified: 2011-11-06 12:49:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31558, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29558 - Add config var to disable update.php
Add config var to disable update.php
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.20.x
All All
: High normal (vote)
: ---
Assigned To: Chad H.
:
Depends on:
Blocks: 29068
  Show dependency treegraph
 
Reported: 2011-06-23 21:30 UTC by Roan Kattouw
Modified: 2011-11-06 12:49 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2011-06-23 21:30:08 UTC
Per our conversation in #wikimedia-dev today, it has long been assumed that running update.php on the cluster will result in death and destruction. We've never actually tried, and there's talk of trying it out on test2wiki to see what happens, but for now update.php is still considered very much unsafe.

This isn't really documented, though, it's just well-known... except to newcomers. So it'd be nice to add a config var that, if enabled, makes update.php refuse to run. Lest anyone accidentally run update.php and cause a terrible mess. Of course the default behavior should be to allow update.php to be run, because most wikis aren't special like us :D
Comment 1 Chad H. 2011-06-23 21:36:07 UTC
Rather than a config var, we could do something with $IP/wmf-config/wikimedia-mode like we do in doMaintenance. Although TBH that whole structure is pretty awful and I'd like to rip it out.
Comment 2 Bryan Tong Minh 2011-06-28 07:45:01 UTC
General hook in Maintenance, that we hook in InitialiseSettings.php to abort the script?
Comment 3 Mark A. Hershberger 2011-07-06 20:43:24 UTC
(In reply to comment #2)
> General hook in Maintenance, that we hook in InitialiseSettings.php to abort
> the script?

Sounds good to me, Bryan.  Could you implement this?
Comment 4 Bryan Tong Minh 2011-07-07 08:11:50 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > General hook in Maintenance, that we hook in InitialiseSettings.php to abort
> > the script?
> 
> Sounds good to me, Bryan.  Could you implement this?

No, somebody with shell access should do it, because InitialiseSettings.php is a Wikimedia config file.

I took a quick look into the Maintenance hook though, and it looks like 

if ( !wfRunHooks( 'MaintenanceMainBeforeExecute', array( &$maintenance, &$exitCode ) ) ) { exit( $exitCode ); }

just before the try catch block in maintenance/doMaintenance.php would be appropriate.
Comment 5 Roan Kattouw 2011-07-13 03:21:21 UTC
Chad has already hacked it into the deployment branch, I just figured we must not be the only environment where update.php can't be run and though a config var that triggers a die() or something in update.php would be generally useful in trunk.
Comment 6 Chad H. 2011-07-13 22:15:04 UTC
Done in r92109.
Comment 7 Emufarmers 2011-10-31 05:53:09 UTC
I'm not sure piggybacking on $wgMiserMode is a good idea here.  Lots of third-party wikis have it enabled (it's recommended in Aaron's performance guide), and it already does about 50 different undocumented things.
Comment 8 db [inactive,noenotif] 2011-11-06 12:49:41 UTC
(In reply to comment #7)
> I'm not sure piggybacking on $wgMiserMode is a good idea here.  Lots of
> third-party wikis have it enabled (it's recommended in Aaron's performance
> guide), and it already does about 50 different undocumented things.

Now it is $wgAllowSchemaUpdates.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links