Rocks Cluster Node Installation Problem “Unable to read package metadata” Solved

When I installed the first compute node in my Rocks cluster, the installation went smoothly and I didn’t have any problems. However, I ran into a lot of problems when I installed the second node.

The installation always failed with this error message:

Unable to read package metadata.This may be due to a missing repodata directory. Please ensure that your install tree has been correctly generated. Cannot retrieve repository metadata (repomd.xml) for repository: anaconda-base-201404140147.x86_64. Please verify it’s path and try again.

I searched the Rocks mailing list and found some suggestions. One suggestion was to rebuild the repository.

cd /export/rocks/install
sudo rm -rf rocks-dist
sudo rocks create distro

I did it and restarted the installation. Unfortunately, this did not fix the problem. I could not find other solutions besides rebuilding the master node.

I then began to track down the problem by myself. My clue was that the node cannot retrieve repomd.xml. I found the file under /export/rocks/install/rocks-dist/x86_64/repodata and then found the problem when I tried to list the parent directory. Here is the output:

 

total 20
drwxr-xr-x 5 root root 4096 Jul 29 15:41 build
drwxrwx--- 3 root root 4096 Jul 29 15:41 force
drwxr-xr-x 2 root root 4096 Jul 29 15:42 images
drwxr-xr-x 4 root root 4096 Apr 14 04:26 RedHat
drwxrwx--- 2 root root 4096 Jul 29 15:42 repodata

Note that the force and repodata directories have different permissions than others had. In order for the computer node to retrieve the repomd.xml file, the permissions have to be fixed. I changed the permissions for these two folders and restarted the installation. The installation went past the point where it failed before. However, it failed again and complained about a different file. I checked the missing file and found that there were other directories with the same permission problem. I then used this command to fix all the permission problems.

sudo chmod -R o+r,o+x /export/rocks/install

 


This post may contain affiliated links. When you click on the link and purchase a product, we receive a small commision to keep us running. Thanks.