Пример #1
0
    def start(self):
        super(FpgaAgentManager, self).start()

        if os.path.isfile('/etc/sysinv/sysinv.conf'):
            LOG.info('sysinv-fpga-agent started')
        else:
            LOG.info('No config file for sysinv-fpga-agent found.')
            raise exception.ConfigNotFound(message="Unable to find sysinv config file!")

        # Wait for puppet to log in to the local docker registry
        wait_for_docker_login()

        # Trigger reset of N3000 FPGAs.  This is needed because the PCI address
        # changes on the first reset after boot.
        reset_n3000_fpgas()

        # Wait around until someone else updates the platform.conf file
        # with our host UUID.
        self.wait_for_host_uuid()

        context = ctx.get_admin_context()

        # Collect updated PCI device information for N3000 FPGAs
        # and send it to sysinv-conductor
        self.fpga_pci_update(context)

        # Collect FPGA inventory and report to conductor.
        self.report_fpga_inventory(context)
Пример #2
0
def init():
    global _POLICY_PATH
    global _POLICY_CACHE
    if not _POLICY_PATH:
        _POLICY_PATH = '/etc/patching/policy.json'
        if not os.path.exists(_POLICY_PATH):
            raise exception.ConfigNotFound(message='/etc/patching/policy.json')
    utils.read_cached_file(_POLICY_PATH, _POLICY_CACHE, reload_func=_set_rules)
Пример #3
0
def init():
    global _POLICY_PATH
    global _POLICY_CACHE
    if not _POLICY_PATH:
        _POLICY_PATH = CONF.policy_file
        if not os.path.exists(_POLICY_PATH):
            _POLICY_PATH = CONF.find_file(_POLICY_PATH)
        if not _POLICY_PATH:
            raise exception.ConfigNotFound(message=CONF.policy_file)
    utils.read_cached_file(_POLICY_PATH, _POLICY_CACHE, reload_func=_set_rules)