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 Wed, 18 Dec 2024 21:38:30 +0000. Up 7.46 seconds. Cloud-init v. 21.4-0ubuntu1~20.04.1 running 'init' at Wed, 18 Dec 2024 21:38:34 +0000. Up 10.18 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.4.178 | 255.255.240.0 | global | 02:1c:ac:02:19:85 | ci-info: | eth0 | True | fe80::1c:acff:fe02:1985/64 | . | link | 02:1c:ac:02:19:85 | 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:OWLyTSWhDJ9GktMi7iInMm2uFXRcXePdrLH8HUjrkSA root@ip-172-31-4-178 The key's randomart image is: +---[RSA 3072]----+ | ooo...o | | ..+B.o.o o o | | ...oo* .Eo.o.o | | ... . +..o++ | | o. . o S += . | |* =. + + . .....| |oB. . . .. .| | .. | |.. | +----[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:p6SOTm5PeczGEWh0tvaHx/5paBvAK5aaM9eaR5ivEyc root@ip-172-31-4-178 The key's randomart image is: +---[DSA 1024]----+ | . o | | . + . | | o + | | . . + o | | So* + | | BE=o* | | . + @B. o. | | o.+o*oo+ oo.. | | 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:BROWMG2xIuvGEUZNhOjy1tTN6hfZy/6OChu6TVsPu70 root@ip-172-31-4-178 The key's randomart image is: +---[ECDSA 256]---+ | ..==o*+ | | ... .o++ | | . +..+. . | |. ...+..o. | | o oo .So | | oo... o . | | . +.+ oo . | | . +.*.=o. | | o.+.++E+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:wt7VOZ31mUfsHZp5QaoPr3ok/rYdDuU9x+UB/6IzPuo root@ip-172-31-4-178 The key's randomart image is: +--[ED25519 256]--+ | . | | o. | | o o+| | . ..o*=B| | o S .o+=o**| | . o o .*.oo=| | . o o. =.o=| | . oO...o| | oE*+* | +----[SHA256]-----+ Cloud-init v. 21.4-0ubuntu1~20.04.1 running 'modules:config' at Wed, 18 Dec 2024 21:38:43 +0000. Up 19.11 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': 'bb88cb98-d7d5-5613-52f2-865c33c46a23', 'detail-type': 'Scheduled Event', 'source': 'aws.events', 'account': '667147198405', 'time': '2024-12-18T21: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 += ['