add crushmap template, fix tests

Change-Id: I9b22631acf0d268ea6cf543199191170209d8fe3
diff --git a/.kitchen.yml b/.kitchen.yml
index 2fbd0b7..00ffaf3 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -14,6 +14,12 @@
   formula: ceph
   grains:
     noservices: True
+  vendor_repo:
+    - type: apt
+      url: http://cz.ceph.com/debian-jewel
+      key_url: https://download.ceph.com/keys/release.asc
+      components: main
+      distribution: xenial
   state_top:
     base:
       "*":
@@ -37,8 +43,17 @@
 
 suites:
 
-  - name: ceph_client
+  - name: ceph_client_single
     provisioner:
       pillars-from-files:
-        ceph.sls: tests/pillar/ceph_client.sls
+        ceph.sls: tests/pillar/ceph_client_single.sls
+  - name: ceph_mon_single
+    provisioner:
+      pillars-from-files:
+        ceph.sls: tests/pillar/ceph_mon_single.sls
+  - name: ceph_osd_single
+    provisioner:
+      pillars-from-files:
+        ceph.sls: tests/pillar/ceph_osd_single.sls
+
 # vim: ft=yaml sw=2 ts=2 sts=2 tw=125
diff --git a/.travis.yml b/.travis.yml
index 4f34af2..f1b5ed6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,7 +17,7 @@
   - bundle install
 
 env:
-    - PLATFORM=trevorj/salty-whales:trusty
+#    - PLATFORM=trevorj/salty-whales:trusty
     - PLATFORM=trevorj/salty-whales:xenial
 
 
diff --git a/README.rst b/README.rst
index c9a12f7..8dbcc77 100644
--- a/README.rst
+++ b/README.rst
@@ -251,8 +251,50 @@
             pgp_num: 256
             type: erasure
             crush_ruleset_name: 0
-            erasure_code_profile: 
 
+Generate CRUSH map
++++++++++++++++++++
+
+It is required to define the `type` for crush buckets and these types must start with `root` (top) and end with `host`. OSD daemons will be assigned to hosts according to it's hostname. Weight of the buckets will be calculated according to weight of it's childen.
+
+.. code-block:: yaml
+
+  crush:
+    enabled: True
+    tunables:
+      choose_total_tries: 50
+    type:
+      - root
+      - region
+      - rack
+      - host
+    root:
+      - name: root1
+      - name: root2
+    region:
+      - name: eu-1
+        parent: root1
+      - name: eu-2
+        parent: root1
+      - name: us-1
+        parent: root2
+    rack:
+      - name: rack01
+        parent: eu-1
+      - name: rack02
+        parent: eu-2
+      - name: rack03
+        parent: us-1
+    rule:
+      sata:
+        ruleset: 0
+        type: replicated
+        min_size: 1
+        max_size: 10
+        steps:
+          - take crushroot.performanceblock.satahss.1
+          - choseleaf firstn 0 type failure_domain
+          - emit
 
 Ceph monitoring
 ---------------
diff --git a/ceph/files/crushmap b/ceph/files/crushmap
index c89d5e3..7b244d3 100644
--- a/ceph/files/crushmap
+++ b/ceph/files/crushmap
@@ -1,1232 +1,114 @@
+{%- from "ceph/map.jinja" import setup with context -%}
+# begin crush map
 
+{%- set types = {} -%}
+{%- set hosts = {} -%}
+{%- set osds = {} -%}
+{%- set weights = {} -%}
 
