[Et-mgmt-commits-list] [SCM] virt-factory branch, master now at v0.0.3-234-g8e7af15

Michael DeHaan mdehaan at redhat.com
Fri Aug 24 23:11:23 UTC 2007


Hello,

This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.

Updating branch, master,
       via  8e7af15292c84fac0f432ad03d6bac16f01e3e25 (commit)
       via  cec50ebc8dae82c2cf149093a29c9f74a9409318 (commit)
       via  6f95d95076a0ac64c13d28f203d1c7d1dedcb567 (commit)
      from  e4145de60080dfd4aadf6c9d09d67de76f917b08 (commit)

- Log -----------------------------------------------------------------
commit 8e7af15292c84fac0f432ad03d6bac16f01e3e25
Author: Michael DeHaan <mdehaan at redhat.com>
Date:   Fri Aug 24 19:06:12 2007 -0400

    Do not auto-start if auto-start is disabled in the DB for this particular deployment.

commit cec50ebc8dae82c2cf149093a29c9f74a9409318
Author: Michael DeHaan <mdehaan at redhat.com>
Date:   Fri Aug 24 19:04:40 2007 -0400

    Auto-restart

commit 6f95d95076a0ac64c13d28f203d1c7d1dedcb567
Author: Michael DeHaan <mdehaan at redhat.com>
Date:   Fri Aug 24 18:35:09 2007 -0400

    :
-----------------------------------------------------------------------

Diffstat:
 nodes/nodes/server.py         |   28 ++++++++++++++++++++++++++++
 service/modules/deployment.py |    8 ++++++++
 service/server/server.py      |    2 +-
 website/about.html            |    6 +++---
 website/components.html       |   12 ------------
 website/faq.html              |    6 +++---
 6 files changed, 43 insertions(+), 19 deletions(-)

diff --git a/nodes/nodes/server.py b/nodes/nodes/server.py
index 4120c83..5aed95b 100755
--- a/nodes/nodes/server.py
+++ b/nodes/nodes/server.py
@@ -179,6 +179,34 @@ def serve_status():
      logger.info("STATUS FORK: connect")
      amqp_conn.connect()
 
+     # ask server which nodes to start.
+     virt_conn = virt_utils.VirtFactoryLibvirtConnection()
+     vms = virt_conn.find_vm(-1)
+     for vm in vms:
+         name = vm.name().replace("_",":").upper()
+         details = None
+         try:
+             details = amqp_conn.server.deployment_get_by_mac_address("UNSET",{ "mac_address" : name})
+             print "DETAILS: %s" % details
+         except:
+             # can't figure out to auto start this one...
+             traceback.print_exc()
+             logger.info("unowned vm: %s" % name)
+
+         # FIXME: check to see if this machine is actually supposed to
+         # be auto-started instead of starting all of them that are
+         # under virt-factory's control.  We may want some to stay off.
+         # check "details" for this.
+
+         if details.has_key("auto_start") and details["auto_start"] == 0: 
+             # this one is flagged to stay off
+             continue
+
+         state = virt_conn.get_status2(vm)
+         if state == "shutdown" or state == "crashed":
+             vm.create()
+
+
      all_status = {}
 
      while True:
diff --git a/service/modules/deployment.py b/service/modules/deployment.py
index ea8587a..7077b36 100755
--- a/service/modules/deployment.py
+++ b/service/modules/deployment.py
@@ -19,6 +19,7 @@ from server.codes import *
 from server import db
 from fieldvalidator import FieldValidator
 
+import time
 import profile
 import machine
 import web_svc
@@ -148,6 +149,9 @@ class Deployment(web_svc.AuthWebSvc):
         args["netboot_enabled"] = 0 # never PXE's
         args["registration_token"] = regtoken.RegToken().generate(token)
 
+        if not args.has_key("auto_start"):
+            args["auto_start"] = 1 
+       
         # cobbler sync must run with a filled in item in the database, so we must commit
         # prior to running cobbler sync
          
@@ -379,6 +383,10 @@ class Deployment(web_svc.AuthWebSvc):
         results = self.expand(deployment)
 
         results["state"] = args["state"]
+
+        # misnomer: this is the time of the last status update
+        results["last_heartbeat"] = int(time.time())
+  
         self.logger.debug("setting deployment status: %s" % results)
         self.edit(token, results)
 
diff --git a/service/server/server.py b/service/server/server.py
index 9f1873c..dc51914 100755
--- a/service/server/server.py
+++ b/service/server/server.py
@@ -160,7 +160,7 @@ class VfApiMethod:
             # register can
             #   take authtokens or regtokens, so they do there own
             # auth check
-            if self.__name not in ["user_login", "token_check", "register_system", "sign_node_cert" , "puppet_node_info", "deployment_set_state" ]:
+            if self.__name not in ["user_login", "token_check", "register_system", "sign_node_cert" , "puppet_node_info", "deployment_get_by_mac_address", "deployment_set_state" ]:
                 self.auth.token_check(args[0])
             rc = self.__method(*args)
         except VirtFactoryException, e:
diff --git a/website/about.html b/website/about.html
index ffde8c5..e59f2a9 100644
--- a/website/about.html
+++ b/website/about.html
@@ -3,14 +3,14 @@
 
 <a href="img/screenshot_full.png"><img src="img/screenshot.png" style="float: left; margin-right: 10px;" /></a>
 
-<p>Virt-Factory is a framework for managing a very large number of virtual machines such as might be found in datacenters or compute farms.  In many ways, it is a bit of a research project to determine new and efficient ways to control these large environments.
+<p>Virt-Factory is a set of applications for managing a very large number of virtual machines such as might be found in datacenters or compute farms.  The goal of the project is to determine new and efficient ways to control these large environments.
 </p>
 
 <p>
