Merge branch 'master' of github.com:open-cloud/xos
diff --git a/Dockerfile b/Dockerfile
index 9715a95..3cdc864 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -94,6 +94,10 @@
 RUN chmod +x /opt/xos/scripts/opencloud
 RUN /opt/xos/scripts/opencloud genkeys
 
+# Workaround for AUFS issue
+# https://github.com/docker/docker/issues/783#issuecomment-56013588
+RUN mkdir /etc/ssl/private-copy; mv /etc/ssl/private/* /etc/ssl/private-copy/; rm -r /etc/ssl/private; mv /etc/ssl/private-copy /etc/ssl/private; chmod -R 0700 /etc/ssl/private; chown -R postgres /etc/ssl/private
+
 # Set postgres password to match default value in settings.py
 RUN service postgresql start; sudo -u postgres psql -c "alter user postgres with password 'password';"
 
@@ -112,4 +116,5 @@
 WORKDIR /root
 
 # Define default command.
-CMD ["/bin/bash"]
+#CMD ["/bin/bash"]
+CMD service postgresql start; cd /opt/xos; PUBLIC_HOSTNAME=`./xos-config.py get server_hostname $HOSTNAME`; python manage.py runserver $PUBLIC_HOSTNAME:8000
diff --git a/xos/openstack_observer/ansible.py b/xos/openstack_observer/ansible.py
index f8ed547..ec9f160 100644
--- a/xos/openstack_observer/ansible.py
+++ b/xos/openstack_observer/ansible.py
@@ -67,21 +67,26 @@
     f.write(buffer)
     f.flush()
 
-    run = os.popen(XOS_DIR + '/observer/run_ansible %s'%shellquote(fqp))
-    #run = os.popen('ansible-playbook -v %s'%shellquote(fqp))
-    msg = run.read()
-    status = run.close()
+    
+    if (Config().observer_steps):
+        run = os.popen(XOS_DIR + '/observer/run_ansible %s'%shellquote(fqp))
+        msg = run.read()
+        status = run.close()
 
+        
+    else:
+        msg = open(fqp+'.out').read()
+        
     try:
         ok_results = parse_output(msg)
-	if (len(ok_results) != expected_num):
-		raise ValueError('Unexpected num')
+        if (len(ok_results) != expected_num):
+            raise ValueError('Unexpected num')
     except ValueError,e:
         all_fatal = re.findall(r'^msg: (.*)',msg,re.MULTILINE)
         all_fatal2 = re.findall(r'^ERROR: (.*)',msg,re.MULTILINE)
-	
-	
-	all_fatal.extend(all_fatal2)
+
+
+        all_fatal.extend(all_fatal2)
         try:
             error = ' // '.join(all_fatal)
         except:
diff --git a/xos/openstack_observer/steps/sync_slivers.py b/xos/openstack_observer/steps/sync_slivers.py
index 9cb0c89..ea6addd 100644
--- a/xos/openstack_observer/steps/sync_slivers.py
+++ b/xos/openstack_observer/steps/sync_slivers.py
@@ -73,12 +73,15 @@
                     nics.append(net['id'])
 
         # look up image id
-        controller_driver = self.driver.admin_driver(controller=sliver.node.site_deployment.controller)
-        image_id = None
-        images = controller_driver.shell.glanceclient.images.list()
-        for image in images:
-            if image.name == sliver.image.name or not image_id:
-                image_id = image.id
+        if (not sliver.image.id):
+            controller_driver = self.driver.admin_driver(controller=sliver.node.site_deployment.controller)
+            image_id = None
+            images = controller_driver.shell.glanceclient.images.list()
+            for image in images:
+                if image.name == sliver.image.name or not image_id:
+                    image_id = image.id
+        else:
+            image_id = sliver.image.id
 
         # look up key name at the controller
         # create/fetch keypair
diff --git a/xos/xos_config b/xos/xos_config
index a618905..26211d0 100644
--- a/xos/xos_config
+++ b/xos/xos_config
@@ -32,6 +32,7 @@
 ca_ssl_cert=/etc/ssl/certs/ca-certificates.crt
 
 [observer]
+pretend=True
 backoff_disabled=False
 images_directory=/opt/xos/images
 dependency_graph=/opt/xos/model-deps