mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
ci: Upgrade test-vm to debian bullseye
This change updates the test VM to debian bullseye, primarily to enable io_uring features that are not available in the 4.16 kernel shipping with debian buster. We are not updating the builder containers to bullseye, as newer versions of qemu fail to start on kokoro. See b/181359683 Since it was needed for debugging this CL, it includes a feature to debug kokoro builders via SSH. It can be enabled by setting DEBUG_SSH_KEY from the fusion2 UI. BUG=b:178228512 TEST=./test_all passes Change-Id: I22f1678577183a0aace80245a87c31907221cc09 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2721062 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
parent
e0598548aa
commit
3682372764
4 changed files with 21 additions and 20 deletions
|
@ -24,7 +24,7 @@ RUN apt-get update && apt-get install --yes \
|
|||
WORKDIR /workspace/vm
|
||||
|
||||
RUN curl -sSfL -o rootfs.qcow2 \
|
||||
"https://cdimage.debian.org/cdimage/cloud/buster/20201214-484/debian-10-generic-${VM_ARCH}-20201214-484.qcow2"
|
||||
"http://cloud.debian.org/images/cloud/bullseye/daily/20210208-542/debian-11-generic-${VM_ARCH}-daily-20210208-542.qcow2"
|
||||
|
||||
# Package `cloud_init_data.yaml` to be loaded during `first_boot.expect`
|
||||
COPY build/cloud_init_data.yaml ./
|
||||
|
|
|
@ -12,12 +12,6 @@ users:
|
|||
crosvm@localhost
|
||||
groups: kvm, disk, tty
|
||||
|
||||
apt:
|
||||
sources:
|
||||
testing:
|
||||
source: "deb $MIRROR bullseye main"
|
||||
conf: APT::Default-Release "stable";
|
||||
|
||||
# Store working data on tmpfs to reduce unnecessary disk IO
|
||||
mounts:
|
||||
- [swap, null]
|
||||
|
@ -37,18 +31,6 @@ packages:
|
|||
- rsync
|
||||
|
||||
runcmd:
|
||||
# Install testing (debian bullseye) versions of some libraries.
|
||||
- [
|
||||
apt-get,
|
||||
install,
|
||||
--yes,
|
||||
-t,
|
||||
testing,
|
||||
--no-install-recommends,
|
||||
libdrm2,
|
||||
libepoxy0,
|
||||
]
|
||||
|
||||
# Trim some fat
|
||||
- [apt-get, remove, --yes, vim-runtime, iso-codes, perl, grub-common]
|
||||
- [apt-get, autoremove, --yes]
|
||||
|
|
|
@ -1 +1 @@
|
|||
r0001
|
||||
r0002
|
||||
|
|
|
@ -5,6 +5,19 @@
|
|||
|
||||
crosvm_root="${KOKORO_ARTIFACTS_DIR}"/git/crosvm
|
||||
|
||||
# Enable SSH access to the kokoro builder.
|
||||
# Use the fusion2/ UI to trigger a build and set the DEBUG_SSH_KEY environment
|
||||
# variable to your public key, that will allow you to connect to the builder
|
||||
# via SSH.
|
||||
# Note: Access is restricted to the google corporate network.
|
||||
# Details: https://yaqs.corp.google.com/eng/q/6628551334035456
|
||||
if [[ ! -z "${DEBUG_SSH_KEY}" ]]; then
|
||||
echo "${DEBUG_SSH_KEY}" >> ~/.ssh/authorized_keys
|
||||
external_ip=$(curl -s -H "Metadata-Flavor: Google"
|
||||
http://metadata/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip)
|
||||
echo "SSH Debug enabled. Connect to: kbuilder@${external_ip}"
|
||||
fi
|
||||
|
||||
setup_source() {
|
||||
if [ -z "${KOKORO_ARTIFACTS_DIR}" ]; then
|
||||
echo "This script must be run in kokoro"
|
||||
|
@ -45,6 +58,12 @@ setup_source() {
|
|||
}
|
||||
|
||||
cleanup() {
|
||||
# Sleep after the build to allow for SSH debugging to continue.
|
||||
if [[ ! -z "${DEBUG_SSH_KEY}" ]]; then
|
||||
echo "Build done. Blocking for SSH debugging."
|
||||
sleep 1h
|
||||
fi
|
||||
|
||||
if command -v bindfs >/dev/null; then
|
||||
fusermount -uz "${KOKORO_ARTIFACTS_DIR}/cros/src/platform/crosvm"
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue