If you encounter problems when setting up the airgap server, you can use a troubleshooting topic to understand and solve the problem, if there is a workaround.

Error When Creating Repository

When using the createrepo command, you can encounter the following error message /path/to/repo/.repodata/ already exists!. This issue can occur in the build metadata of the Photon OS repository, after all the packages are synchronized to the local system. The createrepo command checks for a temp folder named .repodata under the repo folder. If there is an existing .repodata folder, the system assumes that the createrepo session is running and exits.

Workaround: Remove the .repodata folder and retry.
  1. View the ansible.log or upgrade_repo.log files for errors.
  2. View the folders that report errors. For example, if the error is found in /photon-reps/updates/photon-updates/.repodata/, list them in the parent folder:
    ls -lta /photon-reps/updates/photon-updates/
  3. Remove the existing .repodata folder and all the contents in it.
    rm -rf /photon-reps/updates/photon-updates/.repodata/
  4. Rerun the setup or upgrade process:
    ansible-playbook scripts/setup.yml > ansible.log 2>&1 &
    or
    ansible-playbook playbooks/setup-repo.yml 2>&1 > upgrade_repo.log &