-Virt-Factory works by managing a pool of registered physical hosts, and then deploying virtual machines, which have specific roles as defined by their "profiles", onto those hosts.</p>
+Virt-Factory works by managing a pool of registered physical hosts, and then deploying virtual machines, which have specific roles as defined by their "profiles", onto those hosts.  These virtual machines can run either Xen or KVM.</p>
 
 <p>
-The application provides a Web UI, an XMLRPC API, and a command line interface is in development.  Basic management support is available now, though the future will revolve around tagging, batch management, reporting, and automated assistance around deployment ("deploying into the cloud"), and finding good candidate systems for migrations.  An example migration case: when taking a host machine down for maintaince, where should the guest virtual machines be moved?  We want virt-factory to be able to make these kinds of decisions automatically.
+The application provides a Web UI, an XMLRPC API, and a command line interface is in development.  Basic management support is available now -- future features will involve tagging, batch management, reporting, automated assistance around deployment ("deploying into the cloud"), and finding good candidate systems for migrations.  An example migration case: when taking a host machine down for maintaince, where should the guest virtual machines be moved?  We want virt-factory to be able to make these kinds of decisions automatically.
 </p>
 
 <p>Your feedback is valuable to us. Let us know which virtualization management features are most valuable to you, which ones are not, and which ones you'd like to see. Become a Virt-Factory developer and help us reach our vision. Either way, we'd love to hear from you.</p>
diff --git a/website/components.html b/website/components.html
index c61bf2a..8aaa1d2 100644
--- a/website/components.html
+++ b/website/components.html
@@ -15,15 +15,3 @@
 <li>Discuss cobbler on the <a href="http://www.redhat.com/mailman/listinfo/et-mgmt-tools">et-mgmt-tools at redhat.com mailing list</a>.</li>
 </ul>
 
-<!--
-<h4>surfr</h4>
-<img src="img/logo-surfr.png" />
-<p>surfr will be a <strong>software channel management tool</strong>. The goal of surfr is to make it easier to create repos, add software to them, mirror existing ones, and to merge them together. It will also support virtual repositories, which allow systems to receive controlled access to multiple repositories through a single (as visible to yum) repository.</p>
-<ul>
-<li><a href="http://et.redhat.com/page/Surfr_Wiki">surfr on the et.redhat.com wiki</a></li>
-<li><a href="http://git.et.redhat.com/?p=surfr.git;a=summary">surfr git repository</a></li>
-<li>Discuss surfr on the <a href="http://www.redhat.com/mailman/listinfo/et-mgmt-tools">et-mgmt-tools at redhat.com mailing list</a>.</li>
-</ul>
--->
-
-
diff --git a/website/faq.html b/website/faq.html
index e5fb0d4..1aef44f 100644
--- a/website/faq.html
+++ b/website/faq.html
@@ -29,14 +29,14 @@
 <a name="requirements">
 <dt>What do I need to run Virt-Factory?</dt>
 </a>
- <dd>Virt-Factory is currently supported on Fedora Core 6. Fedora 7 and Red Hat Enterprise Linux 5 support will be released shortly.
+ <dd>Virt-Factory 0.0.3 is currently supported on Fedora Core 6.  Version 0.0.4 will support Fedora 7 and Red Hat Enterprise Linux 5 support is pending.
  <br />
  <a href="#questions" class="back-to-top">Back to top</a>
 </dd>
 <a name="stability">
 <dt>How stable is Virt-Factory?</dt>
 </a>
- <dd>Virt-Factory is currently an alpha-level project with a fast-paced rate of development.
+ <dd>Virt-Factory is currently an alpha/beta-level project with a fast-paced rate of development.  Released RPMs are expected to work well together, while the source control checkouts are rather bleeding edge.  Bug-reports are welcome.
  <br />
  <a href="#questions" class="back-to-top">Back to top</a>
 </dd>
@@ -83,7 +83,7 @@
 <a name="deployment">
 <dt>How are systems deployed using Virt-Factory?</dt>
 </a>
- <dd>Virt-Factory uses <A HREF="http://cobbler.et.redhat.com">Cobbler</A> as an internal library for provisioning. This means that if you have a datacenter and get new machines "off the truck", you'll be able to walk up to a machine and pick a "profile" for that machine to run, and provision it on the spot from a PXE menu. Virtualization management is there too. However, Virt-Factory takes over a cobbler server completely, so no knowledge of Cobbler or cobbler commands is required. In fact, you can't run Virt-Factory on your existing cobbler server. Sorry :)  In the future, this may be possible.
+ <dd>Virt-Factory uses <A HREF="http://cobbler.et.redhat.com">Cobbler</A> as an internal library for provisioning. This means that if you have a datacenter and get new machines "off the truck", you'll be able to walk up to a machine and pick a "profile" for that machine to run, and provision it on the spot from a PXE menu. Virtualization management is there too. However, Virt-Factory takes over a cobbler server completely, so no knowledge of Cobbler or cobbler commands is required.  It may be possible to run seperate cobbler commands on a virt-factory server, though it would be better to run a seperate cobbler server in addition to virt-factory if you need customization ability.  Just set the next-server setting in DHCP up appropriately if you want to do this.  
  <br />
  <a href="#questions" class="back-to-top">Back to top</a>
 </dd>

hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
  e4145de60080dfd4aadf6c9d09d67de76f917b08 \
  8e7af15292c84fac0f432ad03d6bac16f01e3e25




More information about the Et-mgmt-commits-list mailing list