Feature #5169
closednfdc: execute a batch of commands defined in a separate file
100%
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.
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?
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.
Updated by Davide Pesavento over 3 years ago
- Related to Feature #2542: Redesign nfdc combining nfdc and nfd-status added
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
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
).
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...
Updated by Davide Pesavento over 3 years ago
- Related to Bug #4511: Failure of RIB register commands within short period of time added
Updated by Junxiao Shi almost 3 years ago
- Blocks Task #5174: ndnRoutingHelper: Use nfdc batch command to install route added
Updated by Davide Pesavento almost 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 60 to 100