Jaime pointed out in T181925#3880506 that we shouldn't be running DDLs when mysql-upgrade is in progress.
The maintain-views and maintain-meta_p scripts do DDL operations and are run whenever we create or delete a new wiki and need to add/remove them from the wiki-replicas. In order to avoid running them when a mysql-upgrade is in progress, it will be useful to have some programmatic way of detecting that an upgrade is in progress and have the scripts fail if that's the case.
@jcrespo Could you help us figure out how we can better detect this so we can script it in? Thank you!