changed it back so only the name is checked

pull/87/head
Christopher Usher 5 years ago
parent 7591428168
commit 44f0e0defb

@ -36,6 +36,7 @@ You can edit the `docker-compose.jsonnet` file to set the configuration options.
* `segments_path`, the local path to save segments to. * `segments_path`, the local path to save segments to.
* `db_args`, the arguments for connecting to the wubloader database. You will likely need to update the `user`, `password` and `host` to match the database node that you are connecting to. * `db_args`, the arguments for connecting to the wubloader database. You will likely need to update the `user`, `password` and `host` to match the database node that you are connecting to.
* `ports`, the ports to expose each service on. Only the `nginx` port (default on port 80) needs to be externally accessible for a non-database node as all the other services are routed through `nginx`. * `ports`, the ports to expose each service on. Only the `nginx` port (default on port 80) needs to be externally accessible for a non-database node as all the other services are routed through `nginx`.
* `localhost`, the name of the local machine as it appears in the database `nodes` table. This is prevent the node from backfilling from itself.
To generate the `docker-compose.yml` file used by `docker-compose`, run `generate-docker-compose` To generate the `docker-compose.yml` file used by `docker-compose`, run `generate-docker-compose`

@ -242,9 +242,9 @@ class BackfillerManager(object):
only the URL is provided, the node name is taken from the hostname. only the URL is provided, the node name is taken from the hostname.
Third, node names and URLs can be requested from the database given by Third, node names and URLs can be requested from the database given by
--node-database. If multiple nodes URLs with the same name are found, --node-database. If multiple nodes URLs with the same name are found,
only the last is retained and any nodes matching the local hostname only the last is retained and any nodes with names matching the
(given by the --hostname argument) are ignored to try to prevent this localhost name (given by the --localhost argument) are ignored to try
node from backfilling from itself.""" to prevent this node from backfilling from itself."""
nodes = {urlparse.urlparse(node).hostname:node for node in self.static_nodes} nodes = {urlparse.urlparse(node).hostname:node for node in self.static_nodes}
@ -269,7 +269,6 @@ class BackfillerManager(object):
WHERE backfill_from""") WHERE backfill_from""")
for row in results: for row in results:
nodes[row.name] = row.url nodes[row.name] = row.url
nodes = {key:val for key, val in nodes.items() if val != self.localhost}
nodes.pop(self.localhost, None) nodes.pop(self.localhost, None)
return nodes.values() return nodes.values()

@ -62,7 +62,7 @@
peers:: [ peers:: [
], ],
localhost:: "http://example.com", // the name or URL of this node as it appears in the nodes table of the database localhost:: "http://example.com", // the name in the nodes table of the database
authentication:: true, // set to false to disable auth in thrimshim authentication:: true, // set to false to disable auth in thrimshim
thrimbletrimmer:: true, // set to false to not have nginx serve thrimbletrimmer pages. thrimbletrimmer:: true, // set to false to not have nginx serve thrimbletrimmer pages.

Loading…
Cancel
Save