Commit 16030cfe authored by Maiken's avatar Maiken

Merge branch 'gridftp_without_ldap' into 'master'

Making it possible to submit to GridFTP resource without LDAP

See merge request nordugrid/arc!824
parents a1d6fd13 9917d7d7
......@@ -175,25 +175,27 @@ namespace Arc {
SubmissionStatus SubmitterPluginGRIDFTPJOB::Submit(const std::list<JobDescription>& jobdescs, const ExecutionTarget& et, EntityConsumer<Job>& jc, std::list<const JobDescription*>& notSubmitted) {
SubmissionStatus retval;
// gridftp and ldapng intterfaces are bound. So for submiting to
// to gridftp presence of ldapng is needed.
// This will not help against misbehaving information system
// because actual state of interface is not propagated to
// OtherEndpoints. But it should prevent submission to sites
// where ldapng is explicitly disabled.
bool ldapng_interface_present = false;
for (std::list< CountedPointer<ComputingEndpointAttributes> >::const_iterator it = et.OtherEndpoints.begin(); it != et.OtherEndpoints.end(); it++) {
if (((*it)->InterfaceName == "org.nordugrid.ldapng") &&
(((*it)->HealthState == "ok") || ((*it)->HealthState.empty()))) {
ldapng_interface_present = true;
break;
if(Arc::GetEnv("SUBMIT_GRIDFTP_WITHOUT_LDAP") != "1") {
// gridftp and ldapng interfaces are bound. So for submiting to
// to gridftp presence of ldapng is needed.
// This will not help against misbehaving information system
// because actual state of interface is not propagated to
// OtherEndpoints. But it should prevent submission to sites
// where ldapng is explicitly disabled.
bool ldapng_interface_present = false;
for (std::list< CountedPointer<ComputingEndpointAttributes> >::const_iterator it = et.OtherEndpoints.begin(); it != et.OtherEndpoints.end(); it++) {
if (((*it)->InterfaceName == "org.nordugrid.ldapng") &&
(((*it)->HealthState == "ok") || ((*it)->HealthState.empty()))) {
ldapng_interface_present = true;
break;
}
}
if(!ldapng_interface_present) {
logger.msg(INFO, "Submit: service has no suitable information interface - need org.nordugrid.ldapng");
retval |= SubmissionStatus::DESCRIPTION_NOT_SUBMITTED;
retval |= SubmissionStatus::NO_SERVICES;
return retval;
}
}
if(!ldapng_interface_present) {
logger.msg(INFO, "Submit: service has no suitable information interface - need org.nordugrid.ldapng");
retval |= SubmissionStatus::DESCRIPTION_NOT_SUBMITTED;
retval |= SubmissionStatus::NO_SERVICES;
return retval;
}
FTPControl ctrl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment