summaryrefslogtreecommitdiff
path: root/controller/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'controller/README.md')
-rw-r--r--controller/README.md23
1 files changed, 9 insertions, 14 deletions
diff --git a/controller/README.md b/controller/README.md
index 805641d9..db8d0153 100644
--- a/controller/README.md
+++ b/controller/README.md
@@ -7,7 +7,7 @@ As of ZeroTier One version 1.2.0 this code is included in normal builds for desk
Controller data is stored in JSON format under `controller.d` in the ZeroTier working directory. It can be copied, rsync'd, placed in `git`, etc. The files under `controller.d` should not be modified in place while the controller is running or data loss may result, and if they are edited directly take care not to save corrupt JSON since that can also lead to data loss when the controller is restarted. Going through the API is strongly preferred to directly modifying these files.
-### Upgrading from Older Versions
+### Upgrading from Older (1.1.14 or earlier) Versions
Older versions of this code used a SQLite database instead of in-filesystem JSON. A migration utility called `migrate-sqlite` is included here and *must* be used to migrate this data to the new format. If the controller is started with an old `controller.db` in its working directory it will terminate after printing an error to *stderr*. This is done to prevent "surprises" for those running DIY controllers using the old code.
@@ -15,15 +15,9 @@ The migration tool is written in nodeJS and can be used like this:
cd migrate-sqlite
npm install
- node migrate-sqlite.js <path to ZeroTier working directory>
+ node migrate.js </path/to/controller.db> </path/to/controller.d>
-You may need to `sudo node ...` if the ZeroTier working directory is owned by root.
-
-This code will dump the contents of any `controller.db` in the ZeroTier working directory and recreate its data in the form of JSON objects under `controller.d`. The old `controller.db` will then be renamed to `controller.db.migrated` and the controller will start normally.
-
-After migrating make sure that the contents of `controller.d` are owned and writable by the user that will be running the ZeroTier controller process! (Usually this is root but controllers that don't also join networks are sometimes run as unprivileged users.)
-
-If you don't have nodeJS on the machine running ZeroTier it is perfectly fine to just copy `controller.db` to a directory on another machine and run the migration tool there. After running your migration the contents of `controller.d` can be tar'd up and copied back over to the controller. Just remember to rename or remove `controller.db` on the controller machine afterwords so the controller will start.
+Very old versions of nodeJS may have issues. We tested it with version 7.
### Scalability and Reliability
@@ -243,11 +237,12 @@ Note that managed IP assignments are only used if they fall within a managed rou
| Field | Type | Description |
| --------------------- | ------------- | ------------------------------------------------- |
| ts | integer | Time of request, ms since epoch |
-| authorized | boolean | Was member authorized? |
-| clientMajorVersion | integer | Client major version or -1 if unknown |
-| clientMinorVersion | integer | Client minor version or -1 if unknown |
-| clientRevision | integer | Client revision or -1 if unknown |
-| clientProtocolVersion | integer | ZeroTier protocol version reported by client |
+| auth | boolean | Was member authorized? |
+| authBy | string | How was member authorized? |
+| vMajor | integer | Client major version or -1 if unknown |
+| vMinor | integer | Client minor version or -1 if unknown |
+| vRev | integer | Client revision or -1 if unknown |
+| vProto | integer | ZeroTier protocol version reported by client |
| fromAddr | string | Physical address if known |
The controller can only know a member's `fromAddr` if it's able to establish a direct path to it. Members behind very restrictive firewalls may not have this information since the controller will be receiving the member's requests by way of a relay. ZeroTier does not back-trace IP paths as packets are relayed since this would add a lot of protocol overhead.