Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable more potential unattended upgrade sources for AWS #4246

Merged
merged 5 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sky/clouds/service_catalog/images/aws_utils/image_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions sky/clouds/service_catalog/images/provisioners/skypilot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@
sudo systemctl stop unattended-upgrades || true
sudo systemctl disable unattended-upgrades || true
yika-luo marked this conversation as resolved.
Show resolved Hide resolved
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
Expand Down
4 changes: 4 additions & 0 deletions sky/templates/aws-ray.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading