Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1672)

Unified Diff: appengine/gce-backend/instance_group_managers.py

Issue 2996623002: Include zone in GCE instance base name (Closed)
Patch Set: Unit test Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/gce-backend/instance_group_managers_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/gce-backend/instance_group_managers.py
diff --git a/appengine/gce-backend/instance_group_managers.py b/appengine/gce-backend/instance_group_managers.py
index 663fd2906cfc038d2cfb2aa76b0bb756757c0d07..10bad9210f1f46608724a9ff6ecb4f14d9e624a0 100644
--- a/appengine/gce-backend/instance_group_managers.py
+++ b/appengine/gce-backend/instance_group_managers.py
@@ -65,10 +65,14 @@ def get_base_name(instance_group_manager):
Returns:
A string.
"""
- # <base-name>-<abbreviated-revision>
- return '%s-%s' % (
+ # <base-name>-<abbreviated-revision>-<zone>
+ # TODO(smut): Ensure this name is < 59 characters because the final
+ # instance name must be < 64 characters and the instance group manager
+ # will add a 5 character random suffix when creating instances.
+ return '%s-%s-%s' % (
instance_group_manager.key.parent().parent().id(),
instance_group_manager.key.parent().id()[:8],
+ instance_group_manager.key.id(),
)
« no previous file with comments | « no previous file | appengine/gce-backend/instance_group_managers_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698