enterprisemediawiki / meza

Setup an enterprise MediaWiki server with simple commands
MIT License
41 stars 27 forks source link

elastic-rebuild-all.sh fails silently #1263

Open jamesmontalvo3 opened 4 years ago

jamesmontalvo3 commented 4 years ago

elastic-rebuild-all.sh has a block like:

    # If the above command had a failing exit code
    if [[ $? -ne 0 ]]; then

        # FIXME #577 #681: add notification/warning system here
        echo "elastic-build-index FAILED for \"$wiki_id\" at $endtimestamp"

    # if the above command had a passing exit code (e.g. zero)
    else
        echo "elastic-build-index completed for \"$wiki_id\" at $endtimestamp"
    fi

In the failing condition, it should either exit 1 immediately or it should sum the number of failing wikis, then exit ${SUM} at the end. This will cause meza deploy ... to die on the failing command. Perhaps we don't actually want it to die, however, and instead it should log the failure and continue. That way we could identify the problem faster. Bonus points for printing good log info on failure.

Additionally, the command preceding the block above (bash "{{ m_deploy }}/elastic-build-index.sh") may also not be exiting with a failure.