Browse Source

Add getinfo accepted-server-descriptor. Clean spec.

Add a "getinfo status/accepted-server-descriptor" controller
command, which is the recommended way for controllers to learn
whether our server descriptor has been successfully received by at
least on directory authority. Un-recommend good-server-descriptor
getinfo and status events until we have a better design for them.
Roger Dingledine 14 years ago
parent
commit
075c004095
3 changed files with 22 additions and 6 deletions
  1. 7 0
      ChangeLog
  2. 10 5
      doc/spec/control-spec.txt
  3. 5 1
      src/or/control.c

+ 7 - 0
ChangeLog

@@ -30,6 +30,13 @@ Changes in version 0.2.1.20 - 2009-??-??
       overall failure. Bugfix on 0.1.2.6-alpha. Fixes bug 1075. Reported
       overall failure. Bugfix on 0.1.2.6-alpha. Fixes bug 1075. Reported
       by SwissTorExit.
       by SwissTorExit.
 
 
+  o Minor features:
+    - Add a "getinfo status/accepted-server-descriptor" controller
+      command, which is the recommended way for controllers to learn
+      whether our server descriptor has been successfully received by at
+      least on directory authority. Un-recommend good-server-descriptor
+      getinfo and status events until we have a better design for them.
+
 
 
 Changes in version 0.2.1.19 - 2009-07-28
 Changes in version 0.2.1.19 - 2009-07-28
   Tor 0.2.1.19 fixes a major bug with accessing and providing hidden
   Tor 0.2.1.19 fixes a major bug with accessing and providing hidden

+ 10 - 5
doc/spec/control-spec.txt

@@ -558,6 +558,7 @@ $Id$
     "status/circuit-established"
     "status/circuit-established"
     "status/enough-dir-info"
     "status/enough-dir-info"
     "status/good-server-descriptor"
     "status/good-server-descriptor"
+    "status/accepted-server-descriptor"
     "status/..."
     "status/..."
       These provide the current internal Tor values for various Tor
       These provide the current internal Tor values for various Tor
       states. See Section 4.1.10 for explanations. (Only a few of the
       states. See Section 4.1.10 for explanations. (Only a few of the
@@ -1488,18 +1489,22 @@ $Id$
        We successfully uploaded our server descriptor to at least one
        We successfully uploaded our server descriptor to at least one
        of the directory authorities, with no complaints.
        of the directory authorities, with no complaints.
 
 
-       {This event could affect the controller's idea of server status, but
-       the controller should not interrupt the user to tell them so.}
+       {Originally, the goal of this event was to declare "every authority
+       has accepted the descriptor, so there will be no complaints
+       about it." But since some authorities might be offline, it's
+       harder to get certainty than we had thought. As such, this event
+       is equivalent to ACCEPTED_SERVER_DESCRIPTOR below. Controllers
+       should just look at ACCEPTED_SERVER_DESCRIPTOR and should ignore
+       this event for now.}
 
 
      NAMESERVER_STATUS
      NAMESERVER_STATUS
      "NS=addr"
      "NS=addr"
      "STATUS=" "UP" / "DOWN"
      "STATUS=" "UP" / "DOWN"
      "ERR=" message
      "ERR=" message
         One of our nameservers has changed status.
         One of our nameservers has changed status.
-        // actually notice
 
 
-       {This event could affect the controller's idea of server status, but
-       the controller should not interrupt the user to tell them so.}
+        {This event could affect the controller's idea of server status, but
+        the controller should not interrupt the user to tell them so.}
 
 
      NAMESERVER_ALL_DOWN
      NAMESERVER_ALL_DOWN
         All of our nameservers have gone down.
         All of our nameservers have gone down.

+ 5 - 1
src/or/control.c

@@ -1789,7 +1789,11 @@ getinfo_helper_events(control_connection_t *control_conn,
       *answer = tor_strdup(has_completed_circuit ? "1" : "0");
       *answer = tor_strdup(has_completed_circuit ? "1" : "0");
     } else if (!strcmp(question, "status/enough-dir-info")) {
     } else if (!strcmp(question, "status/enough-dir-info")) {
       *answer = tor_strdup(router_have_minimum_dir_info() ? "1" : "0");
       *answer = tor_strdup(router_have_minimum_dir_info() ? "1" : "0");
-    } else if (!strcmp(question, "status/good-server-descriptor")) {
+    } else if (!strcmp(question, "status/good-server-descriptor") ||
+               !strcmp(question, "status/accepted-server-descriptor")) {
+      /* They're equivalent for now, until we can figure out how to make
+       * good-server-descriptor be what we want. See comment in
+       * control-spec.txt. */
       *answer = tor_strdup(directories_have_accepted_server_descriptor()
       *answer = tor_strdup(directories_have_accepted_server_descriptor()
                            ? "1" : "0");
                            ? "1" : "0");
     } else if (!strcmp(question, "status/reachability-succeeded/or")) {
     } else if (!strcmp(question, "status/reachability-succeeded/or")) {