From 7823d65bbba45c2774aa6e71c1b1bd775ca0ca69 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Thu, 22 Jan 2015 06:35:18 -0500 Subject: [PATCH] Use os-apply-config to create files under /etc/edeploy --- .../os-apply-config/etc/edeploy/compute.specs | 5 +++++ .../os-apply-config/etc/edeploy/control.specs | 5 +++++ .../os-apply-config/etc/edeploy/state | 1 + .../post-configure.d/99-restart-discovery | 22 ------------------- 4 files changed, 11 insertions(+), 22 deletions(-) create mode 100644 elements/ironic-discoverd/os-apply-config/etc/edeploy/compute.specs create mode 100644 elements/ironic-discoverd/os-apply-config/etc/edeploy/control.specs create mode 100644 elements/ironic-discoverd/os-apply-config/etc/edeploy/state diff --git a/elements/ironic-discoverd/os-apply-config/etc/edeploy/compute.specs b/elements/ironic-discoverd/os-apply-config/etc/edeploy/compute.specs new file mode 100644 index 000000000..107dd700d --- /dev/null +++ b/elements/ironic-discoverd/os-apply-config/etc/edeploy/compute.specs @@ -0,0 +1,5 @@ +[ + ('disk', '$disk', 'size', 'gt(4)'), + ('network', '$eth', 'ipv4', 'network(192.0.2.0/24)'), + ('memory', 'total', 'size', 'ge(4294967296)'), +] diff --git a/elements/ironic-discoverd/os-apply-config/etc/edeploy/control.specs b/elements/ironic-discoverd/os-apply-config/etc/edeploy/control.specs new file mode 100644 index 000000000..b4211f117 --- /dev/null +++ b/elements/ironic-discoverd/os-apply-config/etc/edeploy/control.specs @@ -0,0 +1,5 @@ +[ + ('disk', '$disk', 'size', 'gt(4)'), + ('network', '$eth', 'ipv4', 'network(192.0.2.0/24)'), + ('memory', 'total', 'size', 'ge(2147483648)'), +] diff --git a/elements/ironic-discoverd/os-apply-config/etc/edeploy/state b/elements/ironic-discoverd/os-apply-config/etc/edeploy/state new file mode 100644 index 000000000..8be77b94d --- /dev/null +++ b/elements/ironic-discoverd/os-apply-config/etc/edeploy/state @@ -0,0 +1 @@ +[('compute', '*'), ('control', '1')] diff --git a/elements/ironic-discoverd/os-refresh-config/post-configure.d/99-restart-discovery b/elements/ironic-discoverd/os-refresh-config/post-configure.d/99-restart-discovery index 6774052d7..151d59ae2 100755 --- a/elements/ironic-discoverd/os-refresh-config/post-configure.d/99-restart-discovery +++ b/elements/ironic-discoverd/os-refresh-config/post-configure.d/99-restart-discovery @@ -8,27 +8,5 @@ set -eux os-svc-enable -n openstack-ironic-discoverd-dnsmasq os-svc-enable -n openstack-ironic-discoverd -mkdir -p /etc/edeploy/ - -cat > /etc/edeploy/state < /etc/edeploy/compute.specs < /etc/edeploy/control.specs <