public status report on nm-platform and enterprise networking



Hi,

I've been working on the 'pavlix/platform' branch for some time already. Now I feel it is a time to make a public comment. Meanwhile Dan Williams merged the long-awaited 'bridge' branch. So I rebased
'pavlix/platform' on top of the new master.

NMPlatform is the central point of interaction with the platform. The platform consist of the kernel and a small number of services than provide stuff kernel doesn't. The udev service is an example, but it is not yet implemented. It is basically a rewrite of nm-netlink-*, nm-system and various calls and
hacks throughout the whole NetworkManager code tree.

So, what makes the new code different?

1) Most platform interaction code is now in 'src/platform' subtree. The long term plan is to have
there all such code. The rest of NetworkManager should only *use* this code.

2) src/platform/platform.h is an API designed to only support actions required by NetworkManager (as opposed to libnl, which is designed to provide as many kernel netlink features as possible)

3) There are two implementations of the API.

3.1) The 'linux' implementation interacts with various libnl versions and various kernels.

3.2) The 'fake' implementation behaves as a real one in all possible manners. It will be used to test the rest of NetworkManager.

4) Both implementations are testable with a common test suite. The 'linux' tests interface with the real kernel, so it requires root access and disabled network configuration services.

4.1) The tests verify that both platform implementations behave in a well-defined manner. Especially that once you recieve information about an interface, or change the state of an interface, you can
request the information again and will *not* get information than you already have.

4.2) The 'linux' test verifies interoperability with the exact libnl version you have and the precise kernel version you have.

4.3) The 'linux' test can be used to find bugs in libnl and kernel. I've already done so.

5) Theoretically, one could implement another real platform implementation as a part of porting NetworkManager to another platform and use the testsuite to verify the support. But this is a larger undertaking and I can only provide limited support to anyone who would like to do that.

Current status:

I'm keeping the 'pavlix/platform' branch buildable but *not* usable. Please read all commit messages before doing anything with this branch. History is being rewritten several times a day.

Tests for bridging and bonding are in place and work well with my versions of libnl 1.x and libnl 3.x. If the tests don't run on your particular platform setup, please let me know, including libnl 2.x that I haven't tested, yet.

Contingency plan:

1) In a few days, all link-related functions should be ready to go to master.

2) Then, other NM components can start using nm-platform to modify the kernel state.

3) The same components can immediately start requesting information through nm-platform and make use of nm-platform notifications. But they must also do #2 to avoid device state inconsistencies, as modification functions also update the caches and these are used to filter out obsolete kernel notifications.

4) Then tests for addresses and routes should be done, missing parts should be implemented, bugs fixed, and steps similar to #2 and #3 should be done with those. Note that addresses and routes
are much easier to cope with.

5...) Hic sunt dragones. Udev support should be moved into nm-platform. NetworkManager should be modified to be able to perform non-root tests. Basic test suites should be composed. Bugs found and fixed. There's a lot of stuff anyone can do then to improve overall upstream and downstream NetworkManager QA. Many things can be done during bugfixing to ease the process and to keep tests for the bugfixes for future 'make check' runs.

If you are going to look at the branch, please start with the tests in src/platform/tests/nm-platform-test.c.

I will post more information, as we proceed. Comments are welcome.

Cheers,

Pavel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]