comparison doc/upgrading.txt @ 7045:ca90f7270cd4 issue2550923_computed_property

merge from main tip. This should fix test failure in Markdown2TestCase.test_string_markdown_code_block_attribute by merging html diff method used in tests.
author John Rouillard <rouilj@ieee.org>
date Mon, 07 Nov 2022 22:58:38 -0500
parents bd2c3b2010c3
children d3593cbb8e6f
comparison
equal deleted inserted replaced
6638:e1588ae185dc 7045:ca90f7270cd4
1 .. meta:: 1 .. meta::
2 :description language=en: 2 :description:
3 Critical documentation on how to upgrade the Roundup Issue 3 Critical documentation on how to upgrade the Roundup Issue
4 Tracker. Actions that must or can be taken when upgrading from 4 Tracker. Actions that must or can be taken when upgrading from
5 one version to another are documented here. 5 one version to another are documented here.
6 6
7 .. index:: Upgrading 7 .. index:: Upgrading
10 Upgrading to newer versions of Roundup 10 Upgrading to newer versions of Roundup
11 ====================================== 11 ======================================
12 12
13 Please read each section carefully and edit your tracker home files 13 Please read each section carefully and edit your tracker home files
14 accordingly. Note that there is information about upgrade procedures in the 14 accordingly. Note that there is information about upgrade procedures in the
15 `administration guide`_. 15 `administration guide`_ in the `Software Upgrade`_ section.
16 16
17 If a specific version transition isn't mentioned here (eg. 0.6.7 to 0.6.8) 17 If a specific version transition isn't mentioned here (eg. 0.6.7 to 0.6.8)
18 then you don't need to do anything. If you're upgrading from 0.5.6 to 18 then you don't need to do anything. If you're upgrading from 0.5.6 to
19 0.6.8 though, you'll need to check the "0.5 to 0.6" and "0.6.x to 0.6.3" 19 0.6.8 though, you'll need to check the "0.5 to 0.6" and "0.6.x to 0.6.3"
20 steps. 20 steps.
28 Contents: 28 Contents:
29 29
30 .. contents:: 30 .. contents::
31 :local: 31 :local:
32 32
33 .. index:: Upgrading; 2.0.0 to 2.1.0 33 .. index:: Upgrading; 2.2.0 to 2.3.0
34 34
35 Migrating from 2.1.0 to 2.x.y 35 Migrating from 2.2.0 to 2.3.0
36 ============================= 36 =============================
37
38 Update your ``config.ini`` (required)
39 -------------------------------------
40
41 Upgrade tracker's config.ini file. Use::
42
43 roundup-admin -i /path/to/tracker updateconfig newconfig.ini
44
45 to generate a new ini file preserving all your settings.
46 You can then merge any local comments from the tracker's
47 ``config.ini`` to ``newconfig.ini`` and replace
48 ``config.ini`` with ``newconfig.ini``.
49
50 Rdbms version change from 7 to 8 (required)
51 -------------------------------------------
52
53 This release includes a change that requires updates to the
54 database schema.
55
56 Sessions and one time key (otks) tables in the Mysql and
57 PostgreSQL database use a numeric type that
58 truncates/rounds expiration timestamps. This results in
59 entries being purged early or late (depending on whether
60 it rounds up or down). The discrepancy is a couple of
61 days for Mysql or a couple of minutes for PostgreSQL.
62
63 Session keys stay for a week or more and CSRF keys are
64 two weeks by default. As a result, this isn't usually a
65 visible issue. This migration updates the numeric types
66 to ones that supports more significant figures.
67
68 You should backup your instance and run the
69 ``roundup-admin -i <tracker_home> migrate``
70 command for all your trackers once you've
71 installed the latest code base.
72
73 Do this before you use the web, command-line or mail
74 interface and before any users access the tracker.
75
76 If successful, this command will respond with either
77 "Tracker updated" (if you've not previously run it on an
78 RDBMS backend) or "No migration action required" (if you
79 have run it, or have used another interface to the tracker,
80 or are using anydbm).
81
82 Session/OTK data storage for SQLite backend changed (required)
83 --------------------------------------------------------------
84
85 Roundup stores a lot of ephemeral data:
86
87 * login session tokens,
88 * rate limits
89 * password reset attempt tokens
90 * one time keys
91 * and anti CSRF keys.
92
93 These were stored using dbm style files while the main data
94 is stored in a SQLite db. Using both dbm and sqlite style
95 files is surprising and due to how we lock dbm files can be
96 a performance issue.
97
98 However you can continue to use the dbm files by setting the
99 ``backend`` option in the ``[sessiondb]`` section of
100 ``config.ini`` to ``anydbm``.
101
102 If you do not change the setting, two sqlite databases
103 called ``db-otk`` and ``db-session`` replace the dbm
104 databases. Once you make the change the old ``otks`` and
105 ``sessions`` dbm databases can be removed.
106
107 Note this replacement will require users to log in again and
108 refresh web pages to save data. It is best if people save
109 all their changes and log out of Roundup before the upgrade
110 is done to minimize confusion. Because the data is
111 ephemeral, there is no plan to migrate this data to the new
112 SQLite databases. If you want to keep using the data set the
113 ``sessiondb`` ``backend`` option as described above.
114
115 Session/OTK data storage using Redis (optional)
116 -----------------------------------------------
117
118 You can store your ephemeral data in a Redis database. This
119 provides significantly better performance for ephemeral data
120 than SQLite or dbm files. See the section `Using Redis for
121 Session Databases`_ in the `administration guide`_
122
123
124 .. _Using Redis for Session Databases:
125 admin_guide.html#using-redis-for-session-databases
126
127 New SQLite databases created with WAL mode journaling (optional)
128 ----------------------------------------------------------------
129
130 By default, SQLite databases use a rollback journal when
131 writing an update. The rollback journal stores a copy of the
132 data from before the update. One downside of this is that
133 all reads have to be suspended while a write is
134 occurring. SQLite has an alternate way of insuring ACID
135 compliance by using a WAL (write ahead log) journal.
136
137 Version 2.3.0 of Roundup, creates new SQLite databases using
138 WAL journaling. With WAL, a writer does not block readers
139 and readers do not block writing an update. This keeps
140 Roundup accessible even under a heavy write load (e.g. when
141 bulk loading data or automated updates via REST).
142
143 If you want to convert your existing SQLite db to WAL mode:
144
145 1. check the current journal mode on your database
146 using::
147
148 sqlite3 <tracker_home>/db/db "pragma journal_mode;"
149
150 2. If it returns ``delete``, change it to WAL mode using::
151
152 sqlite3 <tracker_home>/db/db "pragma journal_mode=WAL;"
153
154 3. verify by running the command in step 1 again and you
155 should get ``wal``.
156
157 If you are using SQLite for session and otk databases,
158 perform the same steps replacing ``db`` with ``db-session``
159 and ``db-otk``.
160
161 If you find WAL mode is not working for you, you can set the
162 journal method to a rollback journal (``delete`` mode) by
163 using step 2 and replacing ``wal`` with ``delete``. (Note:
164 SQLite supports other journaling modes, but only ``wal`` and
165 ``delete`` persist. Roundup doesn't set a journaling mode
166 when it opens the database, so options such as ``truncate``
167 are not used.)
168
169 For details on WAL mode see `<https://www.sqlite.org/wal.html>`_
170 and `<https://www.sqlite.org/pragma.html#pragma_journal_mode>`_.
171
172 Change in processing of In-Reply_to email header
173 ------------------------------------------------
174
175 Messages received via email usually include a ``[issue23]``
176 designator in the subject line. This indicates what issue is
177 being updated. If the designator is missing, Roundup tries
178 to find the correct issue by using the in-reply-to email
179 header.
180
181 The former code appends the new message to the first issue
182 found with a message matching the in-reply-to
183 header. Usually a message is associated with only one
184 issue. However nothing in Roundup requires that.
185
186 In this release, the in-reply-to matching is disabled if
187 there are multiple issues with the same message. In this
188 case, subject matching is used to try to find the matching
189 issue.
190
191 If you don't have messages assigned to multiple issues you
192 will see no change. If you do have multi-linked messages
193 this will hopefully result in better message->issue
194 matching.
195
196 .. index:: Upgrading; 2.1.0 to 2.2.0
197
198 Migrating from 2.1.0 to 2.2.0
199 =============================
200
201 Update your ``config.ini`` (required)
202 -------------------------------------
203
204 Upgrade tracker's config.ini file. Use::
205
206 roundup-admin -i /path/to/tracker updateconfig newconfig.ini
207
208 to generate a new ini file preserving all your settings.
209 You can then merge any local comments from the tracker's
210 ``config.ini`` to ``newconfig.ini`` and replace
211 ``config.ini`` with ``newconfig.ini``.
37 212
38 Rdbms version change from 6 to 7 (required) 213 Rdbms version change from 6 to 7 (required)
39 ------------------------------------------- 214 -------------------------------------------
40 215
41 This release includes two changes that require updates to the database 216 This release includes two changes that require updates to the database
46 columns used by the native indexer. This also affect the whoosh 221 columns used by the native indexer. This also affect the whoosh
47 and xapian indexers. 222 and xapian indexers.
48 2. Some databases that include native full-text search (native-fts 223 2. Some databases that include native full-text search (native-fts
49 indexer) searching are now supported. 224 indexer) searching are now supported.
50 225
51 You should run the ``roundup-admin migrate`` command for your 226 You should run the ``roundup-admin -i <tracker_home> migrate`` command
52 tracker once you've installed the latest codebase. 227 for all your trackers once you've installed the latest codebase.
53 228
54 Do this before you use the web, command-line or mail interface 229 Do this before you use the web, command-line or mail interface
55 and before any users access the tracker. 230 and before any users access the tracker.
56 231
57 If successful, this command will respond with either "Tracker 232 If successful, this command will respond with either "Tracker
58 updated" (if you've not previously run it on an RDBMS backend) or 233 updated" (if you've not previously run it on an RDBMS backend) or
59 "No migration action required" (if you have run it, or have used 234 "No migration action required" (if you have run it, or have used
60 another interface to the tracker, or are using anydbm). 235 another interface to the tracker, or are using anydbm).
61 236
62 See `below for directions on enabling native-fts`_. 237 See `below if you want to enable native-fts searching`_.
63 238
64 .. _below for directions on enabling native-fts: \ 239 .. _below if you want to enable native-fts searching: \
65 #enhanced-full-text-search-optional 240 #enhanced-full-text-search-optional
66 241
67 The increase in indexed word length also affects whoosh and xapian 242 The increase in indexed word length also affects whoosh and xapian
68 backends. You may want to run ``roundup-admin -i tracker_home 243 backends. You may want to run ``roundup-admin -i tracker_home
69 reindex`` if you want to index or search for longer words in your full 244 reindex`` if you want to index or search for longer words in your full
70 text searches. Re-indexing make take some time. 245 text searches. Re-indexing make take some time.
71 246
247 Check new login_empty_passwords setting (required)
248 --------------------------------------------------
249
250 In this version of Roundup, users with a blank password are not
251 allowed to login. Blank passwords have been allowed since 2002, but
252 2022 is a different time. If you have a use case that requires a user
253 to login without a password, set the ``login_empty_passwords`` setting
254 in the ``web`` section of ``config.ini`` to ``yes``. In
255 general this should be left at its default value of ``no``.
256
257 Check allowed_api_origins setting (optional)
258 --------------------------------------------
259
260 If you are using the REST or xmlrpc api's from an origin
261 that is different from your roundup tracker, you will need
262 to add your allowed origins to the allowed_api_origins in
263 your updated ``config.ini``. Upgrade your ``config.ini`` as
264 described above then read the documentation for the setting
265 in ``config.ini``.
266
72 Check compression settings (optional) 267 Check compression settings (optional)
73 ------------------------------------- 268 -------------------------------------
74 269
75 Read the `administration guide`_ section on `Configuring Compression`_. 270 Read the `administration guide`_ section on `Configuring Compression`_.
76 271
77 Upgrade tracker's config.ini file. Use:: 272 Upgrade your tracker's config.ini as described
78 273 above. Compare the old and new files and configure new
79 roundup-admin -i /path/to/tracker updateconfig newconfig.ini 274 compression settings as you want. Then replace
80 275 ``config.ini`` with the ``newconfig.ini`` file.
81 to generate a new ini file preserving all your settings. You can then
82 merge any local comments from the tracker's ``config.ini`` into
83 ``newconfig.ini``. Compare the old and new files and configure new
84 compression settings as you want. Then replace ``config.ini`` with the
85 ``newconfig.ini`` file.
86 276
87 Search added to user index page (optional) 277 Search added to user index page (optional)
88 ------------------------------------------ 278 ------------------------------------------
89 279
90 A search form and count of number of hits has been added to the 280 A search form and count of number of hits has been added to the
178 changing ``16`` to the id in the second column of the table output. 368 changing ``16`` to the id in the second column of the table output.
179 The example uses interactive mode (indicated by the ``roundup>`` 369 The example uses interactive mode (indicated by the ``roundup>``
180 prompt). This prevents the new password from showing up in the output 370 prompt). This prevents the new password from showing up in the output
181 of ps or shell history. The new password will be encrypted using the 371 of ps or shell history. The new password will be encrypted using the
182 default encryption method (usually pbkdf2). 372 default encryption method (usually pbkdf2).
373
374 Enable performance improvement for wsgi mode (optional)
375 -------------------------------------------------------
376
377 There is an experimental wsgi performance improvement mode that caches
378 the loaded roundup instance. This eliminates disk reads that are
379 incurred on each connection. In one report it improves speed by a
380 factor of 2 to 3 times. To enable this you should add a feature flag
381 to your Roundup wsgi wrapper (see the file
382 ``.../share/frontends/wsgi.py``) so it looks like::
383
384 feature_flags = { "cache_tracker": "" }
385 app = RequestDispatcher(tracker_home, feature_flags=feature_flags)
386
387 to enable this mode. Note that this is experimental and was added
388 during the 2.2.0 beta period, so it is enabled using a feature flag.
389 If you use this and it works for you please followup with an email to
390 the roundup-users at lists.sourceforge.net mailing list so we can
391 enable it by default in a future release.
392
393
394 Hide submit button during readonly use of _generic.item.html (optional)
395 -----------------------------------------------------------------------
396
397 The submit button in _generic.item.html always shows up even when the
398 user doesn't have edit perms. Change the ``context/submit`` html to
399 read::
400
401 <td colspan=3 tal:content="structure context/submit"
402 tal:condition="context/is_edit_ok">
403
404 in your TAL based templates. The ``jinja2`` based templates are
405 missing this file, but if you implemented one you want to surround the
406 jinja2 code with::
407
408 {% if context.is_view_ok() %}
409 <submit button code here>
410 {% endif %}
411
412
413 .. index:: Upgrading; 2.0.0 to 2.1.0
183 414
184 Migrating from 2.0.0 to 2.1.0 415 Migrating from 2.0.0 to 2.1.0
185 ============================= 416 =============================
186 417
187 Rdbms version change from 5 to 6 (**) 418 Rdbms version change from 5 to 6 (**)
926 element but you also added an explicit @csrf statement. Simply remove 1157 element but you also added an explicit @csrf statement. Simply remove
927 the @csrf element for that form. 1158 the @csrf element for that form.
928 1159
929 Errors and Troubleshooting - xmlrpc Required Header Missing 1160 Errors and Troubleshooting - xmlrpc Required Header Missing
930 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1161 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
931 When performing and xmlrpc call, if you see something like: 1162 When performing and xmlrpc call, if you see something like::
932 1163
933 xmlrpclib.Fault: <Fault 1: "<class 1164 xmlrpclib.Fault: <Fault 1: "<class
934 'roundup.exceptions.UsageError'>:Required Header Missing"> 1165 'roundup.exceptions.UsageError'>:Required Header Missing">
935 1166
936 change the setting of csrf_enforce_header_x-requested-with in 1167 change the setting of csrf_enforce_header_x-requested-with in
937 config.ini to no. So it looks like: 1168 config.ini to no. So it looks like::
938 1169
939 csrf_enforce_header_x-requested-with = no 1170 csrf_enforce_header_x-requested-with = no
940 1171
941 Alternatively change your xmlrpc client to add appropriate headers to 1172 Alternatively change your xmlrpc client to add appropriate headers to
942 the request including the: 1173 the request including the:
950 Support for SameSite cookie option for session cookie 1181 Support for SameSite cookie option for session cookie
951 ----------------------------------------------------- 1182 -----------------------------------------------------
952 1183
953 Support for serving the session cookie using the SameSite cookie option 1184 Support for serving the session cookie using the SameSite cookie option
954 has been added. By default it is set to lax to provide a better user 1185 has been added. By default it is set to lax to provide a better user
955 experience. But this can be changes to strict or the option can be 1186 experience. But this can be changed to strict or the option can be
956 removed entirely. 1187 removed entirely.
957 1188
958 Using the process for merging config.ini changes described in 1189 Using the process for merging config.ini changes described in
959 `Cross Site Request Forgery Detection Added`_ you can add the 1190 `Cross Site Request Forgery Detection Added`_ you can add the
960 ``samesite_cookie_setting`` to the ``[web]`` section of the config 1191 ``samesite_cookie_setting`` to the ``[web]`` section of the config
3395 .. _`xmlrpc guide`: xmlrpc.html 3626 .. _`xmlrpc guide`: xmlrpc.html
3396 .. _FTS5 full-text search engine: https://www.sqlite.org/fts5.html 3627 .. _FTS5 full-text search engine: https://www.sqlite.org/fts5.html
3397 .. _PostgreSQL's full text search: https://www.postgresql.org/docs/current/textsearch.html 3628 .. _PostgreSQL's full text search: https://www.postgresql.org/docs/current/textsearch.html
3398 .. _`administration guide notes on native-fts`: admin_guide.html#configuring-native-fts-full-text-search 3629 .. _`administration guide notes on native-fts`: admin_guide.html#configuring-native-fts-full-text-search
3399 .. _Configuring Compression: admin_guide.html#configuring-compression 3630 .. _Configuring Compression: admin_guide.html#configuring-compression
3631 .. _Software Upgrade: admin_guide.html#software-upgrade

Roundup Issue Tracker: http://roundup-tracker.org/