annotate mod_graceful_shutdown/README.markdown @ 4326:f6fdefc5c6ac

mod_roster_command: Fix subscription when the "user JID" is a bare domain. Do not attempt to update the roster when the user is bare domain (e.g. a component), since they don't have rosters and the attempt results in an error: $ prosodyctl mod_roster_command subscribe proxy.example.com contact@example.com xxxxxxxxxxFailed to execute command: Error: /usr/lib/prosody/core/rostermanager.lua:104: attempt to concatenate local 'username' (a nil value) stack traceback: /usr/lib/prosody/core/rostermanager.lua:104: in function 'load_roster' /usr/lib/prosody/core/rostermanager.lua:305: in function 'set_contact_pending_out' mod_roster_command.lua:44: in function 'subscribe'
author Boris Grozev <boris@jitsi.org>
date Tue, 05 Jan 2021 13:15:00 -0600
parents 88474dd1af48
children 999e7cb7f6d9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2170
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 This module is an experiment about a more graceful shutdown process.
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 Why
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 ===
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 When shutting down, a number of sessions, connections and other things
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 are teared down. Due to all these things happening very quickly,
2818
88474dd1af48 Various READMEs: s/eg/e.g.g/
Kim Alvefur <zash@zash.se>
parents: 2170
diff changeset
8 sometimes e.g. client unavailable notifications don't make it to all
2170
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 remote contacts because the server-to-server connections are teared down
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10 just after.
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12 How
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13 ===
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 This module works by breaking the shutdown process into separate steps
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
16 with a brief pause between them.
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
17
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18 It goes something like this
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
19
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
20 1. Stop accepting new client connections.
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
21 2. Close all client connections.
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
22 3. Fire event for everything else.
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
23 4. Tell `net.server` to quit the main loop.
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
24 5. ???
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
25 6. Still here? Kill itself.
4652a112a4ba mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff changeset
26