<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:25:24 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>FOLIO Jira</title>
    <link>https://folio-org.atlassian.net</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>1001.0.0-SNAPSHOT</version>
        <build-number>100246</build-number>
        <build-date>07-02-2024</build-date>
    </build-info>

<item>
            <title>[FOLIO-3073] Health check for mod-password-validator is not working</title>
                <link>https://folio-org.atlassian.net/browse/FOLIO-3073</link>
                <project id="10290" key="FOLIO">FOLIO</project>
                    <description>&lt;p&gt;&lt;b&gt;Purpose/Overview:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;New health check has been added to mod-password-validator and configured in Jenkins build. The url is standard: &lt;tt&gt;/admin/health&lt;/tt&gt;. During the docker image build Jenkins job fails with:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;+ docker run -d --health-timeout=2s --health-retries=2 &apos;--health-cmd=curl -sS --fail -o /dev/null http://localhost:8081/admin/health || exit 1&apos; --cidfile mod-password-validator:2.0.1-SNAPSHOT.4-4.cid mod-password-validator:2.0.1-SNAPSHOT.4
5cfd75639076747dc6bab45f74f46cc4cf1a8674387ba7133213a657746756dd
[Pipeline] readFile
[Pipeline] sh
+ docker inspect 5cfd75639076747dc6bab45f74f46cc4cf1a8674387ba7133213a657746756dd
+ jq -r &apos;.[].State.Health.Status&apos;
[Pipeline] echo
Current Status: unhealthy
[Pipeline] sh
++ cat mod-password-validator:2.0.1-SNAPSHOT.4-4.cid
+ docker stop 5cfd75639076747dc6bab45f74f46cc4cf1a8674387ba7133213a657746756dd
5cfd75639076747dc6bab45f74f46cc4cf1a8674387ba7133213a657746756dd&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The health check endpoint has been verified locally:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;/rest/api/3/attachment/content/64376&quot; height=&quot;57&quot; width=&quot;601&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Failing Jenkins job: &lt;a href=&quot;https://jenkins-aws.indexdata.com/job/folio-org/job/mod-password-validator/job/MODPWD-59_Add_admin_healthcheck_endpoint/&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://jenkins-aws.indexdata.com/job/folio-org/job/mod-password-validator/job/MODPWD-59_Add_admin_healthcheck_endpoint/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="81985">FOLIO-3073</key>
            <summary>Health check for mod-password-validator is not working</summary>
                <type id="10003" iconUrl="https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium">Task</type>
                                            <priority id="10001" iconUrl="https://dev.folio.org/assets/jira-priority/jira-p2.svg">P2</priority>
                        <status id="6" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10003">Done</resolution>
                                                        <assignee accountid="5f9abc1eb45b2e007453f423">John Malconian</assignee>
                                                                <reporter accountid="557058:2002428d-c11e-48c4-98e0-a5b1104bd0b6">Dima Tkachenko</reporter>
                                    <labels>
                    </labels>
                <created>Wed, 10 Mar 2021 16:42:32 +0000</created>
                <updated>Wed, 24 Mar 2021 18:59:55 +0000</updated>
                            <resolved>Wed, 24 Mar 2021 09:21:53 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                <comments>
                                                            <comment id="196776" author="557058:2002428d-c11e-48c4-98e0-a5b1104bd0b6" created="Fri, 12 Mar 2021 14:44:21 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ab8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; class=&quot;user-hover&quot; rel=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; data-account-id=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; accountid=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; rel=&quot;noreferrer&quot;&gt;Jakub Skoczen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Could you prioritize this high in the backlog and take into the next sprint please?&lt;/p&gt;

&lt;p&gt;There are a couple of USs on our side that are blocked by the issue&lt;/p&gt;

&lt;p&gt;cc: &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=62a96ae7192edb006f9f1bf9&quot; class=&quot;user-hover&quot; rel=&quot;62a96ae7192edb006f9f1bf9&quot; data-account-id=&quot;62a96ae7192edb006f9f1bf9&quot; accountid=&quot;62a96ae7192edb006f9f1bf9&quot; rel=&quot;noreferrer&quot;&gt;Khalilah Gambrell&lt;/a&gt;&lt;/p&gt;</comment>
                                                            <comment id="196778" author="62a96ae7192edb006f9f1bf9" created="Wed, 17 Mar 2021 00:12:49 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ab8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; class=&quot;user-hover&quot; rel=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; data-account-id=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; accountid=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; rel=&quot;noreferrer&quot;&gt;Jakub Skoczen&lt;/a&gt;, any chance someone on the Devops team can take this on in this sprint or the next sprint. We are blocked by this story and we like to support this for the Iris release. &lt;/p&gt;

