Skip to content

Commit d0cb6de

Browse files
committed
debug
1 parent fa89445 commit d0cb6de

File tree

4 files changed

+24
-14
lines changed

4 files changed

+24
-14
lines changed

MULTINODE.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ This is the virtual bracket around everything. Your _Guild_ ID is your Discord s
1111
of nodes will form a DCSServerBot cluster under this ID.
1212

1313
- **Node**<br>
14-
A _Node_ is a single installation of DCSServerBot. You can run multiple nodes on one PC (see below) or you can run them
14+
A _Node_ is a single installation of DCSServerBot. You can run multiple nodes on one PC (see below), or you can run them
1515
on different PCs. Each node is a single Python process. Only one of the nodes can be a master. The cluster will
16-
determine automatically, which one that is and will automatically switch the master to another node on system downtimes
16+
determine automatically which one that is and will automatically switch the master to another node on system downtimes
1717
or outages.
1818

1919
If you want to run your DCSServerBot over multiple locations, you need to prepare your setup:
2020

2121
## Cloud-Drive Setup (default)
22-
You need to make sure, that every node in your cluster is aware of the full configuration. The best way to achieve this
23-
is to have the bot or at least the bots configuration installed on a cloud drive, like OneDrive or Google Drive.
22+
You need to make sure that every node in your cluster is aware of the full configuration. The best way to achieve this
23+
is to have the bot or at least the bot's configuration installed on a cloud drive, like OneDrive or Google Drive.
2424
I personally prefer OneDrive, as its technology is superior to Google Drive. But any cloud drive or NAS should work.
2525

