Esempio n. 1
0
 def __init__(self, nodes, fs, config_file, comps=None, **kwargs):
     CommonAction.__init__(self)
     self.nodes = nodes
     self.fs = fs
     self.config_file = config_file
     self._comps = comps
     self.dryrun = kwargs.get('dryrun', False)
Esempio n. 2
0
 def __init__(self, nodes, fs, config_file, comps=None, **kwargs):
     CommonAction.__init__(self)
     assert config_file is not None
     self.nodes = nodes
     self.fs = fs
     self.config_file = config_file
     self._comps = comps
     self.dryrun = kwargs.get('dryrun', False)
Esempio n. 3
0
 def ev_start(self, worker):
     CommonAction.ev_start(self, worker)
     name = os.path.basename(self.config_file)
     if len(self.nodes) > 8:
         msg = "Updating configuration file `%s' on %d servers" % \
                                                     (name, len(self.nodes))
     else:
         msg = "Updating configuration file `%s' on %s" % (name, self.nodes)
     self.fs.hdlr.log('info', msg)
Esempio n. 4
0
 def ev_start(self, worker):
     CommonAction.ev_start(self, worker)
     name = os.path.basename(self.config_file)
     if len(self.nodes) > 8:
         msg = "Updating configuration file `%s' on %d servers" % \
                                                     (name, len(self.nodes))
     else:
         msg = "Updating configuration file `%s' on %s" % (name, self.nodes)
     self.fs.hdlr.log('info', msg)
Esempio n. 5
0
    def ev_close(self, worker):
        """
        Check process termination status and set action status.
        """
        CommonAction.ev_close(self, worker)

        self.server.lustre_check()

        # Action timed out
        if worker.did_timeout():
            self.set_status(ACT_ERROR)

        # Action succeeded
        elif worker.retcode() == 0:
            self.set_status(ACT_OK)

        # Action failed
        else:
            self.set_status(ACT_ERROR)
Esempio n. 6
0
    def __init__(self, fs, action, nodes, debug, comps=None, **kwargs):

        CommonAction.__init__(self)

        self.progpath = os.path.abspath(sys.argv[0])
        self.fs = fs
        self.action = action
        self.nodes = nodes
        self.debug = debug

        self._comps = comps

        self.options = {}
        for optname in ('addopts', 'failover', 'mountdata', 'fanout',
                        'dryrun'):
            self.options[optname] = kwargs.get(optname)

        self._outputs = MsgTree()
        self._errpickle = MsgTree()
        self._silentnodes = NodeSet()  # Error nodes without output

        if self.fs.debug:
            print "FSProxyAction %s on %s" % (action, nodes)
Esempio n. 7
0
    def __init__(self, fs, action, nodes, debug, comps=None, addopts=None,
                 failover=None, mountdata=None):

        CommonAction.__init__(self)

        self.progpath = os.path.abspath(sys.argv[0])
        self.fs = fs
        self.action = action
        self.nodes = nodes
        self.debug = debug

        self._comps = comps

        self.addopts = addopts
        self.failover = failover
        self.mountdata = mountdata

        self._outputs = MsgTree()
        self._errpickle = MsgTree()
        self._silentnodes = NodeSet() # Error nodes without output

        if self.fs.debug:
            print "FSProxyAction %s on %s" % (action, nodes)
Esempio n. 8
0
 def __init__(self, command):
     CommonAction.__init__(self)
     self._command = command
Esempio n. 9
0
 def __init__(self, action, command):
     CommonAction.__init__(self)
     self._tune = action
     self._command = command
     self.dryrun = action.dryrun
Esempio n. 10
0
 def __init__(self, srv, **kwargs):
     CommonAction.__init__(self)
     self.dryrun = kwargs.get('dryrun', False)
     self.server = srv
Esempio n. 11
0
 def __init__(self, srv):
     CommonAction.__init__(self)
     self.server = srv
Esempio n. 12
0
 def __init__(self, action, command):
     CommonAction.__init__(self)
     self._tune = action
     self._command = command
     self.dryrun = action.dryrun
Esempio n. 13
0
 def __init__(self, srv, **kwargs):
     CommonAction.__init__(self)
     self.dryrun = kwargs.get('dryrun', False)
     self.server = srv
Esempio n. 14
0
 def __init__(self, nodes, fs, config_file, **kwargs):
     CommonAction.__init__(self)
     self.nodes = nodes
     self.fs = fs
     self.config_file = config_file
     self.dryrun = kwargs.get('dryrun', False)
Esempio n. 15
0
 def __init__(self, cmd, timeout=None):
     CommonAction.__init__(self)
     self.launched = False
     self.cmd = cmd
     self.timeout = timeout
Esempio n. 16
0
 def __init__(self, cmd, timeout=None):
     CommonAction.__init__(self)
     self.launched = False
     self.cmd = cmd
     self.timeout = timeout