Hi Ajay, Thanks for answers, with those i'm able to move forward in understanding contrail config-node.
I looked at schema-transformer, it does subscribe to "Config:root" element and keeps polling over it. And schema transformer publishes to ip-map using vnc_api which is client for api-server. Here, vnc_cfg.xsd, contains definition for both high-level and low-level data model. Would you please give sample example of each data-model elements, so i can clearly distinguish from above .xsd? Also, looked at zookeeper client in schema-transformer, generates some keyspaces viewed by zkCli.sh. Looke at /id keyspace, which is having path virtual-networks, bgp, router-targets, and generates ids with bitarray in incremental order. Could not understand use of /id keyspace? Regards, Yatin On Thu, Mar 12, 2015 at 4:14 AM, Hampapur Ajay <[email protected]> wrote: > > On Mar 11, 2015, at 12:27 AM, yatin kumbhare wrote: > > Hi Ajay, > > Good to know about two different context for Api-Server. > > For a flow: > global_vrouter_configs_http_post() -> dbe_create()-> dbe_create_publish() > -> cfgm_common/vnc_kombu.py publish() -> _publisher() -> publishes to > producer (kombu.Producer) on fanout exchange -> self._consumer consumes it > and execute callback function _subscribe -> then call back function > _dbe_subscribe_callback()-> _dbe_create_notification() -> > _publish_update() -> _publish_to_ifmap() -> call_async_result() of > cfgm_common/ifmap/client.py > > The asynchronous flow will start from _consumer. > > yes > > > On all config nodes, all API-servers (in HA/scaleout deployment), all > the local Ifmap servers should have same data because of asynchronous > context ? > > yes. ifmap server runs standalone mode and local api-server pushes config > info to it. so in effect all ifmap servers will have same info without > them(ifmap servers) knowing there are 'n' instances. > > > the xml data <ifmap:publish> printed out in first mail, would be > high-level data? > > both the high-level (user-produced - e.g. neutron/webui via REST) and > low-level (system-produced - e.g schema-transfomer,svc-monitor via REST) > objects are populated in ifmap-server. ifmap-view shows all the info in > ifmap server. > > thanks > ajay > > > and what we see with schema_transformer/ifmap_view.py is low-level data? > > Regards, > Yatin > > On Wed, Mar 11, 2015 at 7:38 AM, Hampapur Ajay <[email protected]> wrote: > >> Hi Yatin, >> >> API-server has 2 contexts - a synchronous one (that receives a REST >> request, stores in DB, sends notification on rabbit and returns) and an >> asynchronous one(receives notification from rabbit, sends message to be >> sent to ifmap and returns). This is so that all API-servers (in HA/scaleout >> deployment) end up running same code in asynchronous context to populate >> their local ifmap. >> >> The code that handles notifications from rabbit is at >> >> https://github.com/Juniper/contrail-controller/blob/master/src/config/api-server/vnc_cfg_ifmap.py#L929 >> >> if you haven't already gone through >> >> https://github.com/Juniper/contrail-controller/wiki/OpenContrail-Internal-Services >> might be useful. >> >> Thanks >> ajay >> On Mar 10, 2015, at 5:20 AM, yatin kumbhare wrote: >> >> Hello Folks, >> >> I'm trying to understand vnc_cfg_api_server code. >> >> Api-server publish data to if-map server over http connection. >> >> <ifmap:publish session-id="428807018-796627615-267532699-1939915597" >> ><update lifetime="forever" ><identity >> name="contrail:project:default-domain:demo" type="other" >> other-type-definition="extended" /><identity >> name="contrail:network-ipam:default-domain:demo:fake-ipam" type="other" >> other-type-definition="extended" /><metadata><contrail:project-network-ipam >> ifmap-cardinality="singleValue" >> ></contrail:project-network-ipam></metadata></update></ifmap:publish> >> >> Rabbitmq does create exchange/queue: >> vnc_config.object-update / vnc_config.billy-8082 >> >> and publish data: >> {'oper': 'CREATE', 'imid': >> 'contrail:network-ipam:default-domain:demo:fake-ipam', 'uuid': >> '79e15bc3-6ed8-4572-95c0-9935c0cfddf9', 'parent_imid': >> 'contrail:project:default-domain:demo', 'request-id': >> 'req-d3b39091-12fa-4e6c-a840-8a0e29429645', 'type': 'network-ipam', >> 'obj_dict': {'fq_name': ['default-domain', 'demo', 'fake-ipam'], >> 'parent_uuid': 'e90dbf97-6d78-4dad-bbb6-dbfa3385b2c8', 'ipam_method': None, >> 'parent_type': 'project', 'network_ipam_mgmt': {'ipam_dns_method': >> 'default-dns-server', 'ipam_dns_server': {'tenant_dns_server_address': {}, >> 'virtual_dns_server_name': None}}, 'id_perms': {u'enable': True, u'uuid': >> {'uuid_mslong': 8782401643285595506L, 'uuid_lslong': >> 10790793163326873081L}, u'creator': None, u'created': >> '2015-03-10T11:15:36.873492', u'user_visible': True, u'last_modified': >> '2015-03-10T11:15:36.873492', u'permissions': {u'owner': u'cloud-admin', >> u'owner_access': 7, u'other_access': 7, u'group': 'admin', u'group_access': >> 7}, u'description': None}, 'display_name': 'fake-ipam', 'virtual_DNS_refs': >> [], 'uuid': '79e15bc3-6ed8-4572-95c0-9935c0cfddf9'}} >> >> I'm unable to locate the code, which is consumer for this rabbit >> message. >> >> Can somebody please explain, the role of rabbitmq in config-node and >> reference to code? >> >> Regards, >> Yatin >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org >> >> >> > >
_______________________________________________ Dev mailing list [email protected] http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