2626
Add these lines to your configuration:
@@ -83,9 +83,9 @@ where you can rent one for relatively small money.
8383
8484
## Running multiple versions of DCS World on one PC
8585
One DCSServerBot node can run as many DCS servers as your PC can handle, but they all share the very same DCS World
86-
installation. This means, you can **not** run two different DCS World installations with separate root mods installed.<br>
86+
installation. This means you can **not** run two different DCS World installations with separate root mods installed.<br>
8787
To achieve this, you need to run two or more nodes on one PC.<br>
88-
DCSServerBot uses the hostname of the PC as node name, if not specified otherwise. To be able to run multiple nodes on
88+
DCSServerBot uses the hostname of the PC as a node name, if not specified otherwise. To be able to run multiple nodes on
8989
the same PC, you need to specify an additional parameter -n (or --node) on startup (e.g. `run -n node01`).<br>
9090
This will start a new node (you'll be prompted for the installation of it, if it does not exist yet), with the name
9191
"node01".
@@ -95,12 +95,12 @@ This will start a new node (you'll be prompted for the installation of it, if it
9595
## Running multiple Nodes on multiple PCs
9696
If you set up your environment with a cloud drive for your installation and a central database that is accessible from
9797
every node, the installation of an additional node is quite straight forward.<br>
98-
You just need to run `run.cmd` or `install.cmd` on your new node and the installer will guide you through your
98+
You need to run `run.cmd` or `install.cmd` on your new node and the installer will guide you through your
9999
installation. If not specified otherwise, the node-name will be the hostname of the respective node.
100100

101101
> [!TIP]
102-
> If you use multiple nodes on multiple PCs, you might get to the moment where instances are named identical.
103-
> This will start with the first instance already, if you keep the default name "DCS.release_server".<br>
102+
> If you use multiple nodes on multiple PCs, you might get to the moment where instances are named identically.
103+
> This will start with the first instance already if you keep the default name "DCS.release_server".<br>
104104
> As many configuration files only use the instance name per default, you might need to add the node name as well.
105105
> This can be done the same as it is already in your nodes.yaml: The node can be the outer structure in each config file.
106106
>
@@ -123,10 +123,10 @@ installation. If not specified otherwise, the node-name will be the hostname of
123123
> DCS.release_server:
124124
> some-param: C
125125
> ```
126-
DCSServerBot will understand both versions. The DEFAULT will be used for ALL instances, independent on which node they
126+
DCSServerBot will understand both versions. The DEFAULT will be used for ALL instances, independent of which node they
127127
are on. If you don't provide a node in a multi-node-system, the bot will read the same parameters for all instances
128128
that are named DCS.release_server on any of your nodes. This can be what you want, but it can lead to errors.<br>
129-
I would always recommend to create the node-specific version (ex: "Multi-Node-Config" above) to avoid confusion. That's
129+
I would always recommend creating the node-specific version (ex: "Multi-Node-Config" above) to avoid confusion. That's
130130
what the bot will create during a default installation also.
131131
132132
### Moving a Server from one Node / Instance to another

core/data/impl/nodeimpl.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,14 +518,18 @@ async def upgrade_pending(self) -> bool:
518518
async def _upgrade(self, conn: psycopg.AsyncConnection):
519519
# We do not want to run an upgrade if we are on a cloud drive. Just restart in this case.
520520
if not self.master and self.locals.get('cloud_drive', True):
521+
self.log.debug("Upgrade: restart agent after master upgrade.")
521522
await self.restart()
522523
elif await self.upgrade_pending():
523524
if self.master:
525+
self.log.debug("Upgrade: set update pending to TRUE.")
524526
await conn.execute("""
525527
UPDATE cluster SET update_pending = TRUE WHERE guild_id = %s
526528
""", (self.guild_id, ))
529+
self.log.debug("Upgrade: launch update.py")
527530
await self.shutdown(UPDATE)
528531
elif self.master:
532+
self.log.debug("Upgrade: reset update pending to FALSE.")
529533
await conn.execute("""
530534
UPDATE cluster
531535
SET update_pending = FALSE, version = %s
@@ -791,6 +795,7 @@ async def unregister(self):
791795
async def heartbeat(self) -> bool:
792796
async def handle_upgrade(master: str) -> bool:
793797
if master == self.name:
798+
self.log.debug("Upgrade: Master => trigger agent upgrades")
794799
# let all other nodes upgrade themselve
795800
for node in await self.get_active_nodes():
796801
data = {
@@ -807,6 +812,7 @@ async def handle_upgrade(master: str) -> bool:
807812
""", (__version__, self.guild_id))
808813
return True
809814
elif await is_node_alive(master, 300 if self.slow_system else 180): # give the master time to upgrade
815+
self.log.debug("Upgrade: master => still upgrading")
810816
return False
811817
else:
812818
# the master is dead, so reset update pending

extensions/tacview/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ __Optional__ parameters (will change options.lua if necessary):</br>
4343
* **show_passwords** specifies whether to show the Tacview passwords in the server embed in your status channel or not.
4444
* **target** a channel or directory where your tacview files should be uploaded to on mission end.
4545
46-
To delete old tacview files, checkout the [Cleanup](../../services/cleanup/README.md) service.
46+
To delete old tacview files, check out the [Cleanup](../../services/cleanup/README.md) service.
4747
4848
> [!NOTE]
4949
> The tacviewDataCaptureMode parameter can take any value, but these are the recommended ones by the Tacview team:

extensions/tacview/extension.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,14 @@ async def prepare(self) -> bool:
141141
else:
142142
dirty |= self.set_option(options, name, value)
143143

144-
if not options['Tacview'].get('tacviewPlaybackDelay', 0):
144+
if parse(self.version) < parse('1.9.5') and not options['Tacview'].get('tacviewPlaybackDelay', 0):
145145
self.log.warning(
146146
f' => {self.server.name}: tacviewPlaybackDelay is not set, you might see performance issues!')
147-
elif options['Tacview'].get('tacviewRealTimeTelemetryEnabled', True):
147+
elif int(options['Tacview'].get('tacviewDataCaptureMode', 1)) == 1:
148+
self.log.warning(
149+
f' => {self.server.name}: tacviewDataCaptureMode is set to 1, you might see performance issues!')
150+
151+
if options['Tacview'].get('tacviewRealTimeTelemetryEnabled', True):
148152
self.log.warning(
149153
f' => {self.server.name}: tacviewPlaybackDelay is set, disabling real time telemetry.')
150154
dirty |= self.set_option(options, 'tacviewRealTimeTelemetryEnabled', False)

0 commit comments

Comments
 (0)