Skip to content
Snippets Groups Projects
Commit 981c404b authored by Eric Cano's avatar Eric Cano
Browse files

Merge remote-tracking branch 'origin/master' into 360-get-the-generic-queueing-into-master

parents 8b7426ff 724a1402
No related branches found
No related tags found
No related merge requests found
......@@ -185,20 +185,12 @@ RdbmsArchiveFileItorImpl::RdbmsArchiveFileItorImpl(
sql += "TAPE.TAPE_POOL_NAME = :TAPE_POOL_NAME";
}
// Only put an ORDER BY clause if there is at least one search criteria.
//
// If the whole contents of the ARCHIVE_FILE and TAPE_FILE tables are
// listed without a search criteria and with an ORDER BY clause then the
// first row back from the database will take a relatively long period of
// time to be returned. This is because the database will have to sort
// every row before returning the first. This long period of time will
// cause the current (non SSI) cta command-line tool to time out.
if(thereIsAtLeastOneSearchCriteria) {
if(searchCriteria.vid) {
sql += " ORDER BY FSEQ";
} else {
sql += " ORDER BY ARCHIVE_FILE_ID, COPY_NB";
}
// Order by FSEQ if we are listing the contents of a tape, else order by
// archive file ID
if(searchCriteria.vid) {
sql += " ORDER BY FSEQ";
} else {
sql += " ORDER BY ARCHIVE_FILE_ID, COPY_NB";
}
m_conn = connPool.getConn();
......
......@@ -145,3 +145,20 @@ kubectl --namespace ${NAMESPACE} exec ctacli -- cta-admin admin add --username c
kubectl --namespace=${NAMESPACE} exec kdc cat /root/ctaadmin2.keytab | kubectl --namespace=${NAMESPACE} exec -i client -- bash -c "cat > /root/ctaadmin2.keytab; mkdir -p /tmp/ctaadmin2"
kubectl --namespace=${NAMESPACE} exec kdc cat /root/poweruser1.keytab | kubectl --namespace=${NAMESPACE} exec -i client -- bash -c "cat > /root/poweruser1.keytab; mkdir -p /tmp/poweruser1"
###
# Filling services in DNS on all pods
###
# Generate hosts file for all defined services
TMP_HOSTS=$(mktemp)
KUBERNETES_DOMAIN_NAME='svc.cluster.local'
KUBEDNS_IP=$(kubectl -n kube-system get service kube-dns -o json | jq -r '.spec.clusterIP')
for service in $(kubectl --namespace=${NAMESPACE} get service -o json | jq -r '.items[].metadata.name'); do
service_IP=$(nslookup -timeout=1 ${service}.${NAMESPACE}.${KUBERNETES_DOMAIN_NAME} ${KUBEDNS_IP} | grep -A1 ${service}.${NAMESPACE} | grep Address | awk '{print $2}')
echo "${service_IP} ${service}.${NAMESPACE}.${KUBERNETES_DOMAIN_NAME} ${service}"
done > ${TMP_HOSTS}
# push to all Running containers removing already generated entries
kubectl -n ${NAMESPACE} get pods -o json | jq -r '.items[] | select(.status.phase=="Running") | {name: .metadata.name, containers: .spec.containers[].name} | {command: (.name + " -c " + .containers)}|to_entries[]|(.value)' | while read container; do
cat ${TMP_HOSTS} | grep -v $(echo ${container} | awk '{print $1}')| kubectl -n ${NAMESPACE} exec ${container} -i -- bash -c "cat >> /etc/hosts"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment