From 408208f810bcccc2d371b3ca8287c731fa4b1cd8 Mon Sep 17 00:00:00 2001 From: Sylvain Bauza Date: Tue, 8 Sep 2015 16:16:05 +0200 Subject: [PATCH] Add some explanation for the instance AZ field Since it's pretty confusing to understand why an instance AZ can be different from the host AZ the instance belongs to, and since that field is never updated even after an instance is scheduled to an host, we think it's good to add a comment in the DB model to explain that. Change-Id: Id0914530cbacf4cf5c3319f1401bf07b3112935d --- nova/db/sqlalchemy/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py index 1599fdcb01..46a4b1b19f 100644 --- a/nova/db/sqlalchemy/models.py +++ b/nova/db/sqlalchemy/models.py @@ -284,6 +284,9 @@ class Instance(BASE, NovaBase): launched_at = Column(DateTime) terminated_at = Column(DateTime) + # This always refers to the availability_zone kwarg passed in /servers and + # provided as an API option, not at all related to the host AZ the instance + # belongs to. availability_zone = Column(String(255)) # User editable field for display in user-facing UIs