New issue
Advanced search Search tips

Issue 810796 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

moblabvm: The infra logs directory is no longer correct

Project Member Reported by pprabhu@chromium.org, Feb 9 2018

Issue description

See example build: https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8955113749805596416

The "INFRA LOGS FROM MOBLAB" links to /var/log/autotest. It used to contain autotest's infrastructure logs. This worked because /usr/local/autotest/logs was a bindmount of /var/log/autotest. But looking at the moblabvm downloaded for that build, mount shows me that we no longer create this bindmount.

When did this change?

This bindmount is important because that is the only way we get infrastructure logs out of moblab after running moblab_RunSuite.
 
btw, this should affect the moblab hwtest similarly: we will no longer collect the infra logs. It's just that the vm test better surfaces these logs on the builder, so I noticed it first.
But checking in a moblab vm, both are directories: 
pprabhu@pprabhu:files$ sshvm 26965
localhost ~ # file /var/log/autotest
/var/log/autotest: directory
localhost ~ # file /usr/local/autotest/logs
/usr/local/autotest/logs: directory
/usr/local/autotest is copied out of /autotest
Looking at the source:

localhost ~ # file /autotest/logs
/autotest/logs: directory
localhost ~ # ls /autotest/logs
README  autotest
localhost ~ # ls /autotest/logs/autotest
localhost ~ # file /autotest/logs/autotest
/autotest/logs/autotest: symbolic link to /var/log/autotes

Ah ha! So, because .../logs already exists, the dosym command ends up adding a symlink inside the dir.
We should delete the .../logs directory first.
Project Member

Comment 6 by bugdroid1@chromium.org, Feb 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/ba855aeaa1cefaf28e539d3e794deb73613bacba

commit ba855aeaa1cefaf28e539d3e794deb73613bacba
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Tue Feb 13 02:59:35 2018

autotest-server: Delete directory before replacing it with symlink.

BUG= chromium:810796 
TEST=prayers.

Change-Id: Iea6d41d4a7c76c246ddc061ea5884a2f8c4ebbad
Reviewed-on: https://chromium-review.googlesource.com/912133
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Keith Haddow <haddowk@chromium.org>

[modify] https://crrev.com/ba855aeaa1cefaf28e539d3e794deb73613bacba/chromeos-base/autotest-server/autotest-server-9999.ebuild

Status: Fixed (was: Started)

Sign in to add a comment