diff options
author | Dmitrii Merkurev <dimorinny@google.com> | 2024-02-20 00:08:27 +0000 |
---|---|---|
committer | Dmitrii Merkurev <dimorinny@google.com> | 2024-02-20 13:19:48 +0000 |
commit | aeb22c4d6e51eaa196eab052dae2926be27303fe (patch) | |
tree | 6885d1ef7bd3523d8670ebf944554923cc678a69 | |
parent | 3b73a4184ed87dc633954136c12a08dbb404ac26 (diff) | |
download | cuttlefish-aeb22c4d6e51eaa196eab052dae2926be27303fe.tar.gz |
Create backward compatibility symlinks in case of failures
Currently cuttlefish runtime symlinks are created only
in case of succesfull boot. Acloud cannot pull them
when cvd isn't booted, so we cannot see launcher/kernel
logs on infra.
Fixing it by executing symlinks creating before cmd result
check.
Test: locally emulate vmm issue verified symlinks are created
Test: launcher log is pulled in case of vmm failure
https://android-build.corp.google.com/test_investigate/?invocationId=I49400010248251497
Bug: 325936323
Change-Id: I66d6aea50f011adde19fe175b460832ea281317c
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
-rw-r--r-- | host/commands/cvd/server_command/start.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/host/commands/cvd/server_command/start.cpp b/host/commands/cvd/server_command/start.cpp index e1f27115c..24282f835 100644 --- a/host/commands/cvd/server_command/start.cpp +++ b/host/commands/cvd/server_command/start.cpp @@ -745,6 +745,13 @@ Result<cvd::Response> CvdStartCommandHandler::PostStartExecutionActions( } } auto final_response = ResponseFromSiginfo(infop); + + // For backward compatibility, we add extra symlink in system wide home + // when HOME is NOT overridden and selector flags are NOT given. + if (group_creation_info.is_default_group) { + CF_EXPECT(CreateSymlinks(group_creation_info)); + } + if (!final_response.has_status() || final_response.status().code() != cvd::Status::OK) { return final_response; @@ -756,12 +763,6 @@ Result<cvd::Response> CvdStartCommandHandler::PostStartExecutionActions( // files must be marked as used MarkLockfilesInUse(group_creation_info); - // For backward compatibility, we add extra symlink in system wide home - // when HOME is NOT overridden and selector flags are NOT given. - if (group_creation_info.is_default_group) { - CF_EXPECT(CreateSymlinks(group_creation_info)); - } - // group_creation_info is nullopt only if is_help is false return FillOutNewInstanceInfo(std::move(final_response), group_creation_info); } |