Skip to content

[pull] master from facebook:master - #5

Merged
pull[bot] merged 38 commits into
Rachelmorrell:masterfrom
meta:master
Nov 10, 2018
Merged

pull[bot] merged 38 commits into
Rachelmorrell:masterfrom
meta:master

Conversation

@pull

@pull pull Bot commented Nov 10, 2018 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot]

svcscm and others added 30 commits November 4, 2018 13:07
Reviewed By: cdelahousse

fbshipit-source-id: 97902eddbd69005a5d709d21593c8969fa23fa79
Reviewed By: cdelahousse

fbshipit-source-id: 6bc625be5b76785134aa81146197203cdc8f3005
Reviewed By: cdelahousse

fbshipit-source-id: c85f0356377923b6f0f9072c7ade60150003f210
Reviewed By: yns88

fbshipit-source-id: 37f1ccdcd31fdf41f5a5d3f04ff6df157b692c88
Summary:
Main goal was to use sockets communication to retrieve data as opposed to
retrieve data via 'breeze kvstore adj --json' via ssh.

While doing so, I ended up fixing lot of minor code improvements
- properly do imports instead of indirect import
- delete GetKvStore* steps as they were no longer needed
- rename some functions for better semantics
- support kvstore-dump with difference

Breaking down diff into smaller ones was getting too complicated so thought of
sending out a bigger diff.

(Note: this ignores all push blocking failures!)

Reviewed By: smaheshm, cenzhao

Differential Revision: D12899689

fbshipit-source-id: 0f0f0bb312132604cc8ca87df921f84426e57a4e
Reviewed By: yns88

fbshipit-source-id: cf4109fe2be50e02ea5c1f4dedb5ed8da9318721
Reviewed By: yns88

fbshipit-source-id: 3a25b6c194c13e7467b7110cf80951c65d5e92ee
Reviewed By: yns88

fbshipit-source-id: 1e38bcefa96ca1e8b96d4014e02a102bc125d336
Reviewed By: yns88

fbshipit-source-id: d49a807f24e7d719c062445444d858658cc33ec2
Reviewed By: yns88

fbshipit-source-id: c79986d70473894638fa0884aa94709361b2f870
Reviewed By: yns88

fbshipit-source-id: ba22831344fab6cbd005922640875b7bddf768c0
Reviewed By: yns88

fbshipit-source-id: 4dfc229277bd9ed63703af3d8712c07f28ad831e
Reviewed By: yns88

fbshipit-source-id: a8052a0adb274892ca3cf64966d4b3bc58d4a6b8
Summary: For consistence looking codebase

Reviewed By: cenzhao

Differential Revision: D12947521

fbshipit-source-id: 57deaef4758d446bdfdbcf4c7530034c56478803
Summary: For consistence looking codebase

Reviewed By: cenzhao

Differential Revision: D12947519

fbshipit-source-id: 3b42ccd0103faf03bcc49628c756c881c1684508
Summary: In `breeze lm links` command output, if one link is currently unstable (linkFlapBackOffMs > 0), then show its status as "Backoff" and append the backoff milliseconds to it.

Reviewed By: saifhhasan

Differential Revision: D12936999

fbshipit-source-id: 04e8db8456901ccf613650b2516bfe643cb733c1
Reviewed By: yns88

fbshipit-source-id: 9716754d8eb402a8eda00f6d58cbcb72f331767f
Reviewed By: yns88

fbshipit-source-id: 121fcda5c21222fdde88fa031b70b419b722400f
Reviewed By: yns88

fbshipit-source-id: 13f580764a0fd502ad01724f133b25da2c46b14a
Reviewed By: yns88

fbshipit-source-id: 21dde577fc4bd996ec0ec8fff49248c5f9195dd3
Reviewed By: yns88

fbshipit-source-id: 834bc5a45bd57a7a1baadd6bb3ca21a4bfd297f5
Reviewed By: yns88

fbshipit-source-id: e83520cbfcaa7ee0d56c9a15750ee81ec2137b26
Reviewed By: yns88

fbshipit-source-id: 64a39cfaa618c059f7e0adb99287a72e909bf3c5
Reviewed By: yns88

fbshipit-source-id: 416e7a8e3a3b430dc8f894b1cb6aa75666283228
Summary: In TG code the event publisher object has a shared ptr to netlink object. Having event publisher shared pointer in netlink object causes cyclic dependecy causing destructors to not finish.

Reviewed By: saifhhasan

Differential Revision: D12934049

fbshipit-source-id: e382304b16c12150648f87c19ee592089238a082
Reviewed By: yns88

fbshipit-source-id: 4658a0baf10716d03dbb0a2961d4d26e12c3156e
Reviewed By: yns88

fbshipit-source-id: 4dee617bca30d13d497bb5d8b4a5a3df22048b6f
Summary: Easier to pring netlink objects for debugging purpose

Reviewed By: jstrizich

Differential Revision: D12970614

fbshipit-source-id: d0a7f2b338bfe316532376cb1a99b30b3b92dd05
Reviewed By: yns88

fbshipit-source-id: 8d51768aa13b28233257f51888d5b7ef67d43878
Reviewed By: yns88

fbshipit-source-id: 126f0e589f3b2c1f8c204067fcf51f000bb7a74b
svcscm and others added 8 commits November 8, 2018 17:25
Reviewed By: yns88

