Permalink
Browse files

Create make_headnode_provisionable

  • Loading branch information...
1 parent fe81779 commit 9d846e98678e34bfd41263c6a6e709331b238b47 @ryancnelson committed Jul 18, 2014
Showing with 18 additions and 0 deletions.
  1. +18 −0 make_headnode_provisionable
@@ -0,0 +1,18 @@
+
+function hack_dapi_for_headnode_provisioning {
+
+ local cnapi_zone=$(vmadm lookup -1 alias=cnapi0)
+
+ # TODO: don't change if already done
+ echo "# Hack DAPI to allow headnode provisioning"
+ local config_path=/zones/$cnapi_zone/root/opt/smartdc/cnapi/sapi_manifests/cnapi/template
+
+ sed -e "
+ s:hard-filter-headnode:identity:g;
+ s:hard-filter-min-ram:identity:g;
+ s:hard-filter-min-disk:identity:g;
+ s:hard-filter-min-cpu:identity:g;
+ " $config_path >$config_path.new
+ mv $config_path.new $config_path
+ svcadm -z $cnapi_zone restart config-agent
+}

0 comments on commit 9d846e9

Please sign in to comment.