File tree Expand file tree Collapse file tree 5 files changed +17
-12
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 5 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 541
541
542
542
alter database postgres connection limit -1;
543
543
544
- -- #incident-2024-09-12-project-upgrades-are-temporarily-disabled
545
- do $$
546
- begin
547
- if exists (select from pg_authid where rolname = 'pg_read_all_data') then
548
- execute('grant pg_read_all_data to postgres');
549
- end if;
550
- end
551
- $$;
552
- grant pg_signal_backend to postgres;
553
-
554
544
set session authorization supabase_admin;
555
545
drop role supabase_tmp;
556
546
commit;
Original file line number Diff line number Diff line change 78
78
79
79
run_sql -c " $RECREATE_PG_CRON_QUERY "
80
80
fi
81
+
82
+ # #incident-2024-09-12-project-upgrades-are-temporarily-disabled
83
+ run_sql -c " grant pg_read_all_data, pg_signal_backend to postgres"
81
84
}
82
85
83
86
function complete_pg_upgrade {
Original file line number Diff line number Diff line change @@ -110,6 +110,11 @@ function format_and_mount_rootfs {
110
110
fi
111
111
112
112
mkfs.ext4 /dev/xvdh
113
+
114
+ # Explicitly reserving 100MiB worth of blocks for the data volume
115
+ RESERVED_DATA_VOLUME_BLOCK_COUNT=$(( 100 * 1024 * 1024 / 4096 ))
116
+ tune2fs -r $RESERVED_DATA_VOLUME_BLOCK_COUNT /dev/xvdh
117
+
113
118
mkdir -p /mnt/data
114
119
mount -o defaults,discard /dev/xvdh /mnt/data
115
120
}
Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ elif [ -n "$(command -v apt-get)" ]; then
36
36
libicu-dev \
37
37
libcgal-dev \
38
38
libgcc-9-dev \
39
- libgcc-8-dev
39
+ libgcc-8-dev \
40
+ ansible
41
+
42
+ add-apt-repository --yes --remove ppa:ansible/ansible
40
43
41
44
source /etc/os-release
42
45
apt-get -y remove --purge linux-headers-5.11.0-1021-aws
Original file line number Diff line number Diff line change 38
38
$ARGS
39
39
}
40
40
41
+ function cleanup_packages {
42
+ apt-get -y remove --purge ansible
43
+ add-apt-repository --yes --remove ppa:ansible/ansible
44
+ }
41
45
42
46
install_packages
43
47
install_nix
44
48
execute_stage2_playbook
45
-
49
+ cleanup_packages
You can’t perform that action at this time.
0 commit comments