Cloud-init v. 21.4-0ubuntu1~20.04.1 running 'init-local' at Tue, 15 Feb 2022 20:50:34 +0000. Up 7.12 seconds. Cloud-init v. 21.4-0ubuntu1~20.04.1 running 'init' at Tue, 15 Feb 2022 20:50:38 +0000. Up 10.27 seconds. ci-info: ++++++++++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++++++++ ci-info: +--------+------+----------------------------+---------------+--------+-------------------+ ci-info: | Device | Up | Address | Mask | Scope | Hw-Address | ci-info: +--------+------+----------------------------+---------------+--------+-------------------+ ci-info: | eth0 | True | 172.31.3.217 | 255.255.240.0 | global | 02:41:ec:31:dc:24 | ci-info: | eth0 | True | fe80::41:ecff:fe31:dc24/64 | . | link | 02:41:ec:31:dc:24 | ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . | ci-info: | lo | True | ::1/128 | . | host | . | ci-info: +--------+------+----------------------------+---------------+--------+-------------------+ ci-info: +++++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++++ ci-info: +-------+-------------+------------+-----------------+-----------+-------+ ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags | ci-info: +-------+-------------+------------+-----------------+-----------+-------+ ci-info: | 0 | 0.0.0.0 | 172.31.0.1 | 0.0.0.0 | eth0 | UG | ci-info: | 1 | 172.31.0.0 | 0.0.0.0 | 255.255.240.0 | eth0 | U | ci-info: | 2 | 172.31.0.1 | 0.0.0.0 | 255.255.255.255 | eth0 | UH | ci-info: +-------+-------------+------------+-----------------+-----------+-------+ ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++ ci-info: +-------+-------------+---------+-----------+-------+ ci-info: | Route | Destination | Gateway | Interface | Flags | ci-info: +-------+-------------+---------+-----------+-------+ ci-info: | 1 | fe80::/64 | :: | eth0 | U | ci-info: | 3 | local | :: | eth0 | U | ci-info: | 4 | multicast | :: | eth0 | U | ci-info: +-------+-------------+---------+-----------+-------+ Generating public/private rsa key pair. Your identification has been saved in /etc/ssh/ssh_host_rsa_key Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub The key fingerprint is: SHA256:MyqAfKziPs52tEBnt5sUifqk/GUmBo6HTQcV9Y04PYg root@ip-172-31-3-217 The key's randomart image is: +---[RSA 3072]----+ | oo. | | . . = o | | . E = = . | |.o.= + . . | |oo*oo o S | |o*+= o . o | |=oOo+++ | |+*.+=+ | |+=+. | +----[SHA256]-----+ Generating public/private dsa key pair. Your identification has been saved in /etc/ssh/ssh_host_dsa_key Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub The key fingerprint is: SHA256:Bwysn/CzqGF/x55oUeXxAnGnJBGMFRzWrtkCQUoH2vM root@ip-172-31-3-217 The key's randomart image is: +---[DSA 1024]----+ | o++=XBo . | | + o+++++o | | . +. .o=.o | | oo. ..+ . | | +E+S+.. | | * +.. | | o . = . | | . o. +.o. | | ...o.oo | +----[SHA256]-----+ Generating public/private ecdsa key pair. Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub The key fingerprint is: SHA256:p9SwuaP0musrotSIwGRw/fMjp5rXJkOhyOq95jWPkdw root@ip-172-31-3-217 The key's randomart image is: +---[ECDSA 256]---+ |. .. | |.. . | | o . . | |+ + = | |.o . . +S o | |o = o =.++ | |.+ . B.E+. | |o o.ooX+o. | |ooo=+*BO. | +----[SHA256]-----+ Generating public/private ed25519 key pair. Your identification has been saved in /etc/ssh/ssh_host_ed25519_key Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub The key fingerprint is: SHA256:RWbGcj8Xv5cI0yzFDEsYCvf+fGmh+yLK0QSsqbcZ+6c root@ip-172-31-3-217 The key's randomart image is: +--[ED25519 256]--+ | . . oBo+ | | + +*+ .+. | | + +.o+ o | | o o. +oo. .| | o So ++. o| | . o o ..oo.| | . o . . + + .| | . * .o .+ | | +.E+ ..o. | +----[SHA256]-----+ Cloud-init v. 21.4-0ubuntu1~20.04.1 running 'modules:config' at Tue, 15 Feb 2022 20:50:50 +0000. Up 22.31 seconds. Cloud-init v. 21.4-0ubuntu1~20.04.1 running 'modules:final' at Tue, 15 Feb 2022 20:50:52 +0000. Up 25.02 seconds. Cloud-init v. 21.4-0ubuntu1~20.04.1 finished at Tue, 15 Feb 2022 20:50:53 +0000. Datasource DataSourceEc2Local. Up 25.62 seconds Cloud-init v. 21.4-0ubuntu1~20.04.1 running 'init-local' at Thu, 14 Dec 2023 21:38:44 +0000. Up 6.71 seconds. Cloud-init v. 21.4-0ubuntu1~20.04.1 running 'init' at Thu, 14 Dec 2023 21:38:54 +0000. Up 16.66 seconds. ci-info: ++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++ ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+ ci-info: | Device | Up | Address | Mask | Scope | Hw-Address | ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+ ci-info: | eth0 | True | 172.31.44.43 | 255.255.240.0 | global | 0a:21:31:38:ac:17 | ci-info: | eth0 | True | fe80::821:31ff:fe38:ac17/64 | . | link | 0a:21:31:38:ac:17 | ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . | ci-info: | lo | True | ::1/128 | . | host | . | ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+ ci-info: ++++++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++++ ci-info: +-------+-------------+-------------+-----------------+-----------+-------+ ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags | ci-info: +-------+-------------+-------------+-----------------+-----------+-------+ ci-info: | 0 | 0.0.0.0 | 172.31.32.1 | 0.0.0.0 | eth0 | UG | ci-info: | 1 | 172.31.32.0 | 0.0.0.0 | 255.255.240.0 | eth0 | U | ci-info: | 2 | 172.31.32.1 | 0.0.0.0 | 255.255.255.255 | eth0 | UH | ci-info: +-------+-------------+-------------+-----------------+-----------+-------+ ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++ ci-info: +-------+-------------+---------+-----------+-------+ ci-info: | Route | Destination | Gateway | Interface | Flags | ci-info: +-------+-------------+---------+-----------+-------+ ci-info: | 1 | fe80::/64 | :: | eth0 | U | ci-info: | 3 | local | :: | eth0 | U | ci-info: | 4 | multicast | :: | eth0 | U | ci-info: +-------+-------------+---------+-----------+-------+ Generating public/private rsa key pair. Your identification has been saved in /etc/ssh/ssh_host_rsa_key Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub The key fingerprint is: SHA256:fp3GovXXKLuReXONrzk09QgWN4yf9wCVBqcmZiXgiC4 root@ip-172-31-44-43 The key's randomart image is: +---[RSA 3072]----+ | ... o=o. | | . o o+o* | | . . . + o* o | | . o oo + o| | E . S . . =o| | . . o ++.+| | . + O.++o| | + +.o+=.| | . +=oo.| +----[SHA256]-----+ Generating public/private dsa key pair. Your identification has been saved in /etc/ssh/ssh_host_dsa_key Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub The key fingerprint is: SHA256:5t7IsF0KgVS24noGWNWoxWx4ml8i/ccqQop3RPWXJv4 root@ip-172-31-44-43 The key's randomart image is: +---[DSA 1024]----+ | +.oo | | ..Boo. | | .Oo... . | | o=o+o. o + | |. .+o+.oS+ | | .oo .++ | |.o..o oo... | |o ooo .B =E | | . o .. * . | +----[SHA256]-----+ Generating public/private ecdsa key pair. Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub The key fingerprint is: SHA256:n4uK+NVzO70VNbAUldLsSXiNpnjVj1ggJEab0nB/rWI root@ip-172-31-44-43 The key's randomart image is: +---[ECDSA 256]---+ | ..=.o .=*+o| | = = ..+B*o| | . + ...B*o+| | . ..+..+o| | S E.. . | | . o o . | | . o +. . | | . o +.o.. | | ..o ... o... | +----[SHA256]-----+ Generating public/private ed25519 key pair. Your identification has been saved in /etc/ssh/ssh_host_ed25519_key Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub The key fingerprint is: SHA256:1pnym0X2B7AGb2TWw6970qWbWIdazXkdftn3e5ymM8w root@ip-172-31-44-43 The key's randomart image is: +--[ED25519 256]--+ | | | o | | . = + | | . O o o | | S + B ...| | . o = ..*B| | . + *B&| | + EoBX| | o o.O=+| +----[SHA256]-----+ Cloud-init v. 21.4-0ubuntu1~20.04.1 running 'modules:config' at Thu, 14 Dec 2023 21:39:06 +0000. Up 28.37 seconds. SOURCE: ======================================== #!/usr/bin/env python3 import os, sys, time, datetime, boto3, traceback from subprocess import check_call, check_output from os.path import expanduser, exists with open(__file__) as f: print("SOURCE:") print("="*40) print(f.read()) print("="*40) sys.stdout.flush() BUCKET = 'open-lambda-public' URL = 'https://s3.us-east-2.amazonaws.com/open-lambda-public/' s3 = boto3.client("s3") DATA = {'version': '0', 'id': '6e62a6ec-b7cc-b248-c89e-d8afe3ad5ec4', 'detail-type': 'Scheduled Event', 'source': 'aws.events', 'account': '667147198405', 'time': '2023-12-14T21:37:53Z', 'region': 'us-east-2', 'resources': ['arn:aws:events:us-east-2:667147198405:rule/ol-periodic-test'], 'detail': {}} def run(cmd): print("RUN "+cmd) check_call(cmd, shell=True, stdout=sys.stdout, stderr=sys.stderr) def aws_log(): with open("/var/log/cloud-init-output.log") as f: return f.read() def s3_put(key, value, content_type='text/plain'): print("S3 PUT "+key) r = s3.put_object(Bucket=BUCKET, Key=key, Body=value.encode('utf-8'), ContentType=content_type) def s3_get(key, default): try: r = s3.get_object(Bucket=BUCKET, Key=key) return str(r['Body'].read(), 'utf-8') except Exception as e: print(key, e) return default def s3_all_keys(Prefix): ls = s3.list_objects_v2(Bucket=BUCKET, Prefix=Prefix, MaxKeys=10000) keys = [] while True: contents = [obj['Key'] for obj in ls.get('Contents',[])] keys.extend(contents) if not 'NextContinuationToken' in ls: break ls = s3.list_objects_v2(Bucket=BUCKET, Prefix=Prefix, ContinuationToken=ls['NextContinuationToken'], MaxKeys=10000) return keys def run_all(): now = datetime.datetime.today().strftime("%Y-%m-%d-%H-%M-%S") dirname = 'vm/%s' % now # upload AWS log to S3 (we'll do again later to capture prints after this) s3_put(dirname+'/cloud-init-output.log', aws_log()) # move to user dir os.chdir(expanduser("~")) os.environ["HOME"] = expanduser("~") # why do we need to do this ourselves? # pull/build/test if not "commit" in DATA: run('git clone --depth=1 https://github.com/open-lambda/open-lambda.git') else: run(' && '.join([ 'git clone https://github.com/open-lambda/open-lambda.git', 'cd open-lambda', 'git checkout ' + DATA["commit"] ])) os.chdir("open-lambda") git_commit = check_output('git rev-parse HEAD', shell=True).decode('utf-8').strip() s3_put(dirname+'/commit.txt', git_commit) try: with open("build.out", "w") as f: check_call("make", shell=True, stdout=f, stderr=f) try: with open("tests.out", "w") as f: check_call("make test-all", shell=True, stdout=f, stderr=f) result = 'PASS' except Exception: print(traceback.format_exc()) result = 'FAIL' except Exception: print(traceback.format_exc()) result = 'BUILD-FAIL' # upload test results/logs to S3 s3_put(dirname+'/test.txt', result) if exists('build.out'): with open('build.out') as f: s3_put(dirname+'/build.out', f.read()) if exists('tests.out'): with open('tests.out') as f: s3_put(dirname+'/tests.out', f.read()) if exists('test.json'): with open('test.json') as f: s3_put(dirname+'/test.json', f.read()) if exists('testing/test-cluster/logs/worker-0.out'): with open("testing/test-cluster/logs/worker-0.out") as f: s3_put(dirname+'/worker-0.out', f.read()) # refresh summary gen_report() s3_put(dirname+'/cloud-init-output.log', aws_log()) # kill the VM (it has been configured to terminate on shutdown) if DATA.get("terminate", True): run('poweroff -f') def href(s3_path, all_keys): if not s3_path in all_keys: return '[NOT FOUND]' url = URL + s3_path return '{text}'.format(url=url, text=url.split("/")[-1]) def gen_report(): print("GEN REPORT") vms = set() all_keys = s3_all_keys("vm") for k in all_keys: vms.add(k.split('/')[1]) vms = sorted(vms, reverse=True) html = [] html += ['', ''] for i, vm in enumerate(vms): if i < 14: commit = s3_get('vm/%s/commit.txt'%vm, 'unkown').strip() result = s3_get('vm/%s/test.txt'%vm, 'unkown').strip() else: # just so we can complete faster without doing too many S3 reads commit = '???' result = '???' html += ['

%s [COMMIT: %s]

' % (vm, commit)] html += [''] html += ['', ''] html = '\n'.join(html) s3_put('tests.html', html, 'text/html') return html def main(): if len(sys.argv) == 1: run_all() elif sys.argv[1] == 'report': print(gen_report()) if __name__ == '__main__': main() ======================================== Cloning into 'open-lambda'...