New issue
Advanced search Search tips

Issue 598439 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: May 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

GS Cleanup: Standard GCE Image

Project Member Reported by dgarr...@chromium.org, Mar 28 2016

Issue description

We currently have two GCE servers running the purge_builds script (one per bucket), as well as the purge_gs.sh wrapper which runs the purge script in a loop.

It would be better to create a standard image to base these builders on that contains the script, and the logic to auto-start at boot.


 

Comment 1 by autumn@chromium.org, Mar 28 2016

Labels: -current-issue
The wrapper script currently looks like this:

#!/bin/bash
LOG="/home/dgarrett/purge.log"
cd ~/chromite
while true; do
  mv -f "${LOG}" "${LOG}.previous"
  git pull >> "${LOG}" 2>&1
  bin/purge_builds --debug --chromeos-image-archive >> "${LOG}" 2>&1
  sleep 24h
done
This command can be used to retrieve the purge target for a given GCE instance (assuming the custom metadata 'purge_target' has been set for the instance).

curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/attributes/purge_target
Status: Assigned (was: Untriaged)

Comment 5 by benhenry@google.com, Apr 26 2016

Components: Infra>Client>ChromeOS
Labels: -Infra-ChromeOS
Project Member

Comment 6 by bugdroid1@chromium.org, May 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/d0b9fc28215109156615f4e8c4dfcd4898c0d74e

commit d0b9fc28215109156615f4e8c4dfcd4898c0d74e
Author: Don Garrett <dgarrett@google.com>
Date: Fri May 06 22:39:44 2016

purge_gs.sh: New script to run on GS purge servers.

This is a new script to run on GS cleanup GCE instances that fetches the
latest version of chromite, runs the GS cleanup script, sleeps, and
repeats, forever.

BUG= chromium:598439 
TEST=Manual (and limited).

Change-Id: I4793ac76c643164bc2789ba093bc1a1a73255992
Reviewed-on: https://chromium-review.googlesource.com/343210
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>

[add] https://crrev.com/d0b9fc28215109156615f4e8c4dfcd4898c0d74e/bin/purge_gs.sh

A new image "purge-image" has been created, and a doc describing it's use has been created at go/cros-purge-servers.
Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)
Bulk verified

Sign in to add a comment