Changeset 2bb8b35 for fedd


Ignore:
Timestamp:
Mar 4, 2012 3:49:46 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, master
Children:
8cab4c2
Parents:
a11eda5
Message:

Additional logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    ra11eda5 r2bb8b35  
    16521652        to instantiate them and start it all up.
    16531653        """
     1654        self.log.info("New experiment call started for %s" % fid)
    16541655        req = req.get('NewRequestBody', None)
    16551656        if not req:
     
    16641665
    16651666        if not access_ok:
     1667            self.log.info("New experiment call for %s: Access denied" % fid)
    16661668            raise service_error(service_error.access, "New access denied",
    16671669                    proof=[proof])
     
    17131715            }
    17141716
     1717        self.log.info("New experiment call succeeded for %s" % fid)
    17151718        return rv
    17161719
     
    19761979        rv = None
    19771980        state = None
     1981        self.log.info("vtopo call started for %s" %  fid)
    19781982
    19791983        req = req.get('VtopoRequestBody', None)
     
    20092013        self.state_lock.release()
    20102014
    2011         if rv: return rv
     2015        if rv:
     2016            self.log.info("vtopo call completed for %s %s " % \
     2017                (key, fid))
     2018            return rv
    20122019        else:
    20132020            if state:
     2021                self.log.info("vtopo call completed for %s %s (Not ready)" % \
     2022                    (key, fid))
    20142023                raise service_error(service_error.partial,
    20152024                        "Not ready: %s" % state)
    20162025            else:
     2026                self.log.info("vtopo call completed for %s %s (No experiment)"\
     2027                        % (key, fid))
    20172028                raise service_error(service_error.req, "No such experiment")
    20182029
     
    20242035        state = None
    20252036
     2037        self.log.info("vis call started for %s" %  fid)
    20262038        req = req.get('VisRequestBody', None)
    20272039        if not req:
     
    20612073        self.state_lock.release()
    20622074
    2063         if rv: return rv
     2075        if rv:
     2076            self.log.info("vis call completed for %s %s " % \
     2077                (key, fid))
     2078            return rv
    20642079        else:
    20652080            if state:
     2081                self.log.info("vis call completed for %s %s (not ready)" % \
     2082                    (key, fid))
    20662083                raise service_error(service_error.partial,
    20672084                        "Not ready: %s" % state)
    20682085            else:
     2086                self.log.info("vis call completed for %s %s (no experiment)" % \
     2087                    (key, fid))
    20692088                raise service_error(service_error.req, "No such experiment")
    20702089
     
    21242143        """
    21252144
     2145        self.log.info("Create experiment call started for %s" % fid)
    21262146        req = req.get('CreateRequestBody', None)
    21272147        if req:
     
    22282248            # exceptions.  Failing at this point returns a fault to the remote
    22292249            # caller.
     2250
     2251            self.log.info("Create experiment call failed for %s %s: %s" %
     2252                    (eid, fid, e))
    22302253            self.clear_placeholder(eid, expid, tmpdir)
    22312254            raise e
     
    22602283                'proof': [ proof.to_dict() ] + proofs,
    22612284            }
     2285        self.log.info("Create experiment call succeeded for %s %s" % \
     2286                (eid, fid))
    22622287
    22632288        return rv
     
    23532378        rv = None
    23542379
     2380        self.log.info("Info call started for %s" %  fid)
    23552381        req = req.get('InfoRequestBody', None)
    23562382        if not req:
     
    23842410                if top is not None: top = top.clone()
    23852411        self.state_lock.release()
     2412        self.log.info("Gathered Info for %s %s" % (key, fid))
    23862413
    23872414        # If the legacy visualization and topology representations are
    23882415        # requested, calculate them and add them to the return.
    23892416        if legacy and rv is not None:
     2417            self.log.info("Generating legacy Info for %s %s" % (key, fid))
    23902418            if top is not None:
    23912419                vtopo = topdl.topology_to_vtopo(top)
     
    24012429                        rv['vis'] = vis
    24022430        if rv:
     2431            self.log.info("Info succeded for %s %s" % (key, fid))
    24032432            rv['proof'] = proof.to_dict()
    24042433            return rv
    2405         else:
     2434        else:
     2435            self.log.info("Info failed for %s %s: no experiment" % (key, fid))
    24062436            raise service_error(service_error.req, "No such experiment")
    24072437
     
    25412571        rv = { 'info': [ ], 'proof': [ ] }
    25422572
     2573        self.log.info("Multi Info call started for %s" %  fid)
    25432574        self.state_lock.acquire()
    25442575        for key in [ k for k in self.state.keys() if isinstance(k, fedid)]:
     
    25492580                    continue
    25502581                else:
     2582                    self.log.info("Multi Info call failed for %s: %s" %  \
     2583                            (e,fid))
    25512584                    self.state_lock.release()
    25522585                    raise e
     
    25582591                rv['proof'].append(proof.to_dict())
    25592592        self.state_lock.release()
     2593        self.log.info("Multi Info call succeeded for %s" %  fid)
    25602594        return rv
    25612595
     
    26782712        information
    26792713        """
     2714        self.log.info("Terminate experiment call started for %s" % fid)
    26802715        tbparams = { }
    26812716        req = req.get('TerminateRequestBody', None)
     
    27402775                self.remove_dirs("%s/%s" % (self.repodir, repo))
    27412776       
     2777            self.log.info("Terminate experiment succeeded for %s %s" % \
     2778                    (key, fid))
    27422779            return {
    27432780                    'experiment': exp ,
     
    27462783                    }
    27472784        else:
     2785            self.log.info("Terminate experiment failed for %s %s: no state" % \
     2786                    (key, fid))
    27482787            raise service_error(service_error.req, "No saved state")
    27492788
Note: See TracChangeset for help on using the changeset viewer.