Allow for different ways to put Confluence into Read Only Mode before startup

XMLWordPrintable

    • 1
    • 5

      Use case

      We should have a way to make Confluence Read Only without having to startup the environment. There should be a way to place Confluence Data Center into Read Only such as through a shell script or database script that can be bundled with the environment. Or, a JVM flag in order to force read only mode, or possibly an XML key in confluence.cfg.xml that allows you to set the banner as well automatically

      Summary

      Customer looking to make a Confluence DC environment read only through an automated way that can be updated before the site is launched for a DR-type replication environment. They do not want to start up Confluence before putting it into Read Only mode.

      Workaround

      Research Done

      We can force the entire cluster to go into read only mode by updating the Shared Home confluence.cfg.xml value noted below:

          <property name="access.mode">READ_ONLY</property>
      

      If this flag is set to READ_ONLY it will throw the read only banner and stop non-admins from being able to modify content on the site.

      If this flag is set to READ_WRITE it will be business as usual.

      This would be done before startup on the nodes or require a restart if the nodes were already live when you make this change. This would mean you can automate this at the file system layer rather than going into the DB to update this. It looks like this is the direct control for manipulating this maintenance mode so you shouldn't need to modify the DB.

      You could update the DB in the Bandana table by modifying the following thing to set the maintenance banner that would normally be associated with Read-Only Mode:

      select * FROM BANDANA where BANDANACONTEXT='_GLOBAL' and BANDANAKEY='atlassian.confluence.settings'
      BANDANAVALUE
      ------------
      <settings>
      ...
       <maintenanceBannerMessageOn>true</maintenanceBannerMessageOn>
       <maintenanceBannerMessage>This site is read-only ... can&apos;t create or edit pages right now.</maintenanceBannerMessage>
      ...
      </settings>
      

      Note that this would be a sub-string replacement you'd need to replace those keys while preserving the remaining details from the rest of the data from that key.

            Assignee:
            Unassigned
            Reporter:
            Bernabe Theodore Costales III (Inactive)
            Votes:
            6 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: