Skip to content

Commit

Permalink
Adds loadbalanced=false to physical machines and standalone VMs (#266)
Browse files Browse the repository at this point in the history
We have been adding the metadata file "loadbalanced" with a content/value of
"true" to MIG instances. However, we have not been explicitly flagging
non-loadbalanced machines as loadbalanced=false. This commit makes the
declaration explicity for all machine types, which should make filtering in
BigQuery using this field more intuitive and consitent with other fields.
  • Loading branch information
nkinkade authored Jul 25, 2024
1 parent 4ba57d2 commit cd21564
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions configs/stage3_ubuntu/opt/mlab/bin/write-metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ case "$PREFIX_LEN" in
;;
esac
echo -n "$MANAGED" > $METADATA_DIR/managed

# Physical machines are not loadbalanced.
echo -n "false" > $METADATA_DIR/loadbalanced

1 change: 1 addition & 0 deletions configs/virtual_ubuntu/opt/mlab/bin/write-metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ if [[ $is_mig == "200" ]]; then
external_ip=$(curl "${CURL_FLAGS[@]}" "${METADATA_URL}/network-interfaces/0/forwarded-ips/0")
external_ipv6=$(curl "${CURL_FLAGS[@]}" "${METADATA_URL}/network-interfaces/0/forwarded-ipv6s/0")
else
echo -n "false" > $METADATA_DIR/loadbalanced
external_ip=$(
curl "${CURL_FLAGS[@]}" "${METADATA_URL}/network-interfaces/0/access-configs/0/external-ip"
)
Expand Down

0 comments on commit cd21564

Please sign in to comment.