fbshipit-source-id: 94f2fd06301573de7f34c956cdb287c891b94aa8
Reviewed By: yns88

fbshipit-source-id: 1868dd3065b5290a96723416d7383bec76659ae0
Summary:
In D12947521, `f""`-style format strings were added. This requires Python 3.6, but SoMA (and maybe others) use 3.5.

Revert the two `f""`-style strings to `"".format()`-style to unbreak.

Reviewed By: smaheshm

Differential Revision: D12984821

fbshipit-source-id: 60b9adc29c4948d1320d7072e7a7b35a71556753
Reviewed By: simpkins

Differential Revision: D12990230

fbshipit-source-id: 58d82299a8fe6aed75115008fe5dfb0f46d847c6
Reviewed By: yns88

fbshipit-source-id: a78bb040f735e28a90abda6a718f2131fb6b5618
Reviewed By: yns88

fbshipit-source-id: e4cd85d6ae5a56e33007ff4d5f75fb779cacfabf
Summary:
==== Route Delete Issue
IPv4 and IPv6 routes are deleted in different way. When we are deleting route
out intention is to delete all associated nexthops. However since we also
specify nexthops while deleting netlink only performs partial nexthop removal.

Since route is not completely removed we/user don't get notification for it.
Ideal way for delete is to just specify route-key

==== Route Cache Issue
We update cache in two workflows.
1. When user programs route (we mutate cache)
2. When netlink notification occurs then we also update cache to reflect
   kernel's state

However v6 routes were not properly cached. We should just do (1) but (2)
does cover cases for our other users trying to program Link/Multicast routes.
Hence we are only updating unicast routes via (1)

Sometimes we program thousands of routes which generates corresponding netlink
notifications. Once we are done with it, we try to read netlink notifications,
which error out with something like "Out of memory". This mostly seems to be
buffer overflow because of overwhelming notifications.

So idea here is to continue processing notifications as we program routes. e.g.
after programming 100 route events do process pending notifications

Reviewed By: jstrizich

Differential Revision: D12970613

fbshipit-source-id: 0ad462594255c1c53f4ce7fea067860b969a4e1e
Reviewed By: yns88

fbshipit-source-id: 6ebfbb62e62c169895e4c4a74ff2df273048ebbc
@pull pull Bot added the ⤵️ pull label Nov 10, 2018
@pull
pull Bot merged commit f99d30e into Rachelmorrell:master Nov 10, 2018
Rachelmorrell pushed a commit that referenced this pull request Apr 12, 2020
Summary:
There is a race condition when KvStoreWrapper and ZMQ background threads are
destroyed. This diff is an attempt to explicitly destroy KvStoreWrapper in TearDown

Also use unique_ptr instead of shared_ptr

```
WARNING: ThreadSanitizer: data race (pid=49594)
  Write of size 8 at 0x7ba000000220 by thread T1:
    #0 close <null> (link_monitor_test+0xdb1f6a)
    #1 zmq::signaler_t::~signaler_t() /home/engshare/third-party2/zeromq/4.3.1/src/zeromq-4.3.1/src/signaler.cpp:114:20 (link_monitor_test+0xbd1274)

  Previous read of size 8 at 0x7ba000000220 by main thread:
    #0 epoll_ctl <null> (link_monitor_test+0xd9bdef)
    #1 epoll_del /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/epoll.c:485 (link_monitor_test+0xec4253)
    #2 folly::EventBaseEvent::eb_event_del() <null> (link_monitor_test+0xa747ef)
    #3 folly::EventHandler::~EventHandler() <null> (link_monitor_test+0xa74a70)
    #4 std::_Hashtable<int, std::pair<int const, openr::OpenrEventBase::ZmqEventHandler>, std::allocator<std::pair<int const, openr::OpenrEventBase::ZmqEventHandler> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::~_Hashtable() <null> (link_monitor_test+0x219620)
    #5 openr::OpenrEventBase::~OpenrEventBase() <null> (link_monitor_test+0x212d8d)
    #6 openr::KvStore::~KvStore() <null> (link_monitor_test+0x1bfbb7)
    #7 openr::KvStore::~KvStore() <null> (link_monitor_test+0x1bfbe9)
    #8 openr::KvStoreWrapper::~KvStoreWrapper() <null> (link_monitor_test+0x117533)
    #9 std::_Sp_counted_ptr_inplace<openr::KvStoreWrapper, std::allocator<openr::KvStoreWrapper>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() <null> (link_monitor_test+0x116fbd)
    #10 LinkMonitorTestFixture::~LinkMonitorTestFixture() <null> (link_monitor_test+0xf8285)
    #11 LinkMonitorTestFixture_BasicOperation_Test::~LinkMonitorTestFixture_BasicOperation_Test() <null> (link_monitor_test+0xf7ee9)
    #12 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) <null> (link_monitor_test+0xc4b2ae)
    #13 __libc_start_main /home/engshare/third-party2/glibc/2.26/src/glibc-2.26/csu/libc-start.c:308:16 (libc.so.6+0x211a5)
```

Reviewed By: yi-xian

Differential Revision: D20148667

fbshipit-source-id: 71634c08df8ebbc98a6b8c4aa3329166834453f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants