Detected corrupt RPM database, rebuilding

Oscar Koller 11 Reputation points Microsoft Employee
2022-09-26T06:46:33.743+00:00

With a custom image I get a "Detected corrupted RPM database, rebuilding..." error when starting up a node.
For the custom image I use OpenLogic HPC Centos 7.7 on which I ran yum update, that’s all.
I tried to use the custom image prior to running yum update and the error was not thrown.

I am using Cyclecloud version 8.2.2-1902

How can I prevent the corrupted RPM database?

Azure CycleCloud
Azure CycleCloud
A Microsoft tool for creating, managing, operating, and optimizing high-performance computing (HPC) and big compute clusters in Azure.
59 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Oscar Koller 11 Reputation points Microsoft Employee
    2022-10-04T06:58:06.607+00:00

    Hi @vipullag-MSFT ,

    Thanks for your answer. Additionally, I found following answer very helpful:

    "We started seeing corrupted RPM dbs with newer CentOS images, which can be detected and fixed following similar guidance as to here: https://www.tecmint.com/rebuild-corrupted-rpm-database-in-centos

    In short: if you get errors printed out with rpm -qa > /dev/null then it’s corrupt, and rpm -vv –rebuilddb should fix it. You could try running the first command when making your custom image, both before and after a yum upgrade, and see if the upgrade command takes it from “not corrupt” to “corrupt”. If it does, the easiest fix will probably just be to include that rebuild step after the upgrade."

    Thanks, Oscar

    2 people found this answer helpful.

  2. vipullag-MSFT 24,206 Reputation points Microsoft Employee
    2022-09-26T16:45:54.753+00:00

    @Oscar Koller

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    I checked with internal team on this, corrupted RPM is not related to Cyclecloud. This is something related to Centos. Usually a corrupt rpm database happens if the process (yum) crashes when it's doing a database write or sudden breakage etc.

    Cyclecloud detects an error in yum databases and will spend the time to rebuild it as needed (which is what you're seeing) based on the error you have shared.

    Hope this helps.
    If you need further help on this, tag me in a comment.
    If the suggested response helped you resolve your issue, please 'Accept as answer', so that it can help others in the community looking for help on similar topics.

    0 comments No comments