Photon reposync fails when executing agctl sync after Airgap migration
search cancel

Photon reposync fails when executing agctl sync after Airgap migration

book

Article ID: 385517

calendar_today

Updated On:

Products

VMware Telco Cloud Automation

Issue/Introduction

Executing  "agctl sync" to perform synchronization between remote repository and Airgap appliance fails. 

Environment

TCA 3.x

Cause

The issue occurs when photon repos source URL referring to the repo on the host itself. 

TASK [check sync photon updates result] ****************************************
changed: [localhost]

TASK [debug] *******************************************************************
ok: [localhost] => {
    "result.stdout_lines": [
        "{\"changed\": true, \"stdout\": \"Error(1661) : No data available\\nError: Failed to synchronize cache for repo 'VMware Photon Linux 3.0 (x86_64) Updates' from 'https:###################.home:8043/updates/photon-updates'\", \"stderr\": \"\", \"rc\": 0, \"cmd\": \"tdnf reposync -v --download-metadata --disablerepo=* --enablerepo=photon-updates --delete --download-path /photon-reps/updates 2>&1 > logs/reposync.log\", \"start\": \"2024-12-23 01:14:59.343314\", \"end\": \"2024-12-23 01:14:59.472986\", \"delta\": \"0:00:00.129672\", \"msg\": \"\", \"invocation\": {\"module_args\": {\"chdir\": \"/usr/local/airgap/\", \"_raw_params\": \"tdnf reposync -v --download-metadata --disablerepo=* --enablerepo=photon-updates --delete --download-path /photon-reps/updates 2>&1 > logs/reposync.log\", \"_uses_shell\": true, \"stdin_add_newline\": true, \"strip_empty_ends\": true, \"argv\": null, \"executable\": null, \"creates\": null, \"removes\": null, \"stdin\": null}}}"
    ]

Resolution

  1. Delete all repo files under "/etc/yum.repos.d/"  

      rm -f /etc/yum.repos.d/

  2. Copy repo files from "/usr/local/airgap/backup_repo.20241202052148" to "/etc/yum.repos.d/" and run "tdnf makecache" 

     cp /usr/local/airgap/backup_repo.20241202052148/* /etc/yum.repos.d/
     tdnf makecache 

  3. Identify the readyz values and change the photon reposync status to false in the below files.

    Files need to be changed: 
     
      "/photon-reps/readyz/index.yaml"

      "/photon-reps/readyz/templates/005Photon" yaml files

     "/photon-reps/readyz/3.2.0-24287523/005Photon" yaml files

  4. Rerun "agctl sync" to sync photon repos again