Open sb-yb opened 3 years ago
Checked database for json:
{ "nodeIdx": 1, "nodeName": "yb-admin-ShashankTestCentOS6-n1", "nodeUuid": null, "cloudInfo": { "private_ip": "172.151.70.21", "public_ip": "44.238.100.237", "public_dns": "ec2-44-238-100-237.us-west-2.compute.amazonaws.com", "private_dns": "ip-172-151-70-21.us-west-2.compute.internal", "instance_type": "c5.large", "subnet_id": "subnet-05b0315804f92030c", "az": "us-west-2d", "region": "us-west-2", "cloud": "aws", "assignPublicIP": true, "useTimeSync": false, "mount_roots": null ...
The Node info in UI is showing almost no info out of this:
I am assuming that these field names are going to be platform dependent and that's the reason behind mismatch. In that case the easiest fix may be just using json node instead of bean and hacking up reflection. @bmatican For triage/history/suggestion since this code is from 2016 :)
Also @streddy-yb FYI. @yb-andrew @sshev since its a UI bug: Will using JsonNode be better in this case?
@sb-yb the Cloud Info from the screenshot above is rendered basing on universeDetails.nodeDetailsSet[i].cloudInfo
of universe json
@sb-yb I know. That's the one not getting populated properly above. It only ends up populating az,region,cloud Following fields are not getting populated:
// The private ip address
public String private_ip = null;
// The public ip address.
public String public_ip = null;
// The public dns name of the node.
public String public_dns = null;
// The private dns name of the node.
public String private_dns = null;
// Type of the node (example: c3.xlarge on aws).
public String instance_type = null;
// The id of the subnet into which this node is deployed.
public String subnet_id = null;
@sshev to be clear when I say UI bug I mean it exhibits as UI bug. The bug is in backend code that is trying to use reflection to set fields in CloudSpecificInfo bean.
Failure to set "subnet" "server_type" "zone" etc. there are no matching fields to reflect. The field names in the beans are subnet_id, az etc. This reflection code in
AnsibleNodeUpdateInfo
needs to be reworked.