From f1cf2e2a866c9f537c1bfaacf45eada1a7aa8bef Mon Sep 17 00:00:00 2001 From: Zhanghao Wu Date: Mon, 4 Nov 2024 11:22:06 -0800 Subject: [PATCH 1/3] [AWS] Disable additional auto update services for ubuntu image with cloud-init (#4252) * Disable additional auto update services for ubuntu image * simplify the commands --- sky/templates/aws-ray.yml.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sky/templates/aws-ray.yml.j2 b/sky/templates/aws-ray.yml.j2 index 11c3c3e1a3c..269c4acc505 100644 --- a/sky/templates/aws-ray.yml.j2 +++ b/sky/templates/aws-ray.yml.j2 @@ -122,6 +122,11 @@ available_node_types: - path: /etc/apt/apt.conf.d/10cloudinit-disable content: | APT::Periodic::Enable "0"; + bootcmd: + - systemctl stop apt-daily.timer apt-daily-upgrade.timer unattended-upgrades.service + - systemctl disable apt-daily.timer apt-daily-upgrade.timer unattended-upgrades.service + - systemctl mask apt-daily.service apt-daily-upgrade.service unattended-upgrades.service + - systemctl daemon-reload TagSpecifications: - ResourceType: instance Tags: From 65efcd01b43cf640a1fda311e8c4cff89c130753 Mon Sep 17 00:00:00 2001 From: Zongheng Yang Date: Mon, 4 Nov 2024 11:26:11 -0800 Subject: [PATCH 2/3] [Dashboard] Add a simple status filter. (#4253) --- sky/jobs/dashboard/dashboard.py | 3 ++ sky/jobs/dashboard/templates/index.html | 43 ++++++++++++++++++++++--- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/sky/jobs/dashboard/dashboard.py b/sky/jobs/dashboard/dashboard.py index 89c97274646..9077eab393b 100644 --- a/sky/jobs/dashboard/dashboard.py +++ b/sky/jobs/dashboard/dashboard.py @@ -74,11 +74,14 @@ def home(): # Remove filler rows ([''], ..., ['-']). rows = [row for row in rows if ''.join(map(str, row)) != ''] + # Get all unique status values. + status_values = sorted(list(set(row[-5] for row in rows))) rendered_html = flask.render_template( 'index.html', columns=columns, rows=rows, last_updated_timestamp=timestamp, + status_values=status_values, ) return rendered_html diff --git a/sky/jobs/dashboard/templates/index.html b/sky/jobs/dashboard/templates/index.html index af4f5708bce..7330f96b8cd 100644 --- a/sky/jobs/dashboard/templates/index.html +++ b/sky/jobs/dashboard/templates/index.html @@ -44,6 +44,22 @@ .clickable { cursor: pointer; /* This makes the cursor a pointer when hovering over the element */ } + + .filter-controls { + display: flex; + gap: 10px; + align-items: center; /* This ensures vertical alignment */ + margin-top: 1rem; + position: relative; + z-index: 2; + } + + /* Customize the select focus/hover states */ + .form-select:focus { + border-color: #dee2e6; + box-shadow: 0 0 0 0.1rem rgba(0,0,0,0.1); + } + From 47e51516051558027759ad0371a904921b74e2f7 Mon Sep 17 00:00:00 2001 From: Yika Date: Mon, 4 Nov 2024 15:39:58 -0800 Subject: [PATCH 3/3] Disable more potential unattended upgrade sources for AWS (#4246) * Fix AWS unattended upgrade issue * more commands * add retry and disable all unattended * remove retry * disable unattended upgrades and add retry in aws default image --- sky/clouds/service_catalog/images/aws_utils/image_gen.py | 2 +- sky/clouds/service_catalog/images/provisioners/skypilot.sh | 5 +++++ sky/templates/aws-ray.yml.j2 | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sky/clouds/service_catalog/images/aws_utils/image_gen.py b/sky/clouds/service_catalog/images/aws_utils/image_gen.py index cadfee912a9..970988997d2 100644 --- a/sky/clouds/service_catalog/images/aws_utils/image_gen.py +++ b/sky/clouds/service_catalog/images/aws_utils/image_gen.py @@ -78,7 +78,7 @@ def copy_image_and_make_public(target_region): copy_command = ( f"aws ec2 copy-image --source-region {args.region} " f"--source-image-id {args.image_id} --region {target_region} " - f"--name 'skypilot-aws-{args.processor}-{args.os_type}-{time.time()}' --output json" + f"--name 'skypilot-aws-{args.processor}-{args.os_type}-{time.strftime('%y%m%d')}' --output json" ) print(copy_command) result = subprocess.run(copy_command, diff --git a/sky/clouds/service_catalog/images/provisioners/skypilot.sh b/sky/clouds/service_catalog/images/provisioners/skypilot.sh index cecb3664736..3bdb6dd0635 100644 --- a/sky/clouds/service_catalog/images/provisioners/skypilot.sh +++ b/sky/clouds/service_catalog/images/provisioners/skypilot.sh @@ -4,12 +4,17 @@ sudo systemctl stop unattended-upgrades || true sudo systemctl disable unattended-upgrades || true sudo sed -i 's/Unattended-Upgrade "1"/Unattended-Upgrade "0"/g' /etc/apt/apt.conf.d/20auto-upgrades || true +sudo systemctl stop apt-daily.timer apt-daily-upgrade.timer unattended-upgrades.service +sudo systemctl disable apt-daily.timer apt-daily-upgrade.timer unattended-upgrades.service +sudo systemctl mask apt-daily.service apt-daily-upgrade.service unattended-upgrades.service +sudo systemctl daemon-reload # Configure dpkg sudo dpkg --configure --force-overwrite -a # Apt-get installs sudo apt-get install jq -y +sudo apt install retry # Create necessary directories mkdir -p ~/sky_workdir diff --git a/sky/templates/aws-ray.yml.j2 b/sky/templates/aws-ray.yml.j2 index 269c4acc505..95751ab1849 100644 --- a/sky/templates/aws-ray.yml.j2 +++ b/sky/templates/aws-ray.yml.j2 @@ -122,6 +122,10 @@ available_node_types: - path: /etc/apt/apt.conf.d/10cloudinit-disable content: | APT::Periodic::Enable "0"; + - path: /etc/apt/apt.conf.d/52unattended-upgrades-local + content: | + Unattended-Upgrade::DevRelease "false"; + Unattended-Upgrade::Allowed-Origins {}; bootcmd: - systemctl stop apt-daily.timer apt-daily-upgrade.timer unattended-upgrades.service - systemctl disable apt-daily.timer apt-daily-upgrade.timer unattended-upgrades.service