[ICN-409] Implement gRPC calling from DCM to RSync Created: 22/Jul/20  Updated: 17/Dec/20  Resolved: 29/Jul/20

Status: Done
Project: Integrated Cloud Native NFV
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Medium
Reporter: Igor Duarte Cardoso Assignee: Igor Duarte Cardoso
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: DCM dev works
Sprint: ICN Sprint 22
Story Points: 4

 Description   

And address any issues faced.

This will push the etcd data created via DCM API into the resource synchronizer which will then create the necessary k8s resources (that have already been populated by DCM in etcd).

 

  • This includes modifying applyHandler.
  • Pre-process all k8s resources that include a dot (.) in their key name as dots are not supported in MongoDB thus considerably breaking things and preventing resource quotas (e.g.) from actually getting created in Kubernetes.


 Comments   
Comment by Igor Duarte Cardoso [ 29/Jul/20 ]

The underlying issue regarding the dots does not seem to come from MongoDB because we're using version 3.6.3. The issue seems to be about the loss of detail when unmarshaling JSON into the Go structs. Even though the JSON tagging of these structs specifies if there's a dot or a slash (yes, slashes are also a problem), that tagging is not used when writing the structs into MongoDB. Consequently, when DCM reads from the database during /apply, it won't be aware of which fields have dots or slash in their names while constructing the yaml to be stored in etcd and consumed by rsync. This is where the loss of detail happens. Significant rework seems to be needed to fix this (perhaps the EMCO/Go long-timers can chime in and suggest a quick fix).

As such, I'll close the task now [gRPC calling is working and all resources are being created during /apply and destroyed during /terminate]. The only gap is due to the issue above so I am not adding any ResourceQuota attributes that have dots or slashes in their names (like limits.cpu). A future story will be created to specifically address this problem.

Comment by Igor Duarte Cardoso [ 29/Jul/20 ]

Increased scope of story:

  • Pre-process all k8s resources that include a dot (.) in their key name as dots are not supported in MongoDB thus considerably breaking things and preventing resource quotas (e.g.) from actually getting created in Kubernetes.
Comment by Igor Duarte Cardoso [ 27/Jul/20 ]

Can now call rsync and I saw the very first k8s resource automatically create by rsync as intended by dcm. A namespace. Will close task once all basic resources can get created by rsync (namespace, role, rolebinding, quota). For now only validated in 1 cluster.

Generated at Sat Feb 10 05:59:42 UTC 2024 using Jira 9.4.5#940005-sha1:e3094934eac4fd8653cf39da58f39364fb9cc7c1.