aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rpkid/rpki/irdb/zookeeper.py11
-rw-r--r--rpkid/rpki/rpkic.py16
2 files changed, 26 insertions, 1 deletions
diff --git a/rpkid/rpki/irdb/zookeeper.py b/rpkid/rpki/irdb/zookeeper.py
index 7cd9020e..d172e18e 100644
--- a/rpkid/rpki/irdb/zookeeper.py
+++ b/rpkid/rpki/irdb/zookeeper.py
@@ -912,7 +912,7 @@ class Zookeeper(object):
"""
Poke rpkid to immediately run the cron job for the current handle.
- This method is used by the gui when a user has changed something in the
+ This method is used by the GUI when a user has changed something in the
IRDB (ghostbuster, roa) which does not require a full synchronize() call,
to force the object to be immediately issued.
"""
@@ -921,6 +921,15 @@ class Zookeeper(object):
action = "set", self_handle = self.handle, run_now = "yes"))
+ def publish_world_now(self):
+ """
+ Poke rpkid to (re)publish everything for the current handle.
+ """
+
+ self.call_rpkid(rpki.left_right.self_elt.make_pdu(
+ action = "set", self_handle = self.handle, publish_world_now = "yes"))
+
+
def call_pubd(self, *pdus):
"""
Issue a call to pubd, return result.
diff --git a/rpkid/rpki/rpkic.py b/rpkid/rpki/rpkic.py
index 5ac559ca..a94954a2 100644
--- a/rpkid/rpki/rpkic.py
+++ b/rpkid/rpki/rpkic.py
@@ -507,3 +507,19 @@ class main(rpki.cli.Cmd):
raise BadCommandSyntax("Unexpected argument(s): %r" % arg)
self.zoo.synchronize(self.zoo.handle)
+
+
+ def do_force_publication(self, arg):
+ """
+ Whack rpkid to force (re)publication of everything.
+
+ This is not usually necessary, as rpkid automatically publishes
+ changes it makes, but this command can be useful occasionally when
+ a fault or configuration error has left rpkid holding data which
+ it has not been able to publish.
+ """
+
+ if arg:
+ raise BadCommandSyntax("Unexpected argument(s): %r" % arg)
+
+ self.zoo.publish_world_now()