Project

General

Profile

Actions

Feature #5169

closed

nfdc: execute a batch of commands defined in a separate file

Added by Alex Afanasyev over 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Tools
Target version:
Start date:
06/09/2021
Due date:
% Done:

100%

Estimated time:

Description

At least until we change how a large number of commands is processed by NFD, we need to accomodate case when nfdc is used to create multiple faces/routes at once. The current solution of executing nfdc multiple times faces an issue of command being rejected, as there is no state kept between individual executions of nfdc and signature may include the same timestamp (and as such, deemed invalid), e.g., when running on a powerful machine.

This feature is a simple modification to nfdc to allow multiple commands to be executed while preserving the signing state, thus creating signatures that will not be incorrectly rejected by the validator.


Related issues 3 (1 open2 closed)

Related to NFD - Feature #2542: Redesign nfdc combining nfdc and nfd-statusClosedJunxiao Shi

Actions
Related to NFD - Bug #4511: Failure of RIB register commands within short period of time Rejected

Actions
Blocks mini-ndn - Task #5174: ndnRoutingHelper: Use nfdc batch command to install routeNew06/24/2021

Actions
Actions #1

Updated by Junxiao Shi over 3 years ago

Design questions:

If one of the commands contains a syntax error, should nfdc validate all the commands before trying to execute the batch?

If one of the commands is syntactically correct but has an execution failure (e.g. strategy set with a non-existent strategy), should nfdc continue executing the next commands or terminate?

Actions #2

Updated by Alex Afanasyev over 3 years ago

https://gerrit.named-data.net/c/NFD/+/6445

One thing I wasn't sure whether to proceed executing commands after an error or abort. Right now, the commands are aborted. Exception is the case when issue is in format of the command, which will just stop processing and will not execute commands at all.

^ this also an answer to Junxiao's question.

Actions #3

Updated by Davide Pesavento over 3 years ago

  • Related to Feature #2542: Redesign nfdc combining nfdc and nfd-status added
Actions #4

Updated by Davide Pesavento over 3 years ago

  • Subject changed from Allow nfdc execute batch of commands defined in a separate file to nfdc: execute a batch of commands defined in a separate file
  • Status changed from New to In Progress
Actions #5

Updated by Davide Pesavento over 3 years ago

The obvious (and safer) choice is to stop executing the list of commands as soon as one fails (and return its exit code). We can extend the format later to ignore the exit status of a command and continue through the list (e.g. prefix the command with "-" like in make).

Actions #6

Updated by Davide Pesavento over 3 years ago

Will each command be printed before being executed? If so, we could also add a "@" prefix to suppress echoing the command (or the reverse: not print by default unless "@" is specified). Just an idea...

Actions #7

Updated by Davide Pesavento over 3 years ago

  • Related to Bug #4511: Failure of RIB register commands within short period of time added
Actions #8

Updated by Junxiao Shi about 3 years ago

  • Blocks Task #5174: ndnRoutingHelper: Use nfdc batch command to install route added
Actions #9

Updated by Davide Pesavento almost 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 60 to 100
Actions

Also available in: Atom PDF