From 17e2c6eb0bc5c073bbe1ca1a97f0c32daedc9c7c Mon Sep 17 00:00:00 2001 From: Matt Houglum Date: Thu, 1 Aug 2019 15:03:44 -0700 Subject: Add msg to consult gsutil team before changing cfg (#826) * Add msg to consult gsutil team before changing cfg This should help prevent issues like #820. Fixes #820. (Note that #823 added the fix; this simply closes out an additional action-item resulting from that issue.) * Add another msg where we decide to write the cfg --- .../google_compute_engine/boto/boto_config.py | 6 ++++++ .../google_compute_engine/instance_setup/instance_config.py | 2 ++ 2 files changed, 8 insertions(+) (limited to 'packages') diff --git a/packages/python-google-compute-engine/google_compute_engine/boto/boto_config.py b/packages/python-google-compute-engine/google_compute_engine/boto/boto_config.py index 155f3c7..2c92d9d 100644 --- a/packages/python-google-compute-engine/google_compute_engine/boto/boto_config.py +++ b/packages/python-google-compute-engine/google_compute_engine/boto/boto_config.py @@ -35,6 +35,10 @@ from google_compute_engine import metadata_watcher class BotoConfig(object): """Creates a boto config file for standalone GSUtil.""" + # WARNING: The path should remain as /etc/boto.cfg in order to not break + # tools, such as gsutil, that rely on loading well-known Boto config paths. + # If you want to change this, please consult the gsutil team + # (GoogleCloudPlatform/gsutil) first. boto_config = constants.BOTOCONFDIR + '/etc/boto.cfg' boto_config_template = constants.BOTOCONFDIR + '/etc/boto.cfg.template' boto_config_script = os.path.abspath(__file__) @@ -81,6 +85,8 @@ class BotoConfig(object): config_file=self.boto_config_template, config_header=self.boto_config_header) + # WARNING: If you want to change the contents of this config file, please + # consult the gsutil team (GoogleCloudPlatform/gsutil) first. config.SetOption('GSUtil', 'default_project_id', project_id) config.SetOption('GSUtil', 'default_api_version', '2') config.SetOption('GoogleCompute', 'service_account', 'default') diff --git a/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py b/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py index 1c23171..8f2fadf 100644 --- a/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py +++ b/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py @@ -78,6 +78,8 @@ class InstanceConfig(config_manager.ConfigManager): 'host_key_types': 'ecdsa,ed25519,rsa', 'optimize_local_ssd': 'true', 'network_enabled': 'true', + # WARNING: Do not change the value of 'set_boto_config' without first + # consulting the gsutil team (GoogleCloudPlatform/gsutil). 'set_boto_config': 'true', 'set_host_keys': 'true', 'set_multiqueue': 'true', -- cgit v1.2.1