Example #1
0
    def initialize_endpoints(self):
        super(Fio, self).initialize_endpoints()

        # Get the client_endpoints and set them up
        if self.client_endpoints is None:
            raise ValueError('No client_endpoints defined!')
        self.client_endpoints_object = client_endpoints_factory.get(self.cluster, self.client_endpoints)

        new_ep = False
        if not self.client_endpoints_object.get_initialized():
            self.client_endpoints_object.initialize()
            new_ep = True

        self.endpoint_type = self.client_endpoints_object.get_endpoint_type()
        self.endpoints_per_client = self.client_endpoints_object.get_endpoints_per_client()
        self.endpoints = self.client_endpoints_object.get_endpoints()

        # Error out if the aggregate fio size is going to be larger than the endpoint size
        aggregate_size = self.numjobs * self.procs_per_endpoint * self.size
        endpoint_size = self.client_endpoints_object.get_endpoint_size()
        if aggregate_size > endpoint_size:
            raise ValueError("Aggregate fio data size (%dKB) exceeds end_point size (%dKB)! Please check numjobs, procs_per_endpoint, and size settings." % (aggregate_size, endpoint_size))

        if self.endpoint_type == 'rbd' and self.ioengine != 'rbd':
            logger.warn('rbd endpoints must use the librbd fio engine! Setting ioengine=rbd')
            self.ioengine = 'rbd'
        if self.endpoint_type == 'rbd' and self.direct != '1':
            logger.warn('rbd endpoints must use O_DIRECT. Setting direct=1')
            self.direct = '1'

        # Prefill Data
        if new_ep and self.prefill:
            self.prefill_data()
Example #2
0
    def initialize_endpoints(self):
        super(Hsbench, self).initialize_endpoints()
        if self.client_endpoints == None:
            raise ValueError('No client_endpoints defined!')
        self.client_endpoints_object = client_endpoints_factory.get(self.cluster, self.client_endpoints)

        new_ep = False
        if not self.client_endpoints_object.get_initialized():
            self.client_endpoints_object.initialize()
            new_ep = True

        self.endpoint_type = self.client_endpoints_object.get_endpoint_type()
        self.endpoints_per_client = self.client_endpoints_object.get_endpoints_per_client()
        self.endpoints = self.client_endpoints_object.get_endpoints()