|
47 | 47 | - `Castle.unpack/1` and `Castle.install/1` now refuse a system that cannot be |
48 | 48 | upgraded from, and refuse it in the same call that would otherwise have done |
49 | 49 | the work. `:release_handler` reads `releases/RELEASES` once, as it starts, and |
50 | | - when it cannot — the file absent, or there but not consultable — it makes a |
51 | | - release record up out of the boot script's name and version — a record that |
52 | | - names no applications at all. |
| 50 | + when it cannot — the file absent, or there but not something it accepts — it |
| 51 | + makes a release record up out of the boot script's name and version — a record |
| 52 | + that names no applications at all. |
53 | 53 | Upgrading a system in that state is worse than being stopped: the install |
54 | 54 | reports success, and every application whose version changed but whose code the |
55 | 55 | upgrade does not explicitly load goes on running its old code out of the |
56 | 56 | directory of the release that was just replaced, until a later `remove` deletes |
57 | 57 | it. Nothing can repair the running system afterwards, because creating the file |
58 | 58 | changes no record the node holds — so what the refusal says is to restart, with |
59 | | - the file either absent or consultable first. See *Fixed* below for what that |
| 59 | + the file either absent or accepted first. See *Fixed* below for what that |
60 | 60 | condition is and why a bare restart is not always enough. |
61 | 61 |
|
62 | 62 | The question is asked of the node's own records rather than of the filesystem, |
|
153 | 153 |
|
154 | 154 | - The refusal for a system running from a synthesised release record now names a |
155 | 155 | remedy that works. It said to restart, and a restart alone is enough only when |
156 | | - the `RELEASES` file `:release_handler` reads is absent or consultable: it reads |
157 | | - that file with `file:consult/1`, so a malformed one fails just as an unreadable |
158 | | - one does, and the release creates the file only when it is *absent* — so |
159 | | - anything left in place that cannot be consulted is stepped over on every start |
160 | | - and the system comes back on another synthesised record. An operator following the old message would have restarted |
| 156 | + the `RELEASES` file `:release_handler` reads is absent or accepted by the handler |
| 157 | + itself: present, readable and parsing as Erlang terms are each necessary and none |
| 158 | + of them sufficient. The release creates the file only when it is *absent*, so |
| 159 | + anything left in place that the handler will not accept is stepped over on every |
| 160 | + start and the system comes back on another synthesised record. An operator following the old message would have restarted |
161 | 161 | indefinitely. |
162 | 162 |
|
163 | | - The refusal now asks for that file to be absent or consultable before the restart, |
| 163 | + The refusal now asks for that file to be absent or accepted before the restart, |
164 | 164 | and identifies it rather than assuming: `releases/RELEASES` under the release |
165 | 165 | root, unless `RELDIR` or the `sasl` `releases_dir` parameter points elsewhere. |
166 | 166 | Where one of those does, the two are different files and a restart cannot fix it |
|
0 commit comments