Skip to content

Commit 61b0c85

Browse files
committed
pom,ci: exclude srm client/server from build
Motivation: Time to move on Modification: Disable maven modules disable ci builds disable SRM s2 tests update webdav mave module to depend on space manager update dcache pool code to depend on ftp-client mover gridftp client int ftp-client submodule Result: less legacy code Acked-by: Target: master Require-book: yes Require-notes: yes
1 parent bebaeee commit 61b0c85

File tree

15 files changed

+1280
-181
lines changed

15 files changed

+1280
-181
lines changed

.ci/generate-changelog.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/bin/sh
22

33

4-
SRM_RPM_NAME=`ls modules/srm-client/target/rpmbuild/RPMS/noarch/ | grep dcache-srmclient`
5-
SRM_RPM_SUM=`md5sum modules/srm-client/target/rpmbuild/RPMS/noarch/$SRM_RPM_NAME | cut -d ' ' -f 1`
64
DEB_NAME=`ls packages/fhs/target/ | grep dcache`
75
DEB_SUM=`md5sum packages/fhs/target/$DEB_NAME | cut -d ' ' -f 1`
86
TAR_NAME=`ls packages/tar/target/ | grep dcache`
@@ -16,7 +14,6 @@ echo "|:-----------|:-----------|----------|"
1614
echo "| $RPM_NAME | $DATE | $RPM_SUM |"
1715
echo "| $DEB_NAME | $DATE | $DEB_SUM |"
1816
echo "| $TAR_NAME | $DATE | $TAR_SUM |"
19-
echo "| $SRM_RPM_NAME | $DATE | $SRM_RPM_SUM |"
2017

2118
echo ; echo; echo
22-
git log `git describe --tags --abbrev=0`...`git describe --tags --abbrev=0 HEAD^` --no-merges --format='[%h](https://github.com/dcache/dcache/commit/%H)%n: %s%n'
19+
git log `git describe --tags --abbrev=0`...`git describe --tags --abbrev=0 HEAD^` --no-merges --format='[%h](https://github.com/dcache/dcache/commit/%H)%n: %s%n'

.ci/generate-releases-xml.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/bin/sh
22

33

4-
SRM_RPM_NAME=`ls /home/marina/dcache/modules/srm-client/target/rpmbuild/RPMS/noarch/ | grep dcache-srmclient`
5-
SRM_RPM_SUM=`md5sum /home/marina/dcache/modules/srm-client/target/rpmbuild/RPMS/noarch/$SRM_RPM_NAME | cut -d ' ' -f 1`
64
DEB_NAME=`ls /home/marina/dcache/packages/fhs/target/ | grep dcache`
75
DEB_SUM=`md5sum /home/marina/dcache/packages/fhs/target/$DEB_NAME | cut -d ' ' -f 1`
86
TAR_NAME=`ls /home/marina/dcache/packages/tar/target/ | grep dcache`
@@ -16,7 +14,6 @@ echo "|:-----------|:-----------|----------|"
1614
echo "| $RPM_NAME | $DATE | $RPM_SUM |"
1715
echo "| $DEB_NAME | $DATE | $DEB_SUM |"
1816
echo "| $TAR_NAME | $DATE | $TAR_SUM |"
19-
echo "| $SRM_RPM_NAME | $DATE | $SRM_RPM_SUM |"
2017

2118
echo ; echo; echo
2219
git log `git describe --tags --abbrev=0`...`git describe --tags --abbrev=0 HEAD^` --no-merges --format='[%h](https://github.com/dcache/dcache/commit/%H)%n: %s%n'

.gitlab-ci.yml

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,6 @@ rpm:
133133
- "packages/fhs/target/rpmbuild/RPMS/noarch/dcache*.rpm"
134134
expire_in: 2 days
135135

136-
srm_client_rpm:
137-
stage: build
138-
image: dcache/maven-java21-rpm-build
139-
extends: .build_cache
140-
script:
141-
- mvn $MAVEN_CLI_OPTS -DskipTests -am -pl modules/srm-client package -P rpm
142-
artifacts:
143-
paths:
144-
- "modules/srm-client/target/rpmbuild/RPMS/noarch/dcache-srmclient*.rpm"
145-
expire_in: 2 days
146-
147136
deb:
148137
stage: build
149138
image: dcache/maven-java21-deb-build
@@ -247,22 +236,6 @@ sign_rpm:
247236
paths:
248237
- packages/fhs/target/rpmbuild/RPMS/noarch/dcache*.rpm
249238

