virtualizationservice: Fix log messages
Change I55ebb75f93943a3095f27c74fcef577a1d054865 introduced new VM
callbacks which collect CPU and memory stats from the VM. However, the
log messages were copied from notifyError() and not updated. As a
result, the log says that the VM had reported an error every second.
Update the text of the messages.
Test: run a VM, inspect virtualizationservice logs
Change-Id: I37a19ae4b871f324592071f671f87bdb5b8ed45a
diff --git a/virtualizationservice/src/aidl.rs b/virtualizationservice/src/aidl.rs
index bff4f36..532ddc7 100644
--- a/virtualizationservice/src/aidl.rs
+++ b/virtualizationservice/src/aidl.rs
@@ -1069,7 +1069,7 @@
fn notifyPayloadStarted(&self) -> binder::Result<()> {
let cid = self.cid;
if let Some(vm) = self.state.lock().unwrap().get_vm(cid) {
- info!("VM having CID {} started payload", cid);
+ info!("VM with CID {} started payload", cid);
vm.update_payload_state(PayloadState::Started).map_err(|e| {
Status::new_exception_str(ExceptionCode::ILLEGAL_STATE, Some(e.to_string()))
})?;
@@ -1091,7 +1091,7 @@
fn notifyPayloadReady(&self) -> binder::Result<()> {
let cid = self.cid;
if let Some(vm) = self.state.lock().unwrap().get_vm(cid) {
- info!("VM having CID {} payload is ready", cid);
+ info!("VM with CID {} reported payload is ready", cid);
vm.update_payload_state(PayloadState::Ready).map_err(|e| {
Status::new_exception_str(ExceptionCode::ILLEGAL_STATE, Some(e.to_string()))
})?;
@@ -1109,7 +1109,7 @@
fn notifyPayloadFinished(&self, exit_code: i32) -> binder::Result<()> {
let cid = self.cid;
if let Some(vm) = self.state.lock().unwrap().get_vm(cid) {
- info!("VM having CID {} finished payload", cid);
+ info!("VM with CID {} finished payload", cid);
vm.update_payload_state(PayloadState::Finished).map_err(|e| {
Status::new_exception_str(ExceptionCode::ILLEGAL_STATE, Some(e.to_string()))
})?;
@@ -1127,7 +1127,7 @@
fn notifyError(&self, error_code: ErrorCode, message: &str) -> binder::Result<()> {
let cid = self.cid;
if let Some(vm) = self.state.lock().unwrap().get_vm(cid) {
- info!("VM having CID {} encountered an error", cid);
+ info!("VM with CID {} encountered an error", cid);
vm.update_payload_state(PayloadState::Finished).map_err(|e| {
Status::new_exception_str(ExceptionCode::ILLEGAL_STATE, Some(e.to_string()))
})?;
@@ -1145,7 +1145,7 @@
fn notifyCpuStatus(&self, status: &VirtualMachineCpuStatus) -> binder::Result<()> {
let cid = self.cid;
if let Some(vm) = self.state.lock().unwrap().get_vm(cid) {
- info!("VM having CID {} encountered an error", cid);
+ info!("VM with CID {} reported its CPU status", cid);
write_vm_cpu_status_stats(vm.requester_uid as i32, &vm.name, status);
Ok(())
} else {
@@ -1160,7 +1160,7 @@
fn notifyMemStatus(&self, status: &VirtualMachineMemStatus) -> binder::Result<()> {
let cid = self.cid;
if let Some(vm) = self.state.lock().unwrap().get_vm(cid) {
- info!("VM having CID {} encountered an error", cid);
+ info!("VM with CID {} reported its memory status", cid);
write_vm_mem_status_stats(vm.requester_uid as i32, &vm.name, status);
Ok(())
} else {