diff --git a/dmlite-ciphers-cleanup.patch b/dmlite-ciphers-cleanup.patch new file mode 100644 index 0000000..174bf82 --- /dev/null +++ b/dmlite-ciphers-cleanup.patch @@ -0,0 +1,192 @@ +diff --git a/src/plugins/apache-httpd/etc/httpd/conf.d/zlcgdm-dav.conf.in b/src/plugins/apache-httpd/etc/httpd/conf.d/zlcgdm-dav.conf.in +index 971669c7..fc9b5cbe 100644 +--- a/src/plugins/apache-httpd/etc/httpd/conf.d/zlcgdm-dav.conf.in ++++ b/src/plugins/apache-httpd/etc/httpd/conf.d/zlcgdm-dav.conf.in +@@ -217,7 +217,7 @@ Listen 443 + + SSLEngine on + SSLProtocol all -SSLv2 -SSLv3 +- SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5:!RC4 ++ SSLCipherSuite HIGH:!aNULL:!MD5 + SSLHonorCipherOrder on + + # Certificates and CAs +diff --git a/src/plugins/dpm-dsi/etc/dpm-gsiftp.init b/src/plugins/dpm-dsi/etc/dpm-gsiftp.init +index fd4da237..02ebbc78 100755 +--- a/src/plugins/dpm-dsi/etc/dpm-gsiftp.init ++++ b/src/plugins/dpm-dsi/etc/dpm-gsiftp.init +@@ -21,7 +21,7 @@ export CSEC_MECH + FTPLOGFILE=/var/log/dpm-gsiftp/dpm-gsiftp.log + GLOBUS_TCP_PORT_RANGE="20000,25000" + export GLOBUS_TCP_PORT_RANGE +-GLOBUS_GSSAPI_CIPHERS='RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5:!RC4' ++GLOBUS_GSSAPI_CIPHERS='HIGH:!aNULL:!MD5' + export GLOBUS_GSSAPI_CIPHERS + + sysname=`uname -s` +diff --git a/src/plugins/dpm-dsi/etc/dpm-gsiftp.service b/src/plugins/dpm-dsi/etc/dpm-gsiftp.service +index 74287049..e9ee17e1 100644 +--- a/src/plugins/dpm-dsi/etc/dpm-gsiftp.service ++++ b/src/plugins/dpm-dsi/etc/dpm-gsiftp.service +@@ -15,7 +15,7 @@ Environment="FTPLOGFILE=/var/log/dpm-gsiftp/dpm-gsiftp.log" + Environment="GRIDFTPLOGFILE=/var/log/dpm-gsiftp/gridftp.log" + Environment="GLOBUS_TCP_PORT_RANGE=20000,25000" + Environment="GLOBUS_THREAD_MODEL=pthread" +-Environment="GLOBUS_GSSAPI_CIPHERS=RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5:!RC4" ++Environment="GLOBUS_GSSAPI_CIPHERS=HIGH:!aNULL:!MD5" + Environment="OPTIONS=-S -p 2811 -auth-level 0 -dsi dmlite:dome_checksum -disable-usage-stats" + EnvironmentFile=-/etc/sysconfig/dpm-gsiftp + EnvironmentFile=-/etc/sysconfig/globus +diff --git a/src/plugins/dpm-xrootd/etc/xrootd/xrootd-dpmdisk.cfg b/src/plugins/dpm-xrootd/etc/xrootd/xrootd-dpmdisk.cfg +index 626ac1f7..fa20e0f4 100644 +--- a/src/plugins/dpm-xrootd/etc/xrootd/xrootd-dpmdisk.cfg ++++ b/src/plugins/dpm-xrootd/etc/xrootd/xrootd-dpmdisk.cfg +@@ -54,7 +54,7 @@ if exec xrootd + #http.key /etc/grid-security/dpmmgr/dpmkey.pem + #http.cadir /etc/grid-security/certificates + #http.secretkey CHANGEMEkwpoMyfgthusgdbyyws6gxyzhntkLoh8jilwivnirtjki +-#http.cipherfilter RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5:!RC4 ++#http.cipherfilter HIGH:!aNULL:!MD5 + fi + + dpm.dmconf /etc/dmlite.conf +diff --git a/src/plugins/dpm-xrootd/etc/xrootd/xrootd-dpmredir.cfg b/src/plugins/dpm-xrootd/etc/xrootd/xrootd-dpmredir.cfg +index b85fb57c..118ce7e7 100644 +--- a/src/plugins/dpm-xrootd/etc/xrootd/xrootd-dpmredir.cfg ++++ b/src/plugins/dpm-xrootd/etc/xrootd/xrootd-dpmredir.cfg +@@ -58,7 +58,7 @@ dpm.xrdserverport 1095 + #http.key /etc/grid-security/dpmmgr/dpmkey.pem + #http.cadir /etc/grid-security/certificates + #http.secretkey CHANGEMEkwpoMyfgthusgdbyyws6gxyzhntkLoh8jilwivnirtjki +-#http.cipherfilter RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5:!RC4 ++#http.cipherfilter HIGH:!aNULL:!MD5 + fi + + # for any federations setup provide a reirect to federation handler +diff --git a/src/puppet/dmlite/manifests/dav/config.pp b/src/puppet/dmlite/manifests/dav/config.pp +index 94adea76..8bf7ad2f 100644 +--- a/src/puppet/dmlite/manifests/dav/config.pp ++++ b/src/puppet/dmlite/manifests/dav/config.pp +@@ -18,6 +18,7 @@ class dmlite::dav::config ( + $ssl_options = $dmlite::dav::ssl_options, + $ssl_protocol = $dmlite::dav::ssl_protocol, + $ssl_ciphersuite = $dmlite::dav::ssl_ciphersuite, ++ $ssl_cipherorder = $dmlite::dav::ssl_cipherorder, + $ssl_tpc_capath = $dmlite::dav::ssl_tpc_capath, + $ssl_tpc_crlpath = $dmlite::dav::ssl_tpc_crlpath, + $log_error = $dmlite::dav::log_error, +diff --git a/src/puppet/dmlite/manifests/dav/install.pp b/src/puppet/dmlite/manifests/dav/install.pp +index 112d1e83..6a59a06f 100644 +--- a/src/puppet/dmlite/manifests/dav/install.pp ++++ b/src/puppet/dmlite/manifests/dav/install.pp +@@ -19,6 +19,7 @@ class dmlite::dav::install ( + $ssl_options = $dmlite::dav::ssl_options, + $ssl_protocol = $dmlite::dav::ssl_protocol, + $ssl_ciphersuite = $dmlite::dav::ssl_ciphersuite, ++ $ssl_cipherorder = $dmlite::dav::ssl_cipherorder, + $log_error = $dmlite::dav::log_error, + $log_transfer = $dmlite::dav::log_transfer, + $log_level = $dmlite::dav::log_level, +diff --git a/src/puppet/dmlite/manifests/dav/lfc.pp b/src/puppet/dmlite/manifests/dav/lfc.pp +index eb813a4d..9f834531 100644 +--- a/src/puppet/dmlite/manifests/dav/lfc.pp ++++ b/src/puppet/dmlite/manifests/dav/lfc.pp +@@ -18,6 +18,7 @@ class dmlite::dav::lfc ( + $ssl_options = $dmlite::dav::ssl_options, + $ssl_protocol = $dmlite::dav::ssl_protocol, + $ssl_ciphersuite = $dmlite::dav::ssl_ciphersuite, ++ $ssl_cipherorder = $dmlite::dav::ssl_cipherorder, + $log_error = $dmlite::dav::log_error, + $log_transfer = $dmlite::dav::log_transfer, + $log_level = $dmlite::dav::log_level, +diff --git a/src/puppet/dmlite/manifests/dav/params.pp b/src/puppet/dmlite/manifests/dav/params.pp +index 15b3c449..bb7c8209 100644 +--- a/src/puppet/dmlite/manifests/dav/params.pp ++++ b/src/puppet/dmlite/manifests/dav/params.pp +@@ -18,7 +18,8 @@ class dmlite::dav::params ( + $ssl_key = hiera('dmlite::dav::params::ssl_key', '/etc/grid-security/hostkey.pem') + $ssl_capath = hiera('dmlite::dav::params::ssl_capath', '/etc/grid-security/certificates') + $ssl_protocol = hiera('dmlite::dav::params::ssl_protocol', 'all -SSLv2 -SSLv3') +- $ssl_ciphersuite = hiera('dmlite::dav::params::ssl_ciphersuite', 'RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5:!RC4') ++ $ssl_ciphersuite = hiera('dmlite::dav::params::ssl_ciphersuite', 'HIGH:!aNULL:!MD5') ++ $ssl_cipherorder = hiera('dmlite::dav::params::ssl_ciphersuite', 'on') + $ssl_options = hiera('dmlite::dav::params::ssl_options','+StdEnvVars') + $ssl_tpc_capath = hiera('dmlite::dav::params::ssl_tpc_capath', '/etc/grid-security/certificates') + $ssl_tpc_crlpath = hiera('dmlite::dav::params::ssl_tpc_crlpath', '/etc/grid-security/certificates') +diff --git a/src/puppet/dmlite/manifests/dav/service.pp b/src/puppet/dmlite/manifests/dav/service.pp +index 2d5a58c6..c8509314 100644 +--- a/src/puppet/dmlite/manifests/dav/service.pp ++++ b/src/puppet/dmlite/manifests/dav/service.pp +@@ -18,6 +18,7 @@ class dmlite::dav::service ( + $ssl_options = $dmlite::dav::ssl_options, + $ssl_protocol = $dmlite::dav::ssl_protocol, + $ssl_ciphersuite = $dmlite::dav::ssl_ciphersuite, ++ $ssl_cipherorder = $dmlite::dav::ssl_cipherorder, + $log_error = $dmlite::dav::log_error, + $log_transfer = $dmlite::dav::log_transfer, + $log_level = $dmlite::dav::log_level, +diff --git a/src/puppet/dmlite/manifests/xrootd.pp b/src/puppet/dmlite/manifests/xrootd.pp +index 5b848e75..22532077 100644 +--- a/src/puppet/dmlite/manifests/xrootd.pp ++++ b/src/puppet/dmlite/manifests/xrootd.pp +@@ -48,7 +48,7 @@ class dmlite::xrootd ( + Boolean $xrd_checksum_enabled = false, + String $xrd_checksum = 'max 100 adler32 md5 crc32', + String $dpm_xrd_packagename = 'dmlite-dpm-xrootd', +- String $dpm_xrdhttp_cipherlist = 'RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5:!RC4' ++ String $dpm_xrdhttp_cipherlist = 'HIGH:!aNULL:!MD5' + ) { + + Dmlite::Xrootd::Create_config <| |> ~> Class[xrootd::service] +diff --git a/src/puppet/dmlite/templates/dav/zlcgdm-dav.conf b/src/puppet/dmlite/templates/dav/zlcgdm-dav.conf +index 22fdd695..5b501c21 100644 +--- a/src/puppet/dmlite/templates/dav/zlcgdm-dav.conf ++++ b/src/puppet/dmlite/templates/dav/zlcgdm-dav.conf +@@ -270,7 +270,7 @@ Listen <%= @dav_https_port %> + SSLEngine on + SSLProtocol <%= @ssl_protocol %> + SSLCipherSuite <%= @ssl_ciphersuite %> +- SSLHonorCipherOrder on ++ SSLHonorCipherOrder <%= @ssl_cipherorder %> + + # Certificates and CAs + SSLCertificateFile <%= @ssl_cert %> +diff --git a/src/puppet/dmlite/templates/dav/zlcgdm-dav_hdfs.conf b/src/puppet/dmlite/templates/dav/zlcgdm-dav_hdfs.conf +index 810d0a34..ed96861f 100644 +--- a/src/puppet/dmlite/templates/dav/zlcgdm-dav_hdfs.conf ++++ b/src/puppet/dmlite/templates/dav/zlcgdm-dav_hdfs.conf +@@ -130,7 +130,7 @@ Listen <%= @dav_https_port %> + SSLEngine on + SSLProtocol <%= @ssl_protocol %> + SSLCipherSuite <%= @ssl_ciphersuite %> +- SSLHonorCipherOrder on ++ SSLHonorCipherOrder <%= @ssl_cipherorder %> + + # Certificates and CAs + SSLCertificateFile <%= @ssl_cert %> +diff --git a/src/puppet/dpm/manifests/params.pp b/src/puppet/dpm/manifests/params.pp +index 83b11f0f..de12ef06 100644 +--- a/src/puppet/dpm/manifests/params.pp ++++ b/src/puppet/dpm/manifests/params.pp +@@ -106,7 +106,7 @@ class dpm::params { + $xrootd_tls_cafile = hiera('dpm::params::xrootd_tls_cafile',undef) + $xrootd_tls_capath = hiera('dpm::params::xrootd_tls_capath',undef) + $xrootd_tls_caopts = hiera('dpm::params::xrootd_tls_caopts',undef) +- $xrootd_tls_ciphers = hiera('dpm::params::xrootd_tls_ciphers','RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5:!RC4') ++ $xrootd_tls_ciphers = hiera('dpm::params::xrootd_tls_ciphers','HIGH:!aNULL:!MD5') + $xrootd_tls_reuse = hiera('dpm::params::xrootd_tls_reuse',undef) + + $site_name = hiera('dpm::params::site_name',undef) +diff --git a/src/puppet/gridftp/manifests/params.pp b/src/puppet/gridftp/manifests/params.pp +index 4f390fb8..1f62cdc6 100644 +--- a/src/puppet/gridftp/manifests/params.pp ++++ b/src/puppet/gridftp/manifests/params.pp +@@ -80,7 +80,7 @@ class gridftp::params ( + $force_tls = hiera('gridftp::params::force_tls',1), + $globus_min_tls_protocol = hiera('gridftp::params::globus_min_tls_protocol',undef), + $globus_max_tls_protocol = hiera('gridftp::params::globus_max_tls_protocol',undef), +- $globus_ciphers = hiera('gridftp::params::globus_ciphers','RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5:!RC4'), ++ $globus_ciphers = hiera('gridftp::params::globus_ciphers','HIGH:!aNULL:!MD5'), + $globus_server_cipher_order = hiera('gridftp::params::globus_server_cipher_order',undef), + $globus_compatible_mic = hiera('gridftp::params::globus_compatible_mic',undef), + $service = hiera('gridftp::params::service','globus-gridftp-server'), diff --git a/dmlite-fix-star-accounting-command.patch b/dmlite-fix-star-accounting-command.patch new file mode 100644 index 0000000..0196de7 --- /dev/null +++ b/dmlite-fix-star-accounting-command.patch @@ -0,0 +1,103 @@ +diff --git a/shell/src/interpreter.py b/shell/src/interpreter.py +index 097a7d3b..97070161 100644 +--- a/shell/src/interpreter.py ++++ b/shell/src/interpreter.py +@@ -4185,7 +4185,7 @@ Examples: + ams_host = apelurl.hostname if apelurl.hostname else 'msg.argo.grnet.gr' + ams_port = apelurl.port if apelurl.port else 443 + ams_auth_port = int(apelurl.query[len('ams_auth_port='):]) if apelurl.query.startswith('ams_auth_port=') else 8443 +- publisher = StARPublisher(ams_host=ams_host, ams_port=ams_port, ams_auth_port=ams_auth_port, cert=self.interpreter.hostcert, key=self.interpreter.hostkey, capath=self.interpreter.capath) ++ publisher = star.StARPublisher(ams_host=ams_host, ams_port=ams_port, ams_auth_port=ams_auth_port, cert=self.interpreter.hostcert, key=self.interpreter.hostkey, capath=self.interpreter.capath) + pub = publisher.publish(data) + _log.debug("data published: %s", str(pub)) + else: +diff --git a/src/puppet/Puppetfile b/src/puppet/Puppetfile +index d91a85e4..d5b11a00 100644 +--- a/src/puppet/Puppetfile ++++ b/src/puppet/Puppetfile +@@ -7,9 +7,9 @@ mod 'puppetlabs/mysql', '10.4.0' + mod 'puppetlabs/stdlib', '6.3.0' + mod 'puppetlabs/translate', '2.2.0' + mod 'saz/memcached', '3.5.0' +-mod 'lcgdm/dpm','1.14.0' +-mod 'lcgdm/dmlite','1.14.0' +-mod 'lcgdm/lcgdm', '0.3.12' +-mod 'lcgdm/xrootd', '0.2.8' +-mod 'lcgdm/gridftp', '0.2.7' ++mod 'lcgdm/dpm','1.15.1' ++mod 'lcgdm/dmlite','1.15.1' ++mod 'lcgdm/lcgdm', '0.3.14' ++mod 'lcgdm/xrootd', '0.2.9' ++mod 'lcgdm/gridftp', '0.2.8' + mod 'lcgdm/voms', '0.3.3' +diff --git a/src/puppet/dmlite/manifests/accounting.pp b/src/puppet/dmlite/manifests/accounting.pp +index c479cc81..1c26ae5d 100644 +--- a/src/puppet/dmlite/manifests/accounting.pp ++++ b/src/puppet/dmlite/manifests/accounting.pp +@@ -33,11 +33,7 @@ class dmlite::accounting ( + } + + # do not break in case the new parameters are not defined +- if $dbuser == '' { +- $cron_content = inline_template('/usr/share/dmlite/StAR-accounting/star-accounting.py --reportgroups --nsconfig=<%= @nsconfig %> --site=<%= @site_name %> --ams-host=<%= @broker_host %> --ams-port=<%= @broker_port %> --ams-auth-port=<%= @broker_auth_port %> --cert=<%= @certificate %> --key=<%= @key %> --capath=<%= @capath %>') +- } else { +- $cron_content = inline_template('/usr/share/dmlite/StAR-accounting/star-accounting.py --reportgroups --dbhost=<%= @dbhost %> --dbuser=<%= @dbuser %> --dbpwd=<%= @dbpwd %> --nsdbname=<%= @nsdbname %> --dpmdbname=<%= @dpmdbname %> --site=<%= @site_name %> --ams-host=<%= @broker_host %> --ams-port=<%= @broker_port %> --ams-auth-port=<%= @broker_auth_port %> --cert=<%= @certificate %> --key=<%= @key %> --capath=<%= @capath %>') +- } ++ $cron_content = inline_template('/usr/bin/dmlite-shell --log-file=/var/log/dmlite-star.log -e \'accounting StAR site=<%= @site_name %> output=apel://<%= @broker_host %>:<%= @broker_port %>/?ams_auth_port=<%= @broker_auth_port %>\'') + + # remove legacy cron file + file {"/etc/cron.${cron_interval}/dmlite-StAR-accounting": +diff --git a/src/puppet/dmlite/metadata.json b/src/puppet/dmlite/metadata.json +index f3eee05c..d32461c1 100644 +--- a/src/puppet/dmlite/metadata.json ++++ b/src/puppet/dmlite/metadata.json +@@ -1,6 +1,6 @@ + { + "name": "lcgdm-dmlite", +- "version": "1.15.0", ++ "version": "1.15.1", + "author": "DPM", + "summary": "Package for managing dmlite plugins", + "license": "Apache-2.0", +@@ -22,7 +22,7 @@ + }, + { + "name": "lcgdm/lcgdm", +- "version_requirement": ">= 0.3.13" ++ "version_requirement": ">= 0.3.14" + }, + { + "name": "lcgdm/gridftp", +diff --git a/src/puppet/dpm/metadata.json b/src/puppet/dpm/metadata.json +index b7d603c6..ddab8b1c 100644 +--- a/src/puppet/dpm/metadata.json ++++ b/src/puppet/dpm/metadata.json +@@ -1,6 +1,6 @@ + { + "name": "lcgdm-dpm", +- "version": "1.15.0", ++ "version": "1.15.1", + "author": "LCGDM", + "summary": "Official DPM module", + "license": "Apache-2.0", +@@ -18,7 +18,7 @@ + }, + { + "name": "lcgdm/lcgdm", +- "version_requirement": ">= 0.3.13" ++ "version_requirement": ">= 0.3.14" + }, + { + "name": "lcgdm/xrootd", +diff --git a/src/puppet/lcgdm/metadata.json b/src/puppet/lcgdm/metadata.json +index 6b54e9da..53a53d5d 100644 +--- a/src/puppet/lcgdm/metadata.json ++++ b/src/puppet/lcgdm/metadata.json +@@ -1,6 +1,6 @@ + { + "name": "lcgdm-lcgdm", +- "version": "0.3.13", ++ "version": "0.3.14", + "author": "LCGDM", + "summary": "Package for managing lcgdm components", + "license": "Apache-2.0", diff --git a/dmlite-nlink-update.patch b/dmlite-nlink-update.patch new file mode 100644 index 0000000..8d3cc9a --- /dev/null +++ b/dmlite-nlink-update.patch @@ -0,0 +1,122 @@ +diff --git a/src/dome/DomeMysql_cns.cpp b/src/dome/DomeMysql_cns.cpp +index 975fb242..b1ecb3ac 100644 +--- a/src/dome/DomeMysql_cns.cpp ++++ b/src/dome/DomeMysql_cns.cpp +@@ -345,21 +345,17 @@ DmStatus DomeMySql::create(ExtendedStat& nf) + + // Increment the parent nlink + if (nf.parent > 0) { +- Statement nlinkStmt(*this->conn_, DomeMySql::cnsdb, "SELECT nlink FROM Cns_file_metadata WHERE fileid = ? FOR UPDATE"); +- nlinkStmt.bindParam(0, nf.parent); +- nlinkStmt.execute(); +- nlinkStmt.bindResult(0, &parentMeta.stat.st_nlink); +- nlinkStmt.fetch(); +- + Statement nlinkUpdateStmt(*this->conn_, DomeMySql::cnsdb, "UPDATE Cns_file_metadata\ +- SET nlink = ?, mtime = UNIX_TIMESTAMP(), ctime = UNIX_TIMESTAMP()\ ++ SET nlink = nlink + 1, mtime = UNIX_TIMESTAMP(), ctime = UNIX_TIMESTAMP()\ + WHERE fileid = ?"); +- +- parentMeta.stat.st_nlink++; +- nlinkUpdateStmt.bindParam(0, parentMeta.stat.st_nlink); +- nlinkUpdateStmt.bindParam(1, parentMeta.stat.st_ino); +- ++ nlinkUpdateStmt.bindParam(0, parentMeta.stat.st_ino); + nlinkUpdateStmt.execute(); ++ ++ Statement nlinkStmt(*this->conn_, DomeMySql::cnsdb, "SELECT nlink FROM Cns_file_metadata WHERE fileid = ?"); ++ nlinkStmt.bindParam(0, parentMeta.stat.st_ino); ++ nlinkStmt.execute(); ++ nlinkStmt.bindResult(0, &parentMeta.stat.st_nlink); ++ nlinkStmt.fetch(); + } + + // Closing the scope here makes sure that no local mysql-involving objects +@@ -611,51 +607,24 @@ DmStatus DomeMySql::move(ino_t inode, ino_t dest) + "Could not update the parent ino!"); + + // Reduce nlinks from old parent +- ExtendedStat oldParent; +- r= this->getStatbyFileid(oldParent, file.parent); +- if (!r.ok()) { +- Err("move", "trouble looking for fileid " << file.parent << " parent of fileid " << file.stat.st_ino); +- return r; +- } +- +- // FIXME: this complex code is not necessary and not atomic... just increment or decrement in place +- Statement oldNlinkStmt(*this->conn_, DomeMySql::cnsdb, "SELECT nlink FROM Cns_file_metadata WHERE fileid = ? FOR UPDATE"); +- oldNlinkStmt.bindParam(0, oldParent.stat.st_ino); +- oldNlinkStmt.execute(); +- oldNlinkStmt.bindResult(0, &oldParent.stat.st_nlink); +- oldNlinkStmt.fetch(); +- + Statement oldNlinkUpdateStmt(*this->conn_, DomeMySql::cnsdb, "UPDATE Cns_file_metadata\ +- SET nlink = ?, mtime = UNIX_TIMESTAMP(), ctime = UNIX_TIMESTAMP()\ ++ SET nlink = nlink - 1, mtime = UNIX_TIMESTAMP(), ctime = UNIX_TIMESTAMP()\ + WHERE fileid = ?"); +- +- oldParent.stat.st_nlink--; +- oldNlinkUpdateStmt.bindParam(0, oldParent.stat.st_nlink); +- oldNlinkUpdateStmt.bindParam(1, oldParent.stat.st_ino); +- ++ oldNlinkUpdateStmt.bindParam(0, file.parent); + if (oldNlinkUpdateStmt.execute() == 0) + throw DmException(DMLITE_SYSERR(DMLITE_INTERNAL_ERROR), + "Could not update the old parent nlink!"); + +- // Increment from new +- Statement newNlinkStmt(*this->conn_, DomeMySql::cnsdb, "SELECT nlink FROM Cns_file_metadata WHERE fileid = ? FOR UPDATE"); +- newNlinkStmt.bindParam(0, newParent.stat.st_ino); +- newNlinkStmt.execute(); +- newNlinkStmt.bindResult(0, &newParent.stat.st_nlink); +- newNlinkStmt.fetch(); +- + Statement newNlinkUpdateStmt(*this->conn_, DomeMySql::cnsdb, "UPDATE Cns_file_metadata\ +- SET nlink = ?, mtime = UNIX_TIMESTAMP(), ctime = UNIX_TIMESTAMP()\ ++ SET nlink = nlink + 1, mtime = UNIX_TIMESTAMP(), ctime = UNIX_TIMESTAMP()\ + WHERE fileid = ?"); +- +- newParent.stat.st_nlink++; +- newNlinkUpdateStmt.bindParam(0, newParent.stat.st_nlink); +- newNlinkUpdateStmt.bindParam(1, newParent.stat.st_ino); +- ++ newNlinkUpdateStmt.bindParam(0, newParent.stat.st_ino); + if (newNlinkUpdateStmt.execute() == 0) + throw DmException(DMLITE_SYSERR(DMLITE_INTERNAL_ERROR), + "Could not update the new parent nlink!"); + ++ // invalidate cache for updated metadata entries ++ // - done by calling function(?) + + trans.Commit(); + } +@@ -664,7 +633,7 @@ DmStatus DomeMySql::move(ino_t inode, ino_t dest) + } + + +- Log(Logger::Lvl1, domelogmask, domelogname, "Exiting. inode:" << inode << " dest:" << dest); ++ Log(Logger::Lvl3, domelogmask, domelogname, "Exiting. inode:" << inode << " dest:" << dest); + return DmStatus(); + } + +@@ -1651,18 +1620,10 @@ DmStatus DomeMySql::unlink(ino_t inode) + // Decrement parent nlink + Log(Logger::Lvl4, domelogmask, domelogname, "Fixing parent nlink. inode:" << inode << " parent: " << parent.stat.st_ino); + +- Statement nlinkStmt(*this->conn_, DomeMySql::cnsdb, "SELECT nlink FROM Cns_file_metadata WHERE fileid = ? FOR UPDATE"); +- nlinkStmt.bindParam(0, parent.stat.st_ino); +- nlinkStmt.execute(); +- nlinkStmt.bindResult(0, &parent.stat.st_nlink); +- nlinkStmt.fetch(); +- + Statement nlinkUpdate(*this->conn_, DomeMySql::cnsdb, "UPDATE Cns_file_metadata\ +- SET nlink = ?, mtime = UNIX_TIMESTAMP(), ctime = UNIX_TIMESTAMP()\ ++ SET nlink = nlink - 1, mtime = UNIX_TIMESTAMP(), ctime = UNIX_TIMESTAMP()\ + WHERE fileid = ?"); +- parent.stat.st_nlink--; +- nlinkUpdate.bindParam(0, parent.stat.st_nlink); +- nlinkUpdate.bindParam(1, parent.stat.st_ino); ++ nlinkUpdate.bindParam(0, parent.stat.st_ino); + nlinkUpdate.execute(); + + } diff --git a/dmlite.spec b/dmlite.spec index 84ac220..521f30a 100644 --- a/dmlite.spec +++ b/dmlite.spec @@ -104,7 +104,7 @@ Name: dmlite Version: 1.15.1 -Release: 1%{?dist}%{?_with_asan:.asan} +Release: 2%{?dist}%{?_with_asan:.asan} Summary: Lcgdm grid data management and storage framework Group: Applications/Internet License: ASL 2.0 @@ -120,6 +120,9 @@ Patch0: dmlite-python3.patch Patch1: dmlite-cmake3.patch Patch5: dmlite-xrootd4-revert.patch Patch10: dmlite-fix-dmlite-disk-conf.patch +Patch11: dmlite-fix-star-accounting-command.patch +Patch12: dmlite-nlink-update.patch +Patch20: dmlite-ciphers-cleanup.patch %if %{?fedora}%{!?fedora:0} >= 17 || %{?rhel}%{!?rhel:0} >= 7 BuildRequires: boost-devel >= 1.48.0 @@ -160,7 +163,9 @@ BuildRequires: openssl-devel BuildRequires: zlib-devel # Plugins require +%if %{?fedora}%{!?fedora:0} < 28 BuildRequires: libmemcached-devel +%endif %if %{?fedora}%{!?fedora:0} >= 28 || %{?rhel}%{!?rhel:0} >= 8 BuildRequires: mariadb-connector-c-devel %else @@ -848,6 +853,9 @@ This package provides the modules for the DPM configuration via puppet %patch5 -p1 %endif %patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch20 -p1 %build %global build_flags -DCMAKE_INSTALL_PREFIX=/ -DRUN_ONLY_STANDALONE_TESTS=ON -DOVERWRITE_CONFIGFILES=ON -DINSTALL_PFX_DOC=%{_pkgdocdir} @@ -1059,6 +1067,10 @@ install -p -d -m 755 %{buildroot}%{_localstatedir}/log/dpm-gsiftp %changelog +* Mon Aug 16 2021 Petr Vokac - 1.15.1-2 +- Ciphersuite cleanup and GridFTP compatibility with el8 +- StAR accouning bugfixes + * Fri Aug 06 2021 Jonathan Wakely - 1.15.1-1 - Rebuilt for Boost 1.76