250-
sign_srm_client_rpm:
251-
stage: sign
252-
image: almalinux:10-minimal
253-
needs: ["srm_client_rpm"]
254-
script:
255-
- microdnf install -y rpm-sign gpg
256-
- echo $DCACHE_ORG_PGP_KEY | base64 -d -i > secret.gpg
257-
- gpg --quiet --batch --yes --allow-secret-key-import --passphrase="$DCACHE_ORG_PGP_KEY_PASS" --import secret.gpg
258-
- gpg -a --export "$DCACHE_ORG_KEY_NAME" > RPM-GPG-KEY
259-
- rpmsign --addsign --define "_signature gpg" --define "_gpg_name $DCACHE_ORG_KEY_NAME" --define "_gpg_sign_cmd_extra_args --pinentry-mode loopback --passphrase $DCACHE_ORG_PGP_KEY_PASS" modules/srm-client/target/rpmbuild/RPMS/noarch/dcache-srmclient*.rpm
260-
- rpmkeys --import RPM-GPG-KEY
261-
- rpm --checksig -v modules/srm-client/target/rpmbuild/RPMS/noarch/dcache-srmclient*.rpm
262-
artifacts:
263-
paths:
264-
- modules/srm-client/target/rpmbuild/RPMS/noarch/dcache-srmclient*.rpm
265-
266239
sign_deb:
267240
stage: sign
268241
image: ubuntu:22.04
@@ -307,17 +280,6 @@ upload_rpm:
307280
- VERSION=`echo $RPM_NAME | cut -d'-' -f 2 | cut -d'.' -f 1,2`
308281
- curl $PKG_UPLOAD_OPTIONS -u $PKG_UPLOAD_USER:$PKG_UPLOAD_PASS --upload-file packages/fhs/target/rpmbuild/RPMS/noarch/$RPM_NAME "$PKG_UPLOAD_URL/$VERSION/$RPM_NAME"
309282

310-
upload_srm_client_rpm:
311-
stage: upload
312-
image: almalinux:10-minimal
313-
dependencies:
314-
- sign_srm_client_rpm
315-
extends: .upload_rules
316-
script:
317-
- RPM_NAME=`ls modules/srm-client/target/rpmbuild/RPMS/noarch/ | grep dcache-srmclient`
318-
- VERSION=`echo $RPM_NAME | cut -d'-' -f 3 | cut -d'.' -f 1,2`
319-
- curl $PKG_UPLOAD_OPTIONS -u $PKG_UPLOAD_USER:$PKG_UPLOAD_PASS --upload-file modules/srm-client/target/rpmbuild/RPMS/noarch/$RPM_NAME "$PKG_UPLOAD_URL/$VERSION/$RPM_NAME"
320-
321283
upload_deb:
322284
stage: upload
323285
image: almalinux:10-minimal
@@ -379,7 +341,6 @@ AI Generated Release Notes:
379341
dependencies:
380342
- sign_deb
381343
- sign_rpm
382-
- sign_srm_client_rpm
383344
- tar
384345
script:
385346
- microdnf install -y git-core
@@ -412,7 +373,6 @@ Release Notes Table:
412373
dependencies:
413374
- sign_deb
414375
- sign_rpm
415-
- sign_srm_client_rpm
416376
- tar
417377
script:
418378
- microdnf install -y git-core
@@ -548,7 +508,7 @@ Helm-Deploy Current dCache build:
548508
fi
549509
- helm repo add dcache ${DCACHE_HELM_REPO}
550510
- helm repo update
551-
- helm -n ${K8S_NAMESPACE} install ${HELM_OPTS} --wait --set image.tag=${tag} --set dcache.hsm.enabled=true --set dcache.qos.enabled=true --set image.registry=${CI_REGISTRY} --values .ci/custom-helm-config.yaml store dcache/dcache
511+
- helm -n ${K8S_NAMESPACE} install ${HELM_OPTS} --wait --set image.tag=${tag} --set dcache.hsm.enabled=true --set dcache.qos.enabled=true --set service.srm.enabled=false --set image.registry=${CI_REGISTRY} --values .ci/custom-helm-config.yaml store dcache/dcache
552512

553513
Helm-Deploy Latest dCache Golden Release:
554514
stage: test_deploy
@@ -576,24 +536,6 @@ Grid EL9 WN tests:
576536
junit:
577537
- "xunit*.xml"
578538

