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.
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.
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?
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.
- Related to Feature #2542: Redesign nfdc combining nfdc and nfd-status added
- 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
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
).
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...
- Related to Bug #4511: Failure of RIB register commands within short period of time added
- Blocks Task #5174: ndnRoutingHelper: Use nfdc batch command to install route added
- Status changed from In Progress to Closed
- % Done changed from 60 to 100
Also available in: Atom
PDF