Fixes for prod deploy 02/70602/1
authorSawyer Bergeron <sbergeron@iol.unh.edu>
Tue, 28 Jul 2020 22:23:36 +0000 (18:23 -0400)
committerSawyer Bergeron <sbergeron@iol.unh.edu>
Tue, 28 Jul 2020 22:23:36 +0000 (18:23 -0400)
broken configstate causes hosts not to power on when they should

vlan manager needs to actually return allocated vlans

Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Change-Id: I1060a6599fb44bd2ca239d35fbf7e69d13f499a6

src/account/models.py
src/api/models.py

index 5d83ddf..6828ee1 100644 (file)
@@ -108,6 +108,8 @@ class VlanManager(models.Model):
         if len(allocated) != count:
             raise ResourceAvailabilityException("can't allocate the vlans requested")
 
+        return allocated
+
     def get_public_vlan(self):
         """Return reference to an available public network without reserving it."""
         return PublicNetwork.objects.filter(lab=self.lab_set.first(), in_use=False).first()
index 960fc26..ce62ea5 100644 (file)
@@ -384,7 +384,7 @@ class Job(models.Model):
 
 
 class TaskConfig(models.Model):
-    state = models.IntegerField(default=ConfigState.CLEAN)
+    state = models.IntegerField(default=ConfigState.NEW)
 
     keys = set()  # TODO: This needs to be an instance variable, not a class variable
     delta_keys_list = models.CharField(max_length=200, default="[]")