From 9db70f6232aa78823ebda8552b89b6bb1a61ee12 Mon Sep 17 00:00:00 2001 From: Gleb Novikov Date: Thu, 6 Apr 2023 14:02:56 +0400 Subject: [PATCH] Added disk_size and instance_type to payload (#3918) ## Describe your changes In https://github.com/neondatabase/cloud/issues/4354 we are making scheduling of projects based on available disk space and overcommit, so we need to know disk size and just in case instance type of the pageserver ## Issue ticket number and link https://github.com/neondatabase/cloud/issues/4354 ## Checklist before requesting a review - [x] I have performed a self-review of my code. - [ ] ~If it is a core feature, I have added thorough tests.~ - [ ] ~Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?~ - [ ] ~If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.~ --- .github/ansible/scripts/init_pageserver.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/ansible/scripts/init_pageserver.sh b/.github/ansible/scripts/init_pageserver.sh index e7d6efadae..d88f754a86 100644 --- a/.github/ansible/scripts/init_pageserver.sh +++ b/.github/ansible/scripts/init_pageserver.sh @@ -3,6 +3,8 @@ # fetch params from meta-data service INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) AZ_ID=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone) +INSTANCE_TYPE=$(curl -s http://169.254.169.254/latest/meta-data/instance-type) +DISK_SIZE=$(df -B1 /storage | tail -1 | awk '{print $2}') # store fqdn hostname in var HOST=$(hostname -f) @@ -18,7 +20,9 @@ cat <