예제 #1
0
 def _getAndValidateConfig(self):
     config = nodepool_config.loadConfig(self._config_path)
     if self._secure_path:
         nodepool_config.loadSecureConfig(config, self._secure_path)
     if not config.zookeeper_servers.values():
         raise RuntimeError('No ZooKeeper servers specified in config.')
     if not config.imagesdir:
         raise RuntimeError('No images-dir specified in config.')
     return config
예제 #2
0
 def _getAndValidateConfig(self):
     config = nodepool_config.loadConfig(self._config_path)
     if self._secure_path:
         nodepool_config.loadSecureConfig(config, self._secure_path)
     if not config.zookeeper_servers.values():
         raise RuntimeError('No ZooKeeper servers specified in config.')
     if not config.imagesdir:
         raise RuntimeError('No images-dir specified in config.')
     return config
예제 #3
0
    def _reloadConfig(self):
        '''
        Reload the nodepool configuration file.
        '''
        new_config = nodepool_config.loadConfig(self._config_path)
        if self._secure_path:
            nodepool_config.loadSecureConfig(new_config, self._secure_path)
        if not self._config:
            self._config = new_config

        self._checkForZooKeeperChanges(new_config)
        provider_manager.ProviderManager.reconfigure(self._config, new_config,
                                                     use_taskmanager=False)
        self._config = new_config
예제 #4
0
    def _reloadConfig(self):
        '''
        Reload the nodepool configuration file.
        '''
        new_config = nodepool_config.loadConfig(self._config_path)
        if self._secure_path:
            nodepool_config.loadSecureConfig(new_config, self._secure_path)
        if not self._config:
            self._config = new_config

        self._checkForZooKeeperChanges(new_config)
        provider_manager.ProviderManager.reconfigure(self._config,
                                                     new_config,
                                                     use_taskmanager=False)
        self._config = new_config
예제 #5
0
    def _run(self):
        '''
        Body of run method for exception handling purposes.
        '''
        # NOTE: For the first iteration, we expect self._config to be None
        new_config = nodepool_config.loadConfig(self._config_path)
        if self._secure_path:
            nodepool_config.loadSecureConfig(new_config, self._secure_path)
        if not self._config:
            self._config = new_config

        self._checkForZooKeeperChanges(new_config)
        self._config = new_config

        self._checkForScheduledImageUpdates()
        self._checkForManualBuildRequest()
예제 #6
0
    def _run(self):
        '''
        Body of run method for exception handling purposes.
        '''
        new_config = nodepool_config.loadConfig(self._config_path)
        if self._secure_path:
            nodepool_config.loadSecureConfig(new_config, self._secure_path)
        if not self._config:
            self._config = new_config

        self._checkForZooKeeperChanges(new_config)
        provider_manager.ProviderManager.reconfigure(self._config, new_config,
                                                     use_taskmanager=False)
        self._config = new_config

        self._cleanup()
예제 #7
0
    def _run(self):
        '''
        Body of run method for exception handling purposes.
        '''
        # NOTE: For the first iteration, we expect self._config to be None
        new_config = nodepool_config.loadConfig(self._config_path)
        if self._secure_path:
            nodepool_config.loadSecureConfig(new_config, self._secure_path)
        if not self._config:
            self._config = new_config

        self._checkForZooKeeperChanges(new_config)
        self._config = new_config

        self._checkForScheduledImageUpdates()
        self._checkForManualBuildRequest()
예제 #8
0
    def _run(self):
        '''
        Body of run method for exception handling purposes.
        '''
        new_config = nodepool_config.loadConfig(self._config_path)
        if self._secure_path:
            nodepool_config.loadSecureConfig(new_config, self._secure_path)
        if not self._config:
            self._config = new_config

        self._checkForZooKeeperChanges(new_config)
        provider_manager.ProviderManager.reconfigure(self._config,
                                                     new_config,
                                                     use_taskmanager=False)
        self._config = new_config

        self._cleanup()
예제 #9
0
 def loadConfig(self):
     config = nodepool_config.loadConfig(self.configfile)
     if self.securefile:
         nodepool_config.loadSecureConfig(config, self.securefile)
     return config
예제 #10
0
 def loadConfig(self):
     config = nodepool_config.loadConfig(self.configfile)
     if self.securefile:
         nodepool_config.loadSecureConfig(config, self.securefile)
     return config