+{%- for node_name, node_grains in salt['mine.get']('*', 'grains.items').iteritems() -%}
+  {%- if node_grains.ceph_osd_host_id is defined -%}
+    {# load OSDs and compute weight#}
+    {%- set node_weight = [] -%}
+    {%- for osd_relative_id, osd in node_grains.ceph_osd_disk.iteritems() -%}
+      {%- set osd_id = node_grains.ceph_osd_host_id ~ osd_relative_id -%}
+      {%- do osd.update({'host': node_grains.nodename }) -%}
+      {%- do osds.update({osd_id: osd}) -%}
+      {%- do node_weight.append(osd.weight) -%}
+    {%- endfor -%}
 
+    {%- do hosts.update({node_grains.nodename: {'weight': node_weight|sum, 'parent': node_grains.ceph_crush_parent }}) -%}
 
+  {%- endif -%}
+{%- endfor -%}
 
+{%- set _crush = setup.crush -%}
+{%- set _buckets = [] %}
 
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8">
-  <link rel="dns-prefetch" href="https://assets-cdn.github.com">
-  <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
-  <link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
-  <link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
-  <link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
-  <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
-  <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
+# tunables
+{%- for k, v in _crush.get('tunables', {}).iteritems() %}
+tunable {{ k }}: {{ v }}
+{%- endfor %}
 
+# types
+{%- for i in _crush.get('type', []) %}
+type {{ loop.index }} {{ i }}
+{%- do types.update({loop.index: i}) %}
+{%- endfor %}
 
+# devices
+{%- for disk_id, disk in osds.iteritems() %}
+device {{ disk_id }} osd.{{ disk_id }}{%- if disk.get('class') %} class {{ disk.class }}{% endif %}
+{%- endfor %}
 
-  <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-77c3b874f32e71b14cded5a120f42f5c7288fa52e0a37f2d5919fbd8bcfca63c.css" media="all" rel="stylesheet" />
-  <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-68923e58eaacf64b4af271e01e5c657997f95533fd4a7e5be4b2ed7e23158a03.css" media="all" rel="stylesheet" />
-  
-  
-  <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/site-65aadd1762fe5f6e44708ac1c774a84be59a802f7109155de047e4f3c9f1202a.css" media="all" rel="stylesheet" />
-  
+# host buckets
+{%- for bucket in hosts %}
+{%- set weight = [] %}
+host {{ bucket }} {
+  id -{{ loop.index }}
+  alg straw2
+  hash 0
+  {%- for disk_id, disk in osds.iteritems() %}
+  {%- if disk.host == bucket %}
+  item osd.{{ disk_id }} weight {{ disk.weight }}
+  {%- do weight.append(disk.weight) %}
+  {%- endif %}
+  {%- endfor %}
+  {%- do weights.update({'host-' ~ bucket: weight|sum}) %}
+  # weight: {{ weights['host-' ~ bucket] }}
+  # parent: {{ hosts[bucket].parent }}
+}
+{%- endfor %}
 
-  <meta name="viewport" content="width=device-width">
-  
-  <title>salt-formula-ceph/ceph/files/crushmap at crush · LotharKAtt/salt-formula-ceph · GitHub</title>
-  <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
-  <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
-  <meta property="fb:app_id" content="1401488693436528">
+{%- for i in _crush.type|reverse %}
+{%- set _typeid = loop.revindex -%}
+{%- for resource in _crush.get(i, {}) -%}
+{% set weight = [] %}
+{{ i }} {{ resource.name }} {
+  id -{{ loop.index }}
+  alg {{ resource.get('alg', 'straw2') }}
+  hash {{ resource.get('hash', 0) }}
 
-    
-    <meta content="https://avatars2.githubusercontent.com/u/9153021?v=4&amp;s=400" property="og:image" /><meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="LotharKAtt/salt-formula-ceph" property="og:title" /><meta content="https://github.com/LotharKAtt/salt-formula-ceph" property="og:url" /><meta content="Contribute to salt-formula-ceph development by creating an account on GitHub." property="og:description" />
+  # list children resources - {{ _crush.type[_typeid] }}
+  {%- if _crush.type[_typeid] == 'host' %}
 
-  <link rel="assets" href="https://assets-cdn.github.com/">
-  
-  <meta name="pjax-timeout" content="1000">
-  
-  <meta name="request-id" content="BBD6:29CE:396E9D5:5CE3D85:59944B4A" data-pjax-transient>
-  
+    {%- for r_name, r in hosts.iteritems() %}
+      {%- if r.parent == resource.name %}
+  item {{ r_name }} weight {{ r.weight }}
+      {%- do weight.append(r.weight) %}
+      {%- endif %}
+    {%- endfor %}
 
-  <meta name="selected-link" value="repo_source" data-pjax-transient>
+  {%- else %}
 
-  <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
-<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
-    <meta name="google-analytics" content="UA-3769691-2">
+    {%- for r in _crush.get(_crush.type[_typeid], []) %}
+      {%- if r.parent == resource.name %}
+      {%- set rw = weights[_crush.type[_typeid] ~ '-' ~ r.name] %}
+  item {{ r.name }} weight {{ rw }}
+      {%- do weight.append(rw) %}
+      {%- endif %}
+    {%- endfor %}
 
-<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="github" name="octolytics-app-id" /><meta content="https://collector.githubapp.com/github-external/browser_event" name="octolytics-event-url" /><meta content="BBD6:29CE:396E9D5:5CE3D85:59944B4A" name="octolytics-dimension-request_id" /><meta content="iad" name="octolytics-dimension-region_edge" /><meta content="iad" name="octolytics-dimension-region_render" />
-<meta content="/&lt;user-name&gt;/&lt;repo-name&gt;/blob/blame" data-pjax-transient="true" name="analytics-location" />
+  {%- endif %}
 
+  {%- do weights.update({i ~ '-' ~ resource.name: weight|sum }) %}
+  # weight: {{ weight|sum }}
+}
+{%- endfor %}
+{%- endfor %}
 
-
-
-  <meta class="js-ga-set" name="dimension1" content="Logged Out">
-
-
-  
-
-      <meta name="hostname" content="github.com">
-  <meta name="user-login" content="">
-
-      <meta name="expected-hostname" content="github.com">
-    <meta name="js-proxy-site-detection-payload" content="YjUwYTQ0MTA1YmQ3MTVjMjJkN2U2MDQ4OWU1YzYzNzNjMjc5ZGJjNDk0YTY5ZDJiYzg4MWY4MzBlZDAwMzQzYXx7InJlbW90ZV9hZGRyZXNzIjoiMTc2Ljc0LjIxOC4xMDYiLCJyZXF1ZXN0X2lkIjoiQkJENjoyOUNFOjM5NkU5RDU6NUNFM0Q4NTo1OTk0NEI0QSIsInRpbWVzdGFtcCI6MTUwMjg5MDgyNiwiaG9zdCI6ImdpdGh1Yi5jb20ifQ==">
-
-
-  <meta name="html-safe-nonce" content="2dcb8c4d974d3056f4d6dea5dca711fea124a59e">
-
-  <meta http-equiv="x-pjax-version" content="fce7f68c60f33171e8b95251e3a9a015">
-  
-
-      <link href="https://github.com/LotharKAtt/salt-formula-ceph/commits/crush.atom" rel="alternate" title="Recent Commits to salt-formula-ceph:crush" type="application/atom+xml">
-
-  <meta name="description" content="Contribute to salt-formula-ceph development by creating an account on GitHub.">
-  <meta name="go-import" content="github.com/LotharKAtt/salt-formula-ceph git https://github.com/LotharKAtt/salt-formula-ceph.git">
-
-  <meta content="9153021" name="octolytics-dimension-user_id" /><meta content="LotharKAtt" name="octolytics-dimension-user_login" /><meta content="94552459" name="octolytics-dimension-repository_id" /><meta content="LotharKAtt/salt-formula-ceph" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="true" name="octolytics-dimension-repository_is_fork" /><meta content="48380280" name="octolytics-dimension-repository_parent_id" /><meta content="salt-formulas/salt-formula-ceph" name="octolytics-dimension-repository_parent_nwo" /><meta content="48380280" name="octolytics-dimension-repository_network_root_id" /><meta content="salt-formulas/salt-formula-ceph" name="octolytics-dimension-repository_network_root_nwo" /><meta content="false" name="octolytics-dimension-repository_explore_github_marketplace_ci_cta_shown" />
-
-
-
-
-  <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
-
-  <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
-
-  <link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#000000">
-  <link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
-
-<meta name="theme-color" content="#1e2327">
-
-
-
-  </head>
-
-  <body class="logged-out env-production full-width">
-    
-
-  <div class="position-relative js-header-wrapper ">
-    <a href="#start-of-content" tabindex="1" class="px-2 py-4 show-on-focus js-skip-to-content">Skip to content</a>
-    <div id="js-pjax-loader-bar" class="pjax-loader-bar"><div class="progress"></div></div>
-
-    
-    
-    
-
-
-
-        <div class="header header-logged-out position-relative f4 py-3" role="banner">
-  <div class="container-lg px-3 clearfix">
-    <div class="d-flex flex-justify-between">
-      <div class="d-flex">
-        <a class="header-logo-invertocat my-0" href="https://github.com/" aria-label="Homepage" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark">
-          <svg aria-hidden="true" class="octicon octicon-mark-github" height="32" version="1.1" viewBox="0 0 16 16" width="32"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
-        </a>
-
-        <div class="header-sitemenu clearfix">
-            <nav>
-              <ul class="d-flex list-style-none">
-                  <li class="ml-2">
-                    <a href="/features" class="js-selected-navigation-item header-navlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:features" data-selected-links="/features /features">
-                      Features
-</a>                  </li>
-                  <li class="ml-4">
-                    <a href="/business" class="js-selected-navigation-item header-navlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:business" data-selected-links="/business /business/security /business/customers /business">
-                      Business
-</a>                  </li>
-
-                  <li class="ml-4">
-                    <a href="/explore" class="js-selected-navigation-item header-navlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:explore" data-selected-links="/explore /trending /trending/developers /integrations /integrations/feature/code /integrations/feature/collaborate /integrations/feature/ship /showcases /explore">
-                      Explore
-</a>                  </li>
-
-                  <li class="ml-4">
-                        <a href="/marketplace" class="js-selected-navigation-item header-navlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:marketplace" data-selected-links=" /marketplace">
-                          Marketplace
-</a>                  </li>
-                  <li class="ml-4">
-                    <a href="/pricing" class="js-selected-navigation-item header-navlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:pricing" data-selected-links="/pricing /pricing/developer /pricing/team /pricing/business-hosted /pricing/business-enterprise /pricing">
-                      Pricing
-</a>                  </li>
-              </ul>
-            </nav>
-        </div>
-      </div>
-
-      <div class="d-flex">
-          <div class="mt-1 mr-3">
-            <div class="header-search scoped-search site-scoped-search js-site-search" role="search">
-  <!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/LotharKAtt/salt-formula-ceph/search" class="js-site-search-form" data-scoped-search-url="/LotharKAtt/salt-formula-ceph/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
-    <label class="form-control header-search-wrapper js-chromeless-input-container">
-        <a href="/LotharKAtt/salt-formula-ceph/blame/crush/ceph/files/crushmap" class="header-search-scope no-underline">This repository</a>
-      <input type="text"
-        class="form-control header-search-input js-site-search-focus js-site-search-field is-clearable"
-        data-hotkey="s"
-        name="q"
-        value=""
-        placeholder="Search"
-        aria-label="Search this repository"
-        data-unscoped-placeholder="Search GitHub"
-        data-scoped-placeholder="Search"
-        autocapitalize="off">
-        <input type="hidden" class="js-site-search-type-field" name="type" >
-    </label>
-</form></div>
-
-          </div>
-
-        <span class="d-inline-block">
-            <div class="header-navlink px-0 py-2 m-0">
-              <a class="text-bold text-white no-underline" href="/login?return_to=%2FLotharKAtt%2Fsalt-formula-ceph%2Fblame%2Fcrush%2Fceph%2Ffiles%2Fcrushmap" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign in</a>
-                <span class="text-gray">or</span>
-                <a class="text-bold text-white no-underline" href="/join?source=header-repo" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign up</a>
-            </div>
-        </span>
-      </div>
-    </div>
-  </div>
-</div>
-
-
-  </div>
-
-  <div id="start-of-content" class="show-on-focus"></div>
-
-    <div id="js-flash-container">
-</div>
-
-
-
-  <div role="main">
-        <div itemscope itemtype="http://schema.org/SoftwareSourceCode">
-    <div id="js-repo-pjax-container" data-pjax-container>
-      
-
-
-
-
-    <div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav">
-      <div class="container repohead-details-container">
-
-        <ul class="pagehead-actions">
-  <li>
-      <a href="/login?return_to=%2FLotharKAtt%2Fsalt-formula-ceph"
-    class="btn btn-sm btn-with-count tooltipped tooltipped-n"
-    aria-label="You must be signed in to watch a repository" rel="nofollow">
-    <svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
-    Watch
-  </a>
-  <a class="social-count" href="/LotharKAtt/salt-formula-ceph/watchers"
-     aria-label="5 users are watching this repository">
-    5
-  </a>
-
-  </li>
-
-  <li>
-      <a href="/login?return_to=%2FLotharKAtt%2Fsalt-formula-ceph"
-    class="btn btn-sm btn-with-count tooltipped tooltipped-n"
-    aria-label="You must be signed in to star a repository" rel="nofollow">
-    <svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg>
-    Star
-  </a>
-
-    <a class="social-count js-social-count" href="/LotharKAtt/salt-formula-ceph/stargazers"
-      aria-label="1 user starred this repository">
-      1
-    </a>
-
-  </li>
-
-  <li>
-      <a href="/login?return_to=%2FLotharKAtt%2Fsalt-formula-ceph"
-        class="btn btn-sm btn-with-count tooltipped tooltipped-n"
-        aria-label="You must be signed in to fork a repository" rel="nofollow">
-        <svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
-        Fork
-      </a>
-
-    <a href="/LotharKAtt/salt-formula-ceph/network" class="social-count"
-       aria-label="8 users forked this repository">
-      8
-    </a>
-  </li>
-</ul>
-
-        <h1 class="public ">
-  <svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
-  <span class="author" itemprop="author"><a href="/LotharKAtt" class="url fn" rel="author">LotharKAtt</a></span><!--
---><span class="path-divider">/</span><!--
---><strong itemprop="name"><a href="/LotharKAtt/salt-formula-ceph" data-pjax="#js-repo-pjax-container">salt-formula-ceph</a></strong>
-
-    <span class="fork-flag">
-      <span class="text">forked from <a href="/salt-formulas/salt-formula-ceph">salt-formulas/salt-formula-ceph</a></span>
-    </span>
-</h1>
-
-      </div>
-      <div class="container">
-        
-<nav class="reponav js-repo-nav js-sidenav-container-pjax"
-     itemscope
-     itemtype="http://schema.org/BreadcrumbList"
-     role="navigation"
-     data-pjax="#js-repo-pjax-container">
-
-  <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
-    <a href="/LotharKAtt/salt-formula-ceph/tree/crush" class="js-selected-navigation-item selected reponav-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /LotharKAtt/salt-formula-ceph/tree/crush" itemprop="url">
-      <svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"/></svg>
-      <span itemprop="name">Code</span>
-      <meta itemprop="position" content="1">
-</a>  </span>
-
-
-  <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
-    <a href="/LotharKAtt/salt-formula-ceph/pulls" class="js-selected-navigation-item reponav-item" data-hotkey="g p" data-selected-links="repo_pulls /LotharKAtt/salt-formula-ceph/pulls" itemprop="url">
-      <svg aria-hidden="true" class="octicon octicon-git-pull-request" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
-      <span itemprop="name">Pull requests</span>
-      <span class="Counter">1</span>
-      <meta itemprop="position" content="3">
-</a>  </span>
-
-    <a href="/LotharKAtt/salt-formula-ceph/projects" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /LotharKAtt/salt-formula-ceph/projects">
-      <svg aria-hidden="true" class="octicon octicon-project" height="16" version="1.1" viewBox="0 0 15 16" width="15"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
-      Projects
-      <span class="Counter" >0</span>
-</a>
-
-
-    <div class="reponav-dropdown js-menu-container">
-      <button type="button" class="btn-link reponav-item reponav-dropdown js-menu-target " data-no-toggle aria-expanded="false" aria-haspopup="true">
-        Insights
-        <svg aria-hidden="true" class="octicon octicon-triangle-down v-align-middle text-gray" height="11" version="1.1" viewBox="0 0 12 16" width="8"><path fill-rule="evenodd" d="M0 5l6 6 6-6z"/></svg>
-      </button>
-      <div class="dropdown-menu-content js-menu-content">
-        <div class="dropdown-menu dropdown-menu-sw">
-          <a class="dropdown-item" href="/LotharKAtt/salt-formula-ceph/pulse" data-skip-pjax>
-            <svg aria-hidden="true" class="octicon octicon-pulse" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M11.5 8L8.8 5.4 6.6 8.5 5.5 1.6 2.38 8H0v2h3.6l.9-1.8.9 5.4L9 8.5l1.6 1.5H14V8z"/></svg>
-            Pulse
-          </a>
-          <a class="dropdown-item" href="/LotharKAtt/salt-formula-ceph/graphs" data-skip-pjax>
-            <svg aria-hidden="true" class="octicon octicon-graph" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"/></svg>
-            Graphs
-          </a>
-        </div>
-      </div>
-    </div>
-</nav>
-
-      </div>
-    </div>
-
-<div class="container new-discussion-timeline experiment-repo-nav">
-  <div class="repository-content">
-
-    
-
-  <div class="wants-full-width-container"></div>
-
-  <a href="/LotharKAtt/salt-formula-ceph/blame/0bd4f260193548ee03d0cc11cd79fb2349f47eb8/ceph/files/crushmap" class="d-none js-permalink-shortcut" data-hotkey="y">Permalink</a>
-
-  <div class="breadcrumb css-truncate blame-breadcrumb js-zeroclipboard-container">
-    <span class="css-truncate-target js-zeroclipboard-target"><span class="repo-root js-repo-root"><span class="js-path-segment"><a href="/LotharKAtt/salt-formula-ceph/tree/crush"><span>salt-formula-ceph</span></a></span></span><span class="separator">/</span><span class="js-path-segment"><a href="/LotharKAtt/salt-formula-ceph/tree/crush/ceph"><span>ceph</span></a></span><span class="separator">/</span><span class="js-path-segment"><a href="/LotharKAtt/salt-formula-ceph/tree/crush/ceph/files"><span>files</span></a></span><span class="separator">/</span><strong class="final-path">crushmap</strong></span>
-    <button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><svg aria-hidden="true" class="octicon octicon-clippy" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg></button>
-  </div>
-
-  <div class="line-age-legend">
-    <span>Newer</span>
-    <ol>
-        <li class="heat" data-heat="1"></li>
-        <li class="heat" data-heat="2"></li>
-        <li class="heat" data-heat="3"></li>
-        <li class="heat" data-heat="4"></li>
-        <li class="heat" data-heat="5"></li>
-        <li class="heat" data-heat="6"></li>
-        <li class="heat" data-heat="7"></li>
-        <li class="heat" data-heat="8"></li>
-        <li class="heat" data-heat="9"></li>
-        <li class="heat" data-heat="10"></li>
-    </ol>
-    <span>Older</span>
-  </div>
-
-  <div class="file">
-    <div class="file-header">
-      <div class="file-actions">
-        <div class="BtnGroup">
-          <a href="/LotharKAtt/salt-formula-ceph/raw/crush/ceph/files/crushmap" class="btn btn-sm BtnGroup-item" id="raw-url">Raw</a>
-          <a href="/LotharKAtt/salt-formula-ceph/blob/crush/ceph/files/crushmap" class="btn btn-sm js-update-url-with-hash BtnGroup-item">Normal view</a>
-          <a href="/LotharKAtt/salt-formula-ceph/commits/crush/ceph/files/crushmap" class="btn btn-sm BtnGroup-item" rel="nofollow">History</a>
-        </div>
-      </div>
-
-  
-
-      <div class="file-info">
-        <svg aria-hidden="true" class="octicon octicon-file-text" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M6 5H2V4h4v1zM2 8h7V7H2v1zm0 2h7V9H2v1zm0 2h7v-1H2v1zm10-7.5V14c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1h7.5L12 4.5zM11 5L8 2H1v12h10V5z"/></svg>
-        <span class="file-mode" title="File Mode">100644</span>
-        <span class="file-info-divider"></span>
-          148 lines (132 sloc)
-          <span class="file-info-divider"></span>
-        3.3 KB
-      </div>
-    </div>
-
-    <div class="blob-wrapper">
-      <table class="blame-container highlight data js-file-line-container tab-size" data-tab-size="8">
-          <tbody class="blame-hunk">
-            <tr class="blame-commit">
-              <td class="blame-commit-info" rowspan="38">
-                <span class="blame-commit-date text-gray-light"><time-ago datetime="2017-08-15T07:33:59Z">Aug 15, 2017</time-ago></span>
-                <a href="/smolaon" aria-label="smolaon" class="tooltipped tooltipped-e">
-                  <img alt="@smolaon" class="avatar blame-commit-avatar" height="16" src="https://avatars3.githubusercontent.com/u/17276637?v=4&amp;s=32" width="16" />
-</a>                <span class="blame-commit-title">
-                    <a href="/LotharKAtt/salt-formula-ceph/commit/3621e22b7b7d7fea2175194a5f05c8d25cd5a91c" class="message" data-pjax="true" title="added new mon and osd funcionalities">added new mon and osd funcionalities</a>
-                </span>
-              </td>
-              <td class="blob-reblame" rowspan="38">
-              </td>
-            </tr>
-
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L1">1</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC1">{%- from &quot;ceph/map.jinja&quot; import common, osd with context -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L2">2</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC2"># begin crush map</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L3">3</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC3"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L4">4</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC4">{%- set _crush = common.get(&#39;crush&#39;, {}) -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L5">5</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC5">{%- set _buckets = [] -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L6">6</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC6"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L7">7</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC7"># tunables</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L8">8</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC8">{%- for k, v in _crush.get(&#39;tunables&#39;, {}).iteritems() %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L9">9</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC9">tunable {{ k }}: {{ v }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L10">10</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC10">{%- endfor %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L11">11</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC11"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L12">12</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC12"># types</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L13">13</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC13">{%- for i in _crush.type %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L14">14</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC14">type {{ loop.index }} {{ i }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L15">15</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC15">{%- endfor %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L16">16</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC16"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L17">17</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC17"># device</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L18">18</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC18">{%- for disk_id, disk in osd.disk.iteritems() %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L19">19</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC19">device {{ disk_id }} osd.{{ disk_id }}{%- if disk.get(&#39;class&#39;) %} class {{ disk.class }}{% endif %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L20">20</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC20">{%- if disk.host not in _buckets %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L21">21</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC21">{%- do _buckets.append(disk.host) %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L22">22</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC22">{%- endif %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L23">23</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC23">{%- endfor %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L24">24</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC24"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L25">25</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC25"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L26">26</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC26"># buckets for types</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L27">27</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC27">{%- for i in _crush.type %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L28">28</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC28">{% set _typeid = loop.index %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L29">29</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC29"># buckets for type {{ i }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L30">30</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC30">{%- for resource in _crush.get(i, {}) %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L31">31</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC31">{{ i }} {{ resource.name }} {</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L32">32</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC32">  id -{{ loop.index }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L33">33</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC33">  alg {{ resource.get(&#39;alg&#39;, &#39;straw2&#39;) }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L34">34</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC34">  hash {{ resource.get(&#39;hash&#39;, 0) }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L35">35</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC35"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L36">36</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC36">  # list children resources</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L37">37</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC37">  {%- for r in _crush.get(_crush.type[_typeid], []) %}</td>
-              </tr>
-          </tbody>
-          <tbody class="blame-hunk">
-            <tr class="blame-commit">
-              <td class="blame-commit-info" rowspan="2">
-                <span class="blame-commit-date text-gray-light"><time-ago datetime="2017-08-16T13:37:06Z">Aug 16, 2017</time-ago></span>
-                <a href="/tomkukral" aria-label="tomkukral" class="tooltipped tooltipped-e">
-                  <img alt="@tomkukral" class="avatar blame-commit-avatar" height="16" src="https://avatars0.githubusercontent.com/u/6077499?v=4&amp;s=32" width="16" />
-</a>                <span class="blame-commit-title">
-                    <a href="/LotharKAtt/salt-formula-ceph/commit/0bd4f260193548ee03d0cc11cd79fb2349f47eb8" class="message" data-pjax="true" title="fix whitespace">fix whitespace</a>
-                </span>
-              </td>
-              <td class="blob-reblame" rowspan="2">
-                  <a href="/LotharKAtt/salt-formula-ceph/blame/12edf300bcdf97a49585fe3f02483f4ce35252d9/ceph/files/crushmap"
-                    aria-label="View blame prior to this change" class="reblame-link tooltipped tooltipped-w">
-                    <svg aria-hidden="true" class="octicon octicon-versions" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M13 3H7c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-1 8H8V5h4v6zM4 4h1v1H4v6h1v1H4c-.55 0-1-.45-1-1V5c0-.55.45-1 1-1zM1 5h1v1H1v4h1v1H1c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1z"/></svg>
-                  </a>
-              </td>
-            </tr>
-
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L38">38</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC38">  {%- if r.parent == resource.name %}</td>
-              </tr>
-          </tbody>
-          <tbody class="blame-hunk">
-            <tr class="blame-commit">
-              <td class="blame-commit-info" rowspan="110">
-                <span class="blame-commit-date text-gray-light"><time-ago datetime="2017-08-15T07:33:59Z">Aug 15, 2017</time-ago></span>
-                <a href="/smolaon" aria-label="smolaon" class="tooltipped tooltipped-e">
-                  <img alt="@smolaon" class="avatar blame-commit-avatar" height="16" src="https://avatars3.githubusercontent.com/u/17276637?v=4&amp;s=32" width="16" />
-</a>                <span class="blame-commit-title">
-                    <a href="/LotharKAtt/salt-formula-ceph/commit/3621e22b7b7d7fea2175194a5f05c8d25cd5a91c" class="message" data-pjax="true" title="added new mon and osd funcionalities">added new mon and osd funcionalities</a>
-                </span>
-              </td>
-              <td class="blob-reblame" rowspan="110">
-              </td>
-            </tr>
-
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L39">39</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC39">  item {{ r.name }} weight 999</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L40">40</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC40">  {%- endif %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L41">41</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC41">  {%- endfor %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L42">42</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC42">}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L43">43</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC43"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L44">44</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC44">{%- endfor %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L45">45</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC45">{%- endfor %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L46">46</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC46"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L47">47</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC47"># host buckets</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L48">48</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC48">{%- for bucket in _buckets %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L49">49</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC49">host {{ bucket }} {</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L50">50</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC50">  id -{{ loop.index }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L51">51</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC51">  alg straw2</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L52">52</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC52">  hash 0</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L53">53</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC53">  {%- for disk_id, disk in osd.disk.iteritems() %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L54">54</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC54">  {%- if disk.host == bucket %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L55">55</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC55">  item osd.{{ disk_id }} weight 1.817666666666666666666666666</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L56">56</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC56">  {%- endif %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L57">57</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC57">  {%- endfor %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L58">58</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC58"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L59">59</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC59">}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L60">60</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC60">{%- endfor %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L61">61</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC61"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L62">62</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC62"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L63">63</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC63">{#</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L64">64</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC64"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L65">65</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC65">    item osd.{{ osd }} weight 1.817</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L66">66</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC66">    {% endfor -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L67">67</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC67">}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L68">68</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC68">{%- endif -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L69">69</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC69">{% endfor -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L70">70</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC70">{% for failure_domain, nodes in failure_domains.iteritems() %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L71">71</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC71">failure_domain {{ failure_domain }} {</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L72">72</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC72">    alg straw2</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L73">73</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC73">    hash 0</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L74">74</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC74">    {% for osd in failure_domains[failure_domain][&#39;osds&#39;] -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L75">75</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC75">    {% if &#39;ssd&#39; in failure_domain -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L76">76</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC76">    item {{ osd }}-ssd weight {{ 1.817 * ssd_osds[osd] | count }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L77">77</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC77">    {% else -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L78">78</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC78">    item {{ osd }} weight {{ 1.817 * osds[osd] | count }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L79">79</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC79">    {% endif -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L80">80</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC80">    {% endfor -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L81">81</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC81">}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L82">82</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC82">{% endfor %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L83">83</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC83">root crushroot.performanceblock.satassd.1 {</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L84">84</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC84">    {% if id.append(id.pop() + 1) %}{% endif %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L85">85</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC85">    id -{{ id[0] }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L86">86</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC86">    alg straw</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L87">87</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC87">    hash 0</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L88">88</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC88">    {% for domain, nodes in failure_domains.iteritems() -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L89">89</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC89">    {% if &#39;ssd&#39; in domain -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L90">90</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC90">    item {{ domain }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L91">91</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC91">    {% endif -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L92">92</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC92">    {% endfor -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L93">93</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC93">}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L94">94</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC94">root crushroot.performanceblock.satahdd.1 {</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L95">95</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC95">    {% if id.append(id.pop() + 1) %}{% endif %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L96">96</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC96">    id -{{ id[0] }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L97">97</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC97">    alg straw</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L98">98</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC98">    hash 0</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L99">99</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC99">    {% for domain, nodes in failure_domains.iteritems() -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L100">100</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC100">    {% if &#39;sata&#39; in domain and &#39;sata2&#39; not in domain -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L101">101</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC101">    item {{ domain }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L102">102</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC102">    {% endif -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L103">103</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC103">    {% endfor -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L104">104</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC104">}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L105">105</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC105">root crushroot.object.satahdd.2 {</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L106">106</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC106">    {% if id.append(id.pop() + 1) %}{% endif %}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L107">107</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC107">    id -{{ id[0] }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L108">108</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC108">    alg straw</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L109">109</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC109">    hash 0</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L110">110</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC110">    {% for domain, nodes in failure_domains.iteritems() -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L111">111</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC111">    {% if &#39;sata2&#39; in domain -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L112">112</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC112">    item {{ domain }}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L113">113</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC113">    {% endif -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L114">114</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC114">    {% endfor -%}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L115">115</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC115">}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L116">116</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC116"># rules</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L117">117</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC117">rule sata {</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L118">118</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC118">    ruleset 0</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L119">119</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC119">    type replicated</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L120">120</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC120">    min_size 1</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L121">121</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC121">    max_size 10</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L122">122</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC122">    step take crushroot.performanceblock.satahdd.1</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L123">123</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC123">    step chooseleaf firstn 0 type failure_domain</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L124">124</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC124">    step emit</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L125">125</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC125">}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L126">126</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC126">rule sata2 {</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L127">127</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC127">    ruleset 1</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L128">128</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC128">    type replicated</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L129">129</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC129">    min_size 1</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L130">130</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC130">    max_size 10</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L131">131</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC131">    step take crushroot.object.satahdd.2</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L132">132</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC132">    step chooseleaf firstn 0 type failure_domain</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L133">133</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC133">    step emit</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L134">134</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC134">}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L135">135</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC135">rule ssd {</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L136">136</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC136">    ruleset 2</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L137">137</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC137">    type replicated</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L138">138</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC138">    min_size 1</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L139">139</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC139">    max_size 10</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L140">140</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC140">    step take crushroot.performanceblock.satassd.1</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L141">141</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC141">    step chooseleaf firstn 0 type failure_domain</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L142">142</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC142">    step emit</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L143">143</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC143">}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L144">144</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC144"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L145">145</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC145"></td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L146">146</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC146">#}</td>
-              </tr>
-              <tr class="blame-line">
-                <td class="line-age heat" data-heat="1"></td>
-                <td class="blob-num blame-blob-num js-line-number" id="L147">147</td>
-                <td class="blob-code blob-code-inner js-file-line" id="LC147"># end crush map</td>
-              </tr>
-          </tbody>
-      </table>
-    </div>
-
-  </div>
-
-
-  </div>
-  <div class="modal-backdrop js-touch-events"></div>
-</div>
-
-    </div>
-  </div>
-
-  </div>
-
-      
-<div class="container-lg site-footer-container">
-  <div class="site-footer " role="contentinfo">
-    <ul class="site-footer-links float-right">
-        <li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact GitHub</a></li>
-      <li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
-      <li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
-      <li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
-        <li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
-        <li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
-
-    </ul>
-
-    <a href="https://github.com" aria-label="Homepage" class="site-footer-mark" title="GitHub">
-      <svg aria-hidden="true" class="octicon octicon-mark-github" height="24" version="1.1" viewBox="0 0 16 16" width="24"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
-</a>
-    <ul class="site-footer-links">
-      <li>&copy; 2017 <span title="0.13262s from unicorn-4245809993-639bk">GitHub</span>, Inc.</li>
-        <li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
-        <li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
-        <li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
-        <li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
-        <li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li>
-    </ul>
-  </div>
-</div>
-
-
-
-  <div id="ajax-error-message" class="ajax-error-message flash flash-error">
-    <svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
-    <button type="button" class="flash-close js-flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
-      <svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
-    </button>
-    You can't perform that action at this time.
-  </div>
-
-
-    <script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/compat-91f98c37fc84eac24836eec2567e9912742094369a04c4eba6e3cd1fa18902d9.js"></script>
-    <script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/frameworks-3c52aa5c47be764905dd0729b16d07f243da59bad25dec8c886d4613398a0473.js"></script>
-    
-    <script async="async" crossorigin="anonymous" src="https://assets-cdn.github.com/assets/github-d71a98f4626bb020831979c8d8a2763893ada0ff746ae220e9254bc906a1beac.js"></script>
-    
-    
-    
-    
-  <div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner d-none">
-    <svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
-    <span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
-    <span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
-  </div>
-  <div class="facebox" id="facebox" style="display:none;">
-  <div class="facebox-popup">
-    <div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
-    </div>
-    <button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
-      <svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
-    </button>
-  </div>
-</div>
-
-
-  </body>
-</html>
-
+# rules
+{%- for rule_name, rule in _crush.get('rule', {}).iteritems() %}
+rule {{ rule_name }} {
+  {%- for opt_name, opt in rule.iteritems() %}
+    {%- if opt is iterable and opt is not string -%}
+    {%- for i in opt %}
+    {{ opt_name }} {{ i }}
+    {%- endfor %}
+    {%- else %}
+    {{ opt_name }} {{ opt }}
+    {%- endif %}
+  {%- endfor %}
+}
+{% endfor %}
+# end crush map
diff --git a/ceph/setup.sls b/ceph/setup.sls
index 2779974..7b7ca90 100644
--- a/ceph/setup.sls
+++ b/ceph/setup.sls
@@ -4,20 +4,10 @@
 include:
 - ceph.common
 
-{%- set osd_host = {} %}
-
-{%- for node_name, node_grains in salt['mine.get']('*', 'grains.items').iteritems() %}
-{%- if node_grains.ceph_osd_host_id is defined %}
-{%- do osd_host.update({node_name: {'host_id': node_grains.ceph_osd_host_id, 'osd_disk': node_grains.ceph_osd_disk}}) %}
-{%- endif %}
-{%- endfor %}
-
 /etc/ceph/crushmap:
   file.managed:
   - source: salt://ceph/files/crushmap
   - template: jinja
-  - defaults:
-      osd_host: {{ osd_host }}
 
 {%- for pool_name, pool in setup.pool.iteritems() %}