Add notes for 2024-03

This commit is contained in:
2024-03-04 10:02:14 +03:00
parent b60a58f56a
commit 5ff70af33b
149 changed files with 2398 additions and 1637 deletions

View File

@ -6,27 +6,41 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta property="og:title" content="February, 2024" />
<meta property="og:description" content="2024-02-05
<meta property="og:title" content="January, 2024" />
<meta property="og:description" content="2024-01-02
Delete duplicate metadata as described in my DSpace issue from last year: https://github.com/DSpace/DSpace/issues/8253
Lower case all the AGROVOC subjects on CGSpace
Work on preparation of new server for DSpace 7 migration
I&rsquo;m not quite sure what we need to do for the Handle server
For now I just ran the dspace make-handle-config script and diffed it with the one from DSpace 6
I sent the bundle to the Handle admins to make sure it&rsquo;s OK before we do the migration
Continue testing and debugging the cgspace-java-helpers on DSpace 7
Work on IFPRI ISNAR archive cleanup
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2024-01/" />
<meta property="article:published_time" content="2024-01-05T11:10:00+03:00" />
<meta property="article:modified_time" content="2024-02-29T09:41:44+03:00" />
<meta property="article:published_time" content="2024-01-02T10:08:00+03:00" />
<meta property="article:modified_time" content="2024-02-05T11:09:40+03:00" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="February, 2024"/>
<meta name="twitter:description" content="2024-02-05
<meta name="twitter:title" content="January, 2024"/>
<meta name="twitter:description" content="2024-01-02
Delete duplicate metadata as described in my DSpace issue from last year: https://github.com/DSpace/DSpace/issues/8253
Lower case all the AGROVOC subjects on CGSpace
Work on preparation of new server for DSpace 7 migration
I&rsquo;m not quite sure what we need to do for the Handle server
For now I just ran the dspace make-handle-config script and diffed it with the one from DSpace 6
I sent the bundle to the Handle admins to make sure it&rsquo;s OK before we do the migration
Continue testing and debugging the cgspace-java-helpers on DSpace 7
Work on IFPRI ISNAR archive cleanup
"/>
<meta name="generator" content="Hugo 0.123.6">
<meta name="generator" content="Hugo 0.123.7">
@ -34,11 +48,11 @@ Lower case all the AGROVOC subjects on CGSpace
{
"@context": "http://schema.org",
"@type": "BlogPosting",
"headline": "February, 2024",
"headline": "January, 2024",
"url": "https://alanorth.github.io/cgspace-notes/2024-01/",
"wordCount": "560",
"datePublished": "2024-01-05T11:10:00+03:00",
"dateModified": "2024-02-29T09:41:44+03:00",
"wordCount": "2215",
"datePublished": "2024-01-02T10:08:00+03:00",
"dateModified": "2024-02-05T11:09:40+03:00",
"author": {
"@type": "Person",
"name": "Alan Orth"
@ -51,7 +65,7 @@ Lower case all the AGROVOC subjects on CGSpace
<link rel="canonical" href="https://alanorth.github.io/cgspace-notes/2024-01/">
<title>February, 2024 | CGSpace Notes</title>
<title>January, 2024 | CGSpace Notes</title>
<!-- combined, minified CSS -->
@ -103,203 +117,148 @@ Lower case all the AGROVOC subjects on CGSpace
<article class="blog-post">
<header>
<h2 class="blog-post-title" dir="auto"><a href="https://alanorth.github.io/cgspace-notes/2024-01/">February, 2024</a></h2>
<h2 class="blog-post-title" dir="auto"><a href="https://alanorth.github.io/cgspace-notes/2024-01/">January, 2024</a></h2>
<p class="blog-post-meta">
<time datetime="2024-01-05T11:10:00+03:00">Fri Jan 05, 2024</time>
<time datetime="2024-01-02T10:08:00+03:00">Tue Jan 02, 2024</time>
in
<span class="fas fa-folder" aria-hidden="true"></span>&nbsp;<a href="/categories/notes/" rel="category tag">Notes</a>
</p>
</header>
<h2 id="2024-02-05">2024-02-05</h2>
<h2 id="2024-01-02">2024-01-02</h2>
<ul>
<li>Delete duplicate metadata as described in my DSpace issue from last year: <a href="https://github.com/DSpace/DSpace/issues/8253">https://github.com/DSpace/DSpace/issues/8253</a></li>
<li>Lower case all the AGROVOC subjects on CGSpace</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-sql" data-lang="sql"><span style="display:flex;"><span>dspace<span style="color:#f92672">=#</span> <span style="color:#66d9ef">BEGIN</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">BEGIN</span>
</span></span><span style="display:flex;"><span>dspace<span style="color:#f92672">=*#</span> <span style="color:#66d9ef">UPDATE</span> metadatavalue <span style="color:#66d9ef">SET</span> text_value<span style="color:#f92672">=</span><span style="color:#66d9ef">LOWER</span>(text_value) <span style="color:#66d9ef">WHERE</span> dspace_object_id <span style="color:#66d9ef">IN</span> (<span style="color:#66d9ef">SELECT</span> uuid <span style="color:#66d9ef">FROM</span> item) <span style="color:#66d9ef">AND</span> metadata_field_id<span style="color:#f92672">=</span><span style="color:#ae81ff">187</span> <span style="color:#66d9ef">AND</span> text_value <span style="color:#f92672">~</span> <span style="color:#e6db74">&#39;[[:upper:]]&#39;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">UPDATE</span> <span style="color:#ae81ff">180</span>
</span></span><span style="display:flex;"><span>dspace<span style="color:#f92672">=*#</span> <span style="color:#66d9ef">COMMIT</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">COMMIT</span>
</span></span></code></pre></div><h2 id="2024-02-06">2024-02-06</h2>
<li>Work on preparation of new server for DSpace 7 migration
<ul>
<li>Discuss IWMI using the CGSpace REST API for their new website</li>
<li>Export the IWMI community to extract their ORCID identifiers:</li>
<li>I&rsquo;m not quite sure what we need to do for the Handle server</li>
<li>For now I just ran the <code>dspace make-handle-config</code> script and diffed it with the one from DSpace 6</li>
<li>I sent the bundle to the Handle admins to make sure it&rsquo;s OK before we do the migration</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ dspace metadata-export -i 10568/16814 -f /tmp/iwmi.csv
</span></span><span style="display:flex;"><span>$ csvcut -c <span style="color:#e6db74">&#39;cg.creator.identifier,cg.creator.identifier[en_US]&#39;</span> ~/Downloads/2024-02-06-iwmi.csv <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> | grep -oE &#39;[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}&#39; \
</span></span><span style="display:flex;"><span> | sort -u \
</span></span><span style="display:flex;"><span> | tee /tmp/iwmi-orcids.txt \
</span></span><span style="display:flex;"><span> | wc -l
</span></span><span style="display:flex;"><span>353
</span></span><span style="display:flex;"><span>$ ./ilri/resolve_orcids.py -i /tmp/iwmi-orcids.txt -o /tmp/iwmi-orcids-names.csv -d
</li>
<li>Continue testing and debugging the cgspace-java-helpers on DSpace 7</li>
<li>Work on IFPRI ISNAR archive cleanup</li>
</ul>
<h2 id="2024-01-03">2024-01-03</h2>
<ul>
<li>I haven&rsquo;t heard from the Handle admins so I&rsquo;m preparing a backup solution using nginx streams</li>
<li>This seems to work in my simple tests (this must be outside the <code>http {}</code> block):</li>
</ul>
<pre tabindex="0"><code>stream {
upstream handle_tcp_9000 {
server 188.34.177.10:9000;
}
server {
listen 9000;
proxy_connect_timeout 1s;
proxy_timeout 3s;
proxy_pass handle_tcp_9000;
}
}
</code></pre><ul>
<li>Here I forwarded a test TCP port 9000 from one server to another and was able to retrieve a test HTML that was running on the target
<ul>
<li>I will have to do TCP and UDP on port 2641, and TCP/HTTP on port 8000.</li>
</ul>
</li>
<li>I did some more minor work on the IFPRI ISNAR archive
<ul>
<li>I got some PDFs from the UMN AgEcon search and fixed some metadata</li>
<li>Then I did some duplicate checking and found five items already on CGSpace</li>
</ul>
</li>
</ul>
<h2 id="2024-01-04">2024-01-04</h2>
<ul>
<li>Upload 692 items for the ISNAR archive to CGSpace: <a href="https://cgspace.cgiar.org/handle/10568/136192">https://cgspace.cgiar.org/handle/10568/136192</a></li>
<li>Help Peter proof and upload 252 items from the 2023 Gender conference to CGSpace</li>
<li>Meeting with IFPRI to discuss their migration to CGSpace
<ul>
<li>We agreed to add two new fields, one for IFPRI project and one for IFPRI publication ranking</li>
<li>Most likely we will use <code>cg.identifier.project</code> as a general field and consolidate other project fields there</li>
<li>Not sure which field to use for the publication rank&hellip;</li>
</ul>
</li>
</ul>
<h2 id="2024-01-05">2024-01-05</h2>
<ul>
<li>Proof and upload 51 items in bulk for IFPRI</li>
<li>I did a big cleanup of user groups in anticipation of complaints about slow workflow tasks etc in DSpace 7
<ul>
<li>I removed ILRI editors from all the dozens of CCAFS community and collection groups, and I should do the same for other CRPs since they are closed for two years now</li>
</ul>
</li>
</ul>
<h2 id="2024-01-06">2024-01-06</h2>
<ul>
<li>Migrate CGSpace to DSpace 7</li>
</ul>
<h2 id="2024-01-07">2024-01-07</h2>
<ul>
<li>High load on the server and UptimeRobot saying the frontend is flapping
<ul>
<li>I noticed tons of logs from pm2 in the systemd journal, so I disabled those in the systemd unit because they are available from pm2&rsquo;s log directory anyway</li>
<li>I also noticed the same for Solr, so I disabled stdout for that systemd unit as well</li>
</ul>
</li>
<li>I spent a lot of time bringing back the nginx rate limits we used in DSpace 6 and it seems to have helped</li>
<li>I see some client doing weird HEAD requests to search pages:</li>
</ul>
<pre tabindex="0"><code>47.76.35.19 - - [07/Jan/2024:00:00:02 +0100] &#34;HEAD /search/?f.accessRights=Open+Access%2Cequals&amp;f.actionArea=Resilient+Agrifood+Systems%2Cequals&amp;f.author=Burkart%2C+Stefan%2Cequals&amp;f.country=Kenya%2Cequals&amp;f.impactArea=Climate+adaptation+and+mitigation%2Cequals&amp;f.itemtype=Brief%2Cequals&amp;f.publisher=CGIAR+System+Organization%2Cequals&amp;f.region=Asia%2Cequals&amp;f.sdg=SDG+12+-+Responsible+consumption+and+production%2Cequals&amp;f.sponsorship=CGIAR+Trust+Fund%2Cequals&amp;f.subject=environmental+factors%2Cequals&amp;spc.page=1 HTTP/1.1&#34; 499 0 &#34;-&#34; &#34;Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.2504.63 Safari/537.36&#34;
</code></pre><ul>
<li>I will add their network blocks (AS45102) and regenerate my list of bot networks:</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ wget https://asn.ipinfo.app/api/text/list/AS16276 <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> https://asn.ipinfo.app/api/text/list/AS23576 \
</span></span><span style="display:flex;"><span> https://asn.ipinfo.app/api/text/list/AS24940 \
</span></span><span style="display:flex;"><span> https://asn.ipinfo.app/api/text/list/AS13238 \
</span></span><span style="display:flex;"><span> https://asn.ipinfo.app/api/text/list/AS14061 \
</span></span><span style="display:flex;"><span> https://asn.ipinfo.app/api/text/list/AS12876 \
</span></span><span style="display:flex;"><span> https://asn.ipinfo.app/api/text/list/AS55286 \
</span></span><span style="display:flex;"><span> https://asn.ipinfo.app/api/text/list/AS203020 \
</span></span><span style="display:flex;"><span> https://asn.ipinfo.app/api/text/list/AS204287 \
</span></span><span style="display:flex;"><span> https://asn.ipinfo.app/api/text/list/AS50245 \
</span></span><span style="display:flex;"><span> https://asn.ipinfo.app/api/text/list/AS6939 \
</span></span><span style="display:flex;"><span> https://asn.ipinfo.app/api/text/list/AS45102 \
</span></span><span style="display:flex;"><span> https://asn.ipinfo.app/api/text/list/AS21859
</span></span><span style="display:flex;"><span>$ cat AS* | sort | uniq | wc -l
</span></span><span style="display:flex;"><span>4897
</span></span><span style="display:flex;"><span>$ cat AS* | ~/go/bin/mapcidr -a &gt; /tmp/networks.txt
</span></span><span style="display:flex;"><span>$ wc -l /tmp/networks.txt
</span></span><span style="display:flex;"><span>2017 /tmp/networks.txt
</span></span></code></pre></div><ul>
<li>I noticed some similar looking names in our list so I clustered them in OpenRefine and manually checked a dozen or so to update our list</li>
<li>I&rsquo;m surprised to see the number of networks reduced from my current ones&hellip; hmmm.</li>
<li>I will also update my list of Bing networks:</li>
</ul>
<h2 id="2024-02-07">2024-02-07</h2>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ ./ilri/bing-networks-to-ips.sh
</span></span><span style="display:flex;"><span>$ ~/go/bin/mapcidr -a &lt; /tmp/bing-ips.txt &gt; /tmp/bing-networks.txt
</span></span><span style="display:flex;"><span>$ wc -l /tmp/bing-networks.txt
</span></span><span style="display:flex;"><span>250 /tmp/bing-networks.txt
</span></span></code></pre></div><h2 id="2024-01-08">2024-01-08</h2>
<ul>
<li>Maria asked me about the &ldquo;missing&rdquo; item from last week again
<ul>
<li>I can see it when I used the Admin search, but not in her workflow</li>
<li>It was submitted by TIP so I checked that user&rsquo;s workspace and found it there</li>
<li>After depositing, it went into the workflow so Maria should be able to see it now</li>
<li>Export list of publishers for Peter to select some amount to use as a controlled vocabulary:</li>
</ul>
</li>
</ul>
<h2 id="2024-02-09">2024-02-09</h2>
<ul>
<li>Minor edits to CGSpace submission form</li>
<li>Upload 55 ISNAR book chapters to CGSpace from Peter</li>
</ul>
<h2 id="2024-02-19">2024-02-19</h2>
<ul>
<li>Looking into the collection mapping issue on CGSpace
<ul>
<li>It seems to be by design in DSpace 7: <a href="https://github.com/DSpace/dspace-angular/issues/1203">https://github.com/DSpace/dspace-angular/issues/1203</a></li>
<li>This is a massive setback for us&hellip;</li>
</ul>
</li>
</ul>
<h2 id="2024-02-20">2024-02-20</h2>
<ul>
<li>Minor work on OpenRXV to fix a bug in the ng-select drop downs</li>
<li>Minor work on the DSpace 7 nginx configuration to allow requesting robots.txt and sitemaps without hitting rate limits</li>
</ul>
<h2 id="2024-02-21">2024-02-21</h2>
<ul>
<li>Minor updates on OpenRXV, including one bug fix for missing mapped collections
<ul>
<li>Salem had to re-work the harvester for DSpace 7 since the mapped collections and parent collection list are separate!</li>
</ul>
</li>
</ul>
<h2 id="2024-02-22">2024-02-22</h2>
<ul>
<li>Discuss tagging of datasets and re-work the submission form to encourage use of DOI field for any item that has a DOI, and the normal URL field if not
<ul>
<li>The &ldquo;cg.identifier.dataurl&rdquo; field will be used for &ldquo;related&rdquo; datasets</li>
<li>I still have to check and move some metadata for existing datasets</li>
</ul>
</li>
</ul>
<h2 id="2024-02-23">2024-02-23</h2>
<ul>
<li>This morning Tomcat died due to an OOM kill from the kernel:</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>kernel: Out of memory: Killed process 698 (java) total-vm:14151300kB, anon-rss:9665812kB, file-rss:320kB, shmem-rss:0kB, UID:997 pgtables:20436kB oom_score_adj:0
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>localhost/dspace7= ☘ \COPY (SELECT DISTINCT text_value AS &#34;dcterms.publisher&#34;, count(*) FROM metadatavalue WHERE dspace_object_id in (SELECT dspace_object_id FROM item) AND metadata_field_id = 178 GROUP BY &#34;dcterms.publisher&#34; ORDER BY count DESC) to /tmp/2024-01-publishers.csv WITH CSV HEADER;
</span></span><span style="display:flex;"><span>COPY 4332
</span></span></code></pre></div><ul>
<li>I don&rsquo;t see any abnormal pattern in my Grafana graphs, for JVM or system load&hellip; very weird</li>
<li>I updated the submission form on CGSpace to include the new changes to URLs for datasets
<li>Address some feedback on DSpace 7 from users, including fileing some issues on GitHub
<ul>
<li>I also updated about 80 datasets to move the URLs to the correct field</li>
<li><a href="https://github.com/DSpace/dspace-angular/issues/2730">https://github.com/DSpace/dspace-angular/issues/2730</a>: List of available metadata fields is truncated when adding new metadata in &ldquo;Edit Item&rdquo;</li>
</ul>
</li>
<li>The Alliance TIP team was having issues posting to one collection via the legacy DSpace 6 REST API
<ul>
<li>In the DSpace logs I see the same issue that they had last month:</li>
</ul>
</li>
</ul>
<h2 id="2024-02-25">2024-02-25</h2>
<pre tabindex="0"><code>ERROR unknown unknown org.dspace.rest.Resource @ Something get wrong. Aborting context in finally statement.
</code></pre><h2 id="2024-01-09">2024-01-09</h2>
<ul>
<li>This morning Tomcat died while I was doing a CSV export, with an OOM kill from the kernel:</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>kernel: Out of memory: Killed process 720768 (java) total-vm:14079976kB, anon-rss:9301684kB, file-rss:152kB, shmem-rss:0kB, UID:997 pgtables:19488kB oom_score_adj:0
</span></span></code></pre></div><ul>
<li>I don&rsquo;t know why this is happening so often recently&hellip;</li>
</ul>
<h2 id="2024-02-27">2024-02-27</h2>
<li>I restarted Tomcat to see if it helps the REST issue</li>
<li>After talking with Peter about publishers we decided to get a clean list of the top ~100 publishers and then make sure all CGIAR centers, Initiatives, and Impact Platforms are there as well
<ul>
<li>IFPRI sent me a list of authors to add to our list for now, until we can find a better way of doing it
<ul>
<li>I extracted the existing authors from our controlled vocabulary and combined them with IFPRI&rsquo;s:</li>
</ul>
</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ xmllint --xpath <span style="color:#e6db74">&#39;//node/isComposedBy/node()&#39;</span> dspace/config/controlled-vocabularies/dc-contributor-author.xml <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> | grep -oE &#39;label=&#34;.*&#34;&#39; \
</span></span><span style="display:flex;"><span> | sed -e &#39;s/label=&#34;//&#39; -e &#39;s/&#34;$//&#39; &gt; /tmp/authors
</span></span><span style="display:flex;"><span>$ cat /tmp/authors /tmp/ifpri-authors | sort -u &gt; /tmp/new-authors
</span></span></code></pre></div><h2 id="2024-02-28">2024-02-28</h2>
<ul>
<li>I figured out a way to add a new Angular component to handle all our relation fields</li>
</ul>
<h2 id="2024-02-29">2024-02-29</h2>
<ul>
<li>Clean up a bunch of metadata on CGSpace</li>
</ul>
<!-- raw HTML omitted -->
</article>
</div> <!-- /.blog-main -->
<aside class="col-sm-3 ml-auto blog-sidebar">
<section class="sidebar-module">
<h4>Recent Posts</h4>
<ol class="list-unstyled">
<li><a href="/cgspace-notes/2024-01/">February, 2024</a></li>
<li><a href="/cgspace-notes/2024-01/">January, 2024</a></li>
<li><a href="/cgspace-notes/2023-12/">December, 2023</a></li>
<li><a href="/cgspace-notes/2023-11/">November, 2023</a></li>
<li><a href="/cgspace-notes/2023-10/">October, 2023</a></li>
</ol>
</section>
<section class="sidebar-module">
<h4>Links</h4>
<ol class="list-unstyled">
<li><a href="https://cgspace.cgiar.org">CGSpace</a></li>
<li><a href="https://dspacetest.cgiar.org">DSpace Test</a></li>
<li><a href="https://github.com/ilri/DSpace">CGSpace @ GitHub</a></li>
</ol>
</section>
</aside>
</div> <!-- /.row -->
</div> <!-- /.container -->
<footer class="blog-footer">
<p dir="auto">
Blog template created by <a href="https://twitter.com/mdo">@mdo</a>, ported to Hugo by <a href='https://twitter.com/mralanorth'>@mralanorth</a>.
</p>
<p>
<a href="#">Back to top</a>
</p>
</footer>
</body>
</html>
tadata values:</li>
<li>I exported a list from PostgreSQL and then filtered by count &gt; 40 in OpenRefine and then extracted the metadata values:</li>
</ul>
</li>
</ul>
@ -642,7 +601,9 @@ tadata values:</li>
<ol class="list-unstyled">
<li><a href="/cgspace-notes/2024-01/">February, 2024</a></li>
<li><a href="/cgspace-notes/2024-03/">March, 2024</a></li>
<li><a href="/cgspace-notes/2024-02/">February, 2024</a></li>
<li><a href="/cgspace-notes/2024-01/">January, 2024</a></li>
@ -650,8 +611,6 @@ tadata values:</li>
<li><a href="/cgspace-notes/2023-11/">November, 2023</a></li>
<li><a href="/cgspace-notes/2023-10/">October, 2023</a></li>
</ol>
</section>