&lt;p&gt;cc: &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A003b2b3f-c9ac-4207-96eb-21cdb3765e26&quot; class=&quot;user-hover&quot; rel=&quot;557058:003b2b3f-c9ac-4207-96eb-21cdb3765e26&quot; data-account-id=&quot;557058:003b2b3f-c9ac-4207-96eb-21cdb3765e26&quot; accountid=&quot;557058:003b2b3f-c9ac-4207-96eb-21cdb3765e26&quot; rel=&quot;noreferrer&quot;&gt;Oleksii Petrenko&lt;/a&gt; and &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3A329e0f11-cc86-459e-a311-80d4eb134a7f&quot; class=&quot;user-hover&quot; rel=&quot;70121:329e0f11-cc86-459e-a311-80d4eb134a7f&quot; data-account-id=&quot;70121:329e0f11-cc86-459e-a311-80d4eb134a7f&quot; accountid=&quot;70121:329e0f11-cc86-459e-a311-80d4eb134a7f&quot; rel=&quot;noreferrer&quot;&gt;Sobha Duvvuri&lt;/a&gt;&lt;/p&gt;</comment>
                                                            <comment id="196781" author="5f9abc1eb45b2e007453f423" created="Mon, 22 Mar 2021 18:12:35 +0000"  >&lt;p&gt;I&apos;ve emulated the docker health check that Jenkins performs locally and it does fail as designed.   The container exits with an error almost immediately after launching it: &lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;
docker run -d --health-timeout=3s --health-retries=3 &apos;--health-cmd=curl -sS --fail -o /dev/null http://localhost:8081/admin/health || exit 1&apos; --cidfile mod-password-validator:2.0.1-SNAPSHOT.6-6.cid mod-password-validator:2.0.1-SNAPSHOT.6

./run-java.sh: /usr/verticles/run-env.sh: line 7: DB_HOST: parameter not set

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When the docker health check command is executed in CI, it does a simple check to see if the container has started and is running.  That&apos;s really it.  It doesn&apos;t evaluate the overall health of the application itself.    There are no external databases to connect to in the CI pipeline so DB_HOST wouldn&apos;t be set. &lt;/p&gt;

&lt;p&gt;There are a couple of things I question here:   &lt;/p&gt;

&lt;p&gt;1.  Should the container actually exit if an environment variable is not set?   Or should it run and just log that DB_HOST is not set.  Is this the way other storage modules are implemented? &lt;/p&gt;

&lt;p&gt;2.  If there is a suitable command line argument that can be passed to the container at runtime that will ignore any external database configuration,  you can set those command line arguments when running the health check by adding &apos;runArgs&apos; to the buildDocker parameters in the Jenkinsfile:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;
 buildDocker {
      publishMaster = &apos;yes&apos;
      healthChk = &apos;yes&apos;
      healthChkCmd = &apos;curl -sS --fail -o /dev/null http://localhost:8081/admin/health || exit 1&apos;
      runArgs = &apos;-DSomeSuitableCmdLineArguments&apos;
    }

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If this cannot be resolved with &apos;runArgs&apos; and you&apos;ve confirmed that the module&apos;s behavior &lt;b&gt;should&lt;/b&gt; be to exit with an error if DB_HOST is not set,  then the most expedient resolution is to disable this check in the Jenkinsfile.    &lt;/p&gt;

&lt;p&gt;Possibly compounding this issue is the question,  even if the container runs without DB_HOST or a database,  will the /admin/health endpoint still return a 2xx status code?   Is this endpoint designed to actually check the overall health of the application or just to check if it is running? &lt;/p&gt;

</comment>
                                                            <comment id="196784" author="557058:2002428d-c11e-48c4-98e0-a5b1104bd0b6" created="Tue, 23 Mar 2021 19:26:47 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=5f9abc1eb45b2e007453f423&quot; class=&quot;user-hover&quot; rel=&quot;5f9abc1eb45b2e007453f423&quot; data-account-id=&quot;5f9abc1eb45b2e007453f423&quot; accountid=&quot;5f9abc1eb45b2e007453f423&quot; rel=&quot;noreferrer&quot;&gt;John Malconian&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for providing the route cause of the issue. It wasn&apos;t obvious from Jenkins builds.&lt;/p&gt;

&lt;p&gt;I&apos;ve to check a couple of things before giving some feedback&lt;/p&gt;</comment>
                                                            <comment id="196787" author="557058:2002428d-c11e-48c4-98e0-a5b1104bd0b6" created="Wed, 24 Mar 2021 09:21:28 +0000"  >&lt;p&gt;update: I&apos;ve made some changes in the application settings and now the module starts even when DB is not available. Health checks has been tuned also and now it works for the aforementioned case&lt;/p&gt;

&lt;p&gt;Closing the ticket&lt;/p&gt;</comment>
                                                            <comment id="196789" author="5f9abc1eb45b2e007453f423" created="Wed, 24 Mar 2021 18:59:55 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A2002428d-c11e-48c4-98e0-a5b1104bd0b6&quot; class=&quot;user-hover&quot; rel=&quot;557058:2002428d-c11e-48c4-98e0-a5b1104bd0b6&quot; data-account-id=&quot;557058:2002428d-c11e-48c4-98e0-a5b1104bd0b6&quot; accountid=&quot;557058:2002428d-c11e-48c4-98e0-a5b1104bd0b6&quot; rel=&quot;noreferrer&quot;&gt;Dima Tkachenko&lt;/a&gt; Excellent news!  Thanks. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="75901">MODPWD-59</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="68906">MODQM-84</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="64376" name="image-2021-03-10-18-37-55-471.png" size="13067" author="557058:2002428d-c11e-48c4-98e0-a5b1104bd0b6" created="Wed, 10 Mar 2021 16:37:56 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummarycf">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10057" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Development Team</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10155"><![CDATA[FOLIO DevOps]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10063" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>PO Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10019" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02ftb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10020" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="954">DevOps Sprint 110</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10024" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>[CHART] Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 17 Mar 2021 00:12:49 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10025" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>[CHART] Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>