579-
SRM S2 test suite:
580-
stage: testing
581-
extends: .kubernetes_image
582-
allow_failure: true
583-
script:
584-
- kubectl -n $K8S_NAMESPACE apply -f .ci/s2-runner.yaml
585-
- while ! kubectl -n $K8S_NAMESPACE wait --for=condition=Ready pod s2-tester; do sleep 1; done
586-
- kubectl -n $K8S_NAMESPACE cp .ci/init-el9-ui.sh s2-tester:/init-el9-ui.sh
587-
- kubectl -n $K8S_NAMESPACE cp .ci/run-s2.sh s2-tester:/run-s2.sh
588-
- kubectl -n $K8S_NAMESPACE exec s2-tester -- /bin/sh /run-s2.sh
589-
- kubectl -n $K8S_NAMESPACE cp s2-tester:/TEST-basic.xml TEST-basic.xml
590-
- kubectl -n $K8S_NAMESPACE cp s2-tester:/TEST-avail.xml TEST-avail.xml
591-
- kubectl -n $K8S_NAMESPACE cp s2-tester:/TEST-usecase.xml TEST-usecase.xml
592-
artifacts:
593-
reports:
594-
junit:
595-
- "TEST*.xml"
596-
597539
Frontend test suite:
598540
stage: testing
599541
extends: .kubernetes_image

modules/dcache-webdav/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</dependency>
3131
<dependency>
3232
<groupId>org.dcache</groupId>
33-
<artifactId>dcache-srm</artifactId>
33+
<artifactId>dcache-spacemanager</artifactId>
3434
<version>${project.version}</version>
3535
</dependency>
3636
<dependency>

