Harbor update fails with error “Error: Colocated job 'harbor-dns-aliases' is already added to the instance group 'harbor-app”
search cancel

Harbor update fails with error “Error: Colocated job 'harbor-dns-aliases' is already added to the instance group 'harbor-app”

book

Article ID: 316801

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:
  • When you try to do some changes in the Harbor tile and apply those changes from Ops Manager, it fails with an error similar to:
    Task 722 | 07:06:49 | Preparing deployment: Preparing deployment (00:00:00)
                       L Error: Colocated job 'harbor-dns-aliases' is already added to the instance group 'harbor-app'.
    Task 722 | 07:06:49 | Error: Colocated job 'harbor-dns-aliases' is already added to the instance group 'harbor-app'.

  • When you run bosh configs, you see multiple entries for Harbor, similar to the following:
    11  runtime  harbor-container-registry-3d639f06792cec4439f7-harbor-bosh-dns-aliases  -                                               2019-05-14 12:31:38 UTC
    8   runtime  harbor-container-registry-915ecb46dd86fe688aef-harbor-bosh-dns-aliases  -                                               2019-03-28 10:37:06 UTC


    Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.



Environment

VMware PKS 1.x

Cause

This issue occurs if you have multiple Harbor configurations, likely created during a time when the Harbor VM was not responsive.

Resolution

To resolve this issue, delete the duplicate configuration for Harbor.

  1. Identify the Harbor deployment ID by running the following command:

    ubuntu@opsmgr:~$ bosh deployments --column=name | grep harbor

    Note:  You will see output similar to the following:

    harbor-container-registry-3d639f06792cec4439f7

  2. Compare the noted Harbor deployment ID with bosh configs and identify the duplicate entry.

  3. Delete the duplicate harbor config by running a command similar to the following:

    ubuntu@opsmgr:~$ bosh delete-config --name harbor-container-registry-915ecb46dd86fe688aef-harbor-bosh-dns-aliases --type runtime

    Note: Replace harbor-container-registry-915ecb46dd86fe688aef-harbor-bosh-dns-aliases with the appropriate duplicate entry.

  4. Apply changes from Ops Manager to update/re-create the Harbor.