Project

General

Profile

Actions

Feature #4129

open

Management Dispatcher for repo commands

Added by Junxiao Shi over 7 years ago. Updated about 6 years ago.

Status:
New
Priority:
Normal
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
6.00 h

Description

Use ndn::mgmt::Dispatcher for accepting insert, delete, and watch commands.


Related issues 2 (1 open1 closed)

Related to repo-ng - Bug #4944: ndnputfile does not workNew

Actions
Blocked by repo-ng - Bug #2023: ERROR: Failed to register prefix in local hub's daemonClosedJunxiao Shi10/03/2014

Actions
Actions #1

Updated by Junxiao Shi over 7 years ago

  • Blocked by Bug #2023: ERROR: Failed to register prefix in local hub's daemon added
Actions #2

Updated by Junxiao Shi over 7 years ago

  • Assignee set to Muktadir Chowdhury

This is needed to reduce the direct dependency on v1 validators.

Actions #3

Updated by Muktadir Chowdhury over 7 years ago

I integrated dispatcher. In unit-tests, the identity management fixture uses v2::security. Unit-tests are passing with v2::security but integrated test is failing.

So I changed it to v1::security. Now all the tests are failing. What should I do now?

Actions #4

Updated by Junxiao Shi over 7 years ago

  • Blocks Task #4091: Adapt to ndn-cxx v2::KeyChain and Validator added
Actions #5

Updated by Junxiao Shi over 7 years ago

As I explained in 20170731 NFD call, this issue should keep using ndn-cxx v1 Validator, and specifically ValidatorNull. It would never pass Jenkins, but you can manually verify the build with ndn-cxx-breaks and set ndn-cxx to patchset 4050,2; you should post the build log link on Gerrit. When it's time to merge, I'll override the negative vote from Jenkins and approve the Change.

The switchover to v2 Validator is to be performed in #4091 and needs to wait for v2 ValidationPolicyConfig to become ready.

Actions #6

Updated by Muktadir Chowdhury over 7 years ago

SInce tests/identity-management-fixture is using v2::Certificate, I am using latest ndn-cxx and it also contains ValidatorNull. But my code was breaking due to this commit ( https://github.com/named-data/ndn-cxx/commit/6938e3461bc7b64531403b05d18d492d4713c641), so changed src/storage/index.cpp to use the new name. Then everything compiles and build/unit-tests passes but integrated/ tests are failing.

Actions #7

Updated by Junxiao Shi over 7 years ago

Let me repeat: This issue is to switch to Dispatcher, while still using v1 ValidatorNull. It needs to be manually verified with ndn-cxx:commit:2dd711d0a3796a0731f7fe86aba10b8c867edb4e through ndn-cxx-breaks by entering "4050,2".

The reason of separation is to minimize changes in each commit, so that it's clear what changes are for dispatch and what changes are for validator.
ValidatorNull completely ignores the signature so it will accept a command Interest even it's signed with another version's KeyChain.

Actions #8

Updated by Muktadir Chowdhury about 7 years ago

What are the optional and required parameters of RepoCommands (watch, delete, insert)? Are all the fields required for all the commands? There is no mentioning about it here https://redmine.named-data.net/projects/repo-ng/wiki/Repo_Command

Actions #9

Updated by Junxiao Shi about 7 years ago

What are the optional and required parameters of RepoCommands (watch, delete, insert)? Are all the fields required for all the commands?

They are mentioned on Basic_Repo_Insertion_Protocol, Repo_Deletion_Protocol, and Watched_Prefix_Insertion_Protocol under each command.

Actions #10

Updated by Muktadir Chowdhury about 7 years ago

@junxiao, Since we are adopting ndn::mgmt::Dispatcher, repo::RepoCommandResponse should inherit from ndn::mgmt::ControlResponse. What do you think?

Actions #11

Updated by Junxiao Shi about 7 years ago

Since we are adopting ndn::mgmt::Dispatcher, repo::RepoCommandResponse should inherit from ndn::mgmt::ControlResponse.

Yes, exactly.

Actions #12

Updated by weijia yuan about 6 years ago

Read handle is inherited from base handle, the others are inherited from command base handle. Read is not exactly a command that needs to be validated. The other three handle are using CommandBaseHandle:makeAuthorization() includes validator. So I think the original design is right.
Or using dispatcher, we actually don't need any kind of validator in this code? In that case I can delete the makeAuthorization and make all handles inherited from command base handle.

Actions #13

Updated by weijia yuan about 6 years ago

and I have been trying to run integrated test for this change. Under which version of ndn-cxx I should use to verify the code(your previous discussion is about one year ago)?

Actions #14

Updated by Junxiao Shi about 6 years ago

Reply to note-12: please read Dispatcher API to find the answers.

Reply to note-12: all tests need to pass against ndn-cxx in master branch.

Actions #15

Updated by Junxiao Shi about 6 years ago

  • Blocks deleted (Task #4091: Adapt to ndn-cxx v2::KeyChain and Validator)
Actions #16

Updated by Ashlesh Gawande almost 5 years ago

  • Related to Bug #4944: ndnputfile does not work added
Actions

Also available in: Atom PDF