-
Notifications
You must be signed in to change notification settings - Fork 940
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(framework) Introduce
flwr_exit
function (#4801)
Co-authored-by: Javier <[email protected]> Co-authored-by: Daniel J. Beutel <[email protected]>
- Loading branch information
1 parent
17ef284
commit aa4442f
Showing
28 changed files
with
548 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Exit Codes | ||
========== | ||
|
||
This reference provides an index of all exit codes and recommended resolutions. | ||
|
||
Categories | ||
---------- | ||
|
||
- **Success exit codes (0-99)**: Indicate successful completion of processes. | ||
- **SuperLink-specific exit codes (100-199)**: Specific to ``flower-superlink`` | ||
(SuperLink) errors. | ||
- **ServerApp-specific exit codes (200-299)**: Specific to ``flwr-serverapp`` | ||
(ServerApp) errors. | ||
- **SuperNode-specific exit codes (300-399)**: Specific to ``flower-supernode`` | ||
(SuperNode) errors. | ||
- **ClientApp-specific exit codes (400-499)**: Specific to ``flwr-clientapp`` | ||
(ClientApp) errors. | ||
- **Common exit codes (500-)**: Shared across multiple components. | ||
|
||
Indices | ||
------- | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:glob: | ||
|
||
ref-exit-codes/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[0] SUCCESS | ||
=========== | ||
|
||
Description | ||
----------- | ||
|
||
The process completed successfully. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[1] GRACEFUL_EXIT_SIGINT | ||
======================== | ||
|
||
Description | ||
----------- | ||
|
||
The process exited gracefully, triggered by ``SIGINT``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[2] GRACEFUL_EXIT_SIGQUIT | ||
========================= | ||
|
||
Description | ||
----------- | ||
|
||
The process exited gracefully, triggered by ``SIGQUIT``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[3] GRACEFUL_EXIT_SIGTERM | ||
========================= | ||
|
||
Description | ||
----------- | ||
|
||
The process exited gracefully, triggered by ``SIGTERM``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[100] SUPERLINK_THREAD_CRASH | ||
============================ | ||
|
||
Description | ||
----------- | ||
|
||
A critical background thread has crashed in the SuperLink, causing it to exit | ||
prematurely. This indicates a serious issue with the SuperLink that requires immediate | ||
investigation. | ||
|
||
Critical background threads include: | ||
|
||
1. **Scheduler**: Schedules the execution of runs. This thread exists only when the | ||
isolation mode is set to ``subprocess`` (default). | ||
2. **REST API server**: Manages the REST API server. This thread exists only when the | ||
Fleet API type is set to ``rest``. | ||
|
||
How to Resolve | ||
-------------- | ||
|
||
1. Check the logs for any errors that may have caused the thread to crash. | ||
2. Ensure the SuperLink's configuration is correct. | ||
3. If the issue persists, please contact support for further assistance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[300] SUPERNODE_REST_ADDRESS_INVALID | ||
==================================== | ||
|
||
Description | ||
----------- | ||
|
||
The provided SuperLink address for the REST API is invalid. The address must start with | ||
``http://`` or ``https://`` to be recognized correctly. | ||
|
||
How to Resolve | ||
-------------- | ||
|
||
When using the REST API, ensure that the server address starts with either ``https://`` | ||
or ``http://``. For example: | ||
|
||
- ``http://127.0.0.1:8080`` | ||
- ``https://example.com:8080`` | ||
|
||
Verify the address in your configuration or command-line arguments and correct it as | ||
needed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[301] SUPERNODE_NODE_AUTH_KEYS_REQUIRED | ||
======================================= | ||
|
||
Description | ||
----------- | ||
|
||
To run the SuperNode with authentication, file paths for both the private and public | ||
keys must be provided. Specifically, the following options must be specified: | ||
|
||
- ``--auth-supernode-private-key`` | ||
- ``--auth-supernode-public-key`` | ||
|
||
Providing only one of these options is insufficient for authentication. | ||
|
||
How to Resolve | ||
-------------- | ||
|
||
1. Ensure that the paths to both the private key and public key files are specified in | ||
command-line arguments. For example: | ||
|
||
.. code-block:: bash | ||
--auth-supernode-private-key /path/to/private_key.pem | ||
--auth-supernode-public-key /path/to/public_key.pem | ||
2. Verify that the specified file paths are correct and that the files exist. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[302] SUPERNODE_NODE_AUTH_KEYS_INVALID | ||
====================================== | ||
|
||
Description | ||
----------- | ||
|
||
The provided key files are invalid. Authentication requires a valid elliptic curve | ||
private and public key pair. This error occurs when either: | ||
|
||
- The **private key** file specified in ``--auth-supernode-private-key`` is invalid or | ||
unreadable. | ||
- The **public key** file specified in ``--auth-supernode-public-key`` is invalid or | ||
unreadable. | ||
|
||
How to Resolve | ||
-------------- | ||
|
||
1. Ensure that the file paths provided for the private and public key options are | ||
correct. | ||
|
||
2. Verify that both files exist and contain valid elliptic curve keys. - The private key | ||
file should be in a format compatible with elliptic curve cryptography. - The public key | ||
file should match the private key. | ||
|
||
3. If the files are corrupted or not in the correct format, regenerate the elliptic | ||
curve key pair and update the file paths accordingly. For example, in Linux/MacOS, **for | ||
rapid prototyping only** (not production; follow company procedures for key management): | ||
|
||
.. code-block:: bash | ||
openssl ecparam-genkey -name secp384r1 -out private_key.pem | ||
openssl ec -in private_key.pem -pubout -out public_key.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[500] COMMON_ADDRESS_INVALID | ||
============================ | ||
|
||
Description | ||
----------- | ||
|
||
The provided address is invalid and cannot be parsed. It must be a valid URL, IPv4, or | ||
IPv6 address. | ||
|
||
How to Resolve | ||
-------------- | ||
|
||
Verify that the address is correctly formatted as one of the following: | ||
- URL (e.g., ``https://127.0.0.1:8080`` or ``https://example.com:8080``) | ||
- IPv4 (e.g., ``192.168.1.1:9091``) | ||
- IPv6 (e.g., ``[2001:0db8::1]:9092``) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[501] COMMON_MISSING_EXTRA_REST | ||
=============================== | ||
|
||
Description | ||
----------- | ||
|
||
Extra dependencies required for using the REST-based Fleet API are missing. | ||
|
||
How to Resolve | ||
-------------- | ||
|
||
To enable the REST-based Fleet API, install ``flwr`` with the ``rest`` extra: | ||
|
||
.. code-block:: bash | ||
pip install "flwr[rest]" | ||
Ensure that the installation completes successfully, and then retry. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[502] COMMON_TLS_NOT_SUPPORTED | ||
============================== | ||
|
||
Description | ||
----------- | ||
|
||
The ``flwr-serverapp`` and ``flwr-clientapp`` do not currently support TLS, as they are | ||
assumed to be executed within the same network as their respective long-running | ||
processes: ``flower-superlink`` and ``flower-supernode``. Please refer to the `Flower | ||
Network Communication <../ref-flower-network-communication.html>`_ guide for further | ||
details. | ||
|
||
How to Resolve | ||
-------------- | ||
|
||
Use the ``--insecure`` flag to proceed without TLS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[<CODE>] <NAME> | ||
=============== | ||
|
||
Description | ||
----------- | ||
|
||
<DESCRIPTION> | ||
|
||
How to Resolve | ||
-------------- | ||
|
||
<RESOLUTION_STEPS> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.