Ignore:
Timestamp:
Apr 23, 2010 5:35:28 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
2ee4226
Parents:
9a8cd92
Message:

This seems more robust in calling GetValue?. This was intermittently hanging, I think because of troubles with the SSL state in the caller object. Reinitializing it seems to help.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/emulab_access.py

    r9a8cd92 rd8442da  
    707707                            "Cannot export %s" % ep)
    708708
     709            # XXX
    709710            # Check for access to restricted nodes
    710711            if req.has_key('resources') and req['resources'].has_key('node'):
     
    721722                            "Access denied (nodetypes %s)" % \
    722723                            str(', ').join(inaccessible))
     724            # XXX
    723725
    724726            # These were passed around before, but now are hidden from users
     
    13171319                                (k[k.index('/')+1:], ename, proj, self.domain)
    13181320                        req = { 'name': k, 'value': value }
     1321                        self.log.debug("Setting %s to %s on %s" % \
     1322                                (k, value, surl))
    13191323                        call_SetValue(surl, req, cf)
    13201324                    else:
     
    13251329                    if surl and k:
    13261330                        req = { 'name': k, 'value': self.ssh_port }
     1331                        self.log.debug("Setting %s to %s on %s" % \
     1332                                (k, self.ssh_port, surl))
    13271333                        call_SetValue(surl, req, cf)
    13281334                    else:
     
    13481354                if name and key and store :
    13491355                    req = { 'name': key, 'wait': True }
    1350                     r = self.call_GetValue(store, req, cf)
     1356                    self.log.debug("Waiting for %s (%s) from %s" % \
     1357                            (name, key, store))
     1358                    call_GetValue = service_caller('GetValue')
     1359                    r = call_GetValue(store, req, cf)
    13511360                    r = r.get('GetValueResponseBody', None)
    13521361                    if r :
     
    13551364                            if v is not None:
    13561365                                if name == 'peer':
     1366                                    self.log.debug("Got peer %s" % v)
    13571367                                    c['peer'] = v
    13581368                                else:
     1369                                    self.log.debug("Got %s %s" % (name, v))
    13591370                                    if c.has_key('fedAttr'):
    13601371                                        c['fedAttr'].append({
     
    14521463                if a['attribute'] in configs:
    14531464                    try:
     1465                        self.log.debug("Retrieving %s from %s" % \
     1466                                (a['attribute'], a['value']))
    14541467                        get_url(a['value'], certfile, tmpdir)
    14551468                    except:
     
    14881501                            print >>tf, cert
    14891502                            tf.close()
     1503                            self.log.debug("Getting userconf info: %s" % u)
    14901504                            get_url(u, tn, tmpdir, "userconf")
     1505                            self.log.debug("Got userconf info: %s" % u)
    14911506                        except IOError, e:
    14921507                            raise service_error(service.error.internal,
Note: See TracChangeset for help on using the changeset viewer.