modules/dcache-webdav/src/main/java/org/dcache/webdav/transfer/CredentialServiceClient.java

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
import com.google.common.cache.Cache;
2424
import com.google.common.cache.CacheBuilder;
2525
import com.google.common.collect.ImmutableMap;
26-
import diskCacheV111.srm.CredentialServiceAnnouncement;
27-
import diskCacheV111.srm.CredentialServiceRequest;
28-
import diskCacheV111.srm.dcache.SrmRequestCredentialMessage;
2926
import diskCacheV111.util.CacheException;
3027
import dmg.cells.nucleus.CellAddressCore;
3128
import dmg.cells.nucleus.CellLifeCycleAware;
@@ -75,6 +72,7 @@
7572
/**
7673
* This class acts as a client to credential services.
7774
*/
75+
@Deprecated
7876
public class CredentialServiceClient
7977
implements CellMessageReceiver, CellLifeCycleAware {
8078

@@ -94,56 +92,14 @@ public void setTopicStub(CellStub topic) {
9492
this.topic = topic;
9593
}
9694

97-
@Override
98-
public void afterStart() {
99-
topic.notify(new CredentialServiceRequest());
100-
}
101-
102-
public void messageArrived(CredentialServiceAnnouncement message) {
103-
cache.put(message.getCellAddress(), message.getDelegationEndpoint());
104-
}
105-
10695
public Collection<URI> getDelegationEndpoints() {
10796
return cache.asMap().values();
10897
}
10998

11099
public X509Credential getDelegatedCredential(String dn, String primaryFqan,
111100
int minimumValidity, TimeUnit units) throws InterruptedException, ErrorResponseException {
112-
Instant deadline = Instant.now().plus(Duration.ofMillis(units.toMillis(minimumValidity)));
113-
114-
Optional<X509Credential> bestCredential = Optional.empty();
115-
Optional<Instant> bestExpiry = Optional.empty();
116-
for (CellAddressCore address : cache.asMap().keySet()) {
117-
CellPath path = new CellPath(address);
118-
SrmRequestCredentialMessage msg = new SrmRequestCredentialMessage(dn, primaryFqan);
119-
try {
120-
msg = topic.sendAndWait(path, msg);
121-
122-
if (msg.hasCredential()) {
123-
X509Credential credential = new KeyAndCertCredential(msg.getPrivateKey(),
124-
msg.getCertificateChain());
125-
Optional<Instant> expiry = X509Credentials.calculateExpiry(credential);
126-
127-
if (!bestExpiry.isPresent()
128-
|| (expiry.isPresent() && expiry.get().isAfter(bestExpiry.get()))) {
129-
bestExpiry = expiry;
130-
bestCredential = Optional.of(credential);
131-
}
132-
}
133-
} catch (CacheException | NoRouteToCellException e) {
134-
LOGGER.debug("failed to contact {} querying for {}, {}: {}",
135-
path, dn, primaryFqan, e.getMessage());
136-
} catch (KeyStoreException e) {
137-
LOGGER.warn("Received invalid key pair from {} for {}, {}: {}",
138-
path, dn, primaryFqan, e.getMessage());
139-
}
140-
}
141101

142-
if (bestExpiry.isPresent() && bestExpiry.get().isBefore(deadline)) {
143-
bestCredential = Optional.empty();
144-
}
145-
146-
return bestCredential.orElse(null);
102+
return null;
147103
}
148104

149105
public StaticOpenIdCredential getDelegatedCredential(String token,
@@ -227,16 +183,4 @@ private StaticOpenIdCredential createOidcCredential(String host,
227183
private String tokenEndPoint(String hostname) {
228184
return "https://" + hostname + "/token";
229185
}
230-
231-
private static long calculateRemainingLifetime(X509Certificate[] certificates) {
232-
long earliestExpiry = Long.MAX_VALUE;
233-
234-
for (X509Certificate certificate : certificates) {
235-
earliestExpiry = Math.min(earliestExpiry, certificate.getNotAfter().getTime());
236-
}
237-
238-
long now = System.currentTimeMillis();
239-
240-
return (earliestExpiry <= now) ? 0 : earliestExpiry - now;
241-
}
242186
}

modules/dcache/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@
8787
<artifactId>common-security</artifactId>
8888
<version>${project.version}</version>
8989
</dependency>
90-
<dependency>
91-
<groupId>org.dcache</groupId>
92-
<artifactId>srm-common</artifactId>
93-
<version>${project.version}</version>
94-
</dependency>
90+
<dependency>
91+
<groupId>org.dcache</groupId>
92+
<artifactId>ftp-client</artifactId>
93+
<version>${project.version}</version>
94+
</dependency>
9595
<dependency>
9696
<groupId>com.zaxxer</groupId>
9797
<artifactId>HikariCP</artifactId>

modules/dcache/src/main/aspect/org/dcache/util/aspects/JavaServiceDescSynchronizationAspect.aj

Lines changed: 0 additions & 19 deletions
This file was deleted.

modules/dcache/src/main/java/diskCacheV111/util/FileLocality.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
package diskCacheV111.util;
22

3-
import org.dcache.srm.v2_2.TFileLocality;
4-
53
public enum FileLocality {
6-
ONLINE(TFileLocality.ONLINE, true),
7-
NEARLINE(TFileLocality.NEARLINE, false),
8-
ONLINE_AND_NEARLINE(TFileLocality.ONLINE_AND_NEARLINE, true),
9-
LOST(TFileLocality.LOST, false),
10-
NONE(TFileLocality.NONE, false),
11-
UNAVAILABLE(TFileLocality.UNAVAILABLE, false);
4+
ONLINE(true),
5+
NEARLINE(false),
6+
ONLINE_AND_NEARLINE(true),
7+
LOST(false),
8+
NONE(false),
9+
UNAVAILABLE(false);
1210

13-
private final TFileLocality _locality;
1411
private final boolean _isCached;
1512

16-
FileLocality(TFileLocality locality, boolean cached) {
17-
_locality = locality;
13+
FileLocality(boolean cached) {
1814
_isCached = cached;
1915
}
2016

21-
public TFileLocality toTFileLocality() {
22-
return _locality;
23-
}
2417

2518
public boolean isCached() {
2619
return _isCached;

modules/dcache/src/main/java/org/dcache/space/ReservationCaches.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
9494
import org.dcache.cells.AbstractMessageCallback;
9595
import org.dcache.cells.CellStub;
9696
import org.dcache.namespace.FileAttribute;
97-
import org.dcache.srm.SRMException;
98-
import org.dcache.srm.SRMInternalErrorException;
9997
import org.dcache.util.CacheExceptionFactory;
10098
import org.dcache.vehicles.FileAttributes;
10199
import org.dcache.vehicles.PnfsGetFileAttributes;
@@ -164,13 +162,16 @@ public long[] load(GetSpaceTokensKey key) throws Exception {
164162
try {
165163
return spaceManager.sendAndWait(createRequest(key)).getSpaceTokens();
166164
} catch (TimeoutCacheException e) {
167-
throw new SRMInternalErrorException("Space manager timeout", e);
165+
// FIXME: a more specific exception required.
166+
throw new Exception("Space manager timeout", e);
168167
} catch (InterruptedException e) {
169-
throw new SRMInternalErrorException("Operation interrupted", e);
168+
// FIXME: a more specific exception required.
169+
throw new Exception("Operation interrupted", e);
170170
} catch (CacheException e) {
171171
LOGGER.warn("GetSpaceTokens failed with rc={} error={}", e.getRc(),
172172
e.getMessage());
173-
throw new SRMException("GetSpaceTokens failed with rc=" + e.getRc() +
173+
// FIXME: a more specific exception required.
174+
throw new Exception("GetSpaceTokens failed with rc=" + e.getRc() +
174175
" error=" + e.getMessage(), e);
175176
}
176177
}

0 commit comments

Comments
 (0)