update functionality for the brain #2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "new-updater"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
These changes have been done:
measurement args are a separate argument which get passed from daemon
revamped updatevm and newvm resp functions, specially how args.dtrfs_api_endpoint gets handled
updating now returns error from brain if it cant find the contract
proto has been updated accordingly
@ -87,6 +87,7 @@ pub struct BrainData {
daemon_deletevm_tx: DashMap<String, Sender<grpc::DeleteVmReq>>,
daemon_newvm_tx: DashMap<String, Sender<grpc::NewVmReq>>,
daemon_updatevm_tx: DashMap<String, Sender<grpc::UpdateVmReq>>,
daemon_get_measurement_tx: DashMap<String, Sender<MeasurementArgs>>,
The services for MeasurementArgs out in the
brain.proto
. I see here two options:My suggestion is to go for option 1, since that allows this PR to be isolated to the upgrade. I believe we should add measurement args in the future, if we see it is really needed. It will not be hard to add an extra RPC service when we need it. At this point, it is noise.
He went with option one without dropping a comment. 10 points abstracted from Griffindor.
@ -209,3 +211,3 @@
let mut public_ipv4 = String::new();
let mut public_ipv6 = String::new();
for ip in new_vm_resp.ips {
for ip in new_vm_resp.args.clone().unwrap_or(grpc::MeasurementArgs::default()).ips {
If the daemon does not provide Measurement Args, the CLI can't execute the attestation. I believe we should not accept
grpc::NewVmResp
that does not contain Args. This should be replaced with a NewVmResp that contains an error with the message "SNP Node did not provide measurement args"Also, this means the contract is broken so we need to discuss the cases.
If the args don't exist here, the brain should overwrite the NewVmResp to an error.
update functionality for the brain is ready? am not sure, there might be need to do a few more checksto update functionality for the brain