def _create_and_provision(self, reactor, name, retries=10):
        print "re-creating and re-trying node", name

        def create_attempt():
            # A list with a single Deferred must be returned as we are
            # requesting a single node.
            [d] = self.provisioner.create_nodes(
                reactor=reactor,
                names=[name],
                distribution=self.distribution,
                metadata=self.metadata,
            )

            def provision(node):
                d = self._provision_node(reactor, node)

                def provisioning_failed(failure):
                    # Destroy a node if we failed to provision it.
                    self._destroy_node(node)
                    return failure

                # Make sure to return the node.
                d.addCallbacks(lambda _: node, errback=provisioning_failed)
                return d

            d.addCallback(provision)

            # Log and discard a failure to keep looping.
            d.addErrback(write_failure)
            return d

        d = loop_until(reactor, create_attempt, repeat(0, retries))

        def error(failure):
            print "Failed to provision node {}".format(name)
            return failure

        d.addErrback(error)
        return d
N is the number of disks
dataset/ETHPy150Open ClusterHQ/flocker/admin/acceptance.py/LibcloudRunner._create_and_provision--crossover with--dataset/ETHPy150Open yuce/pyswip/examples/hanoi/hanoi.py/Tower.__init__