cbcluster add-node Fails to Download Metadtata for repo 'Carbon Black'
search cancel

cbcluster add-node Fails to Download Metadtata for repo 'Carbon Black'

book

Article ID: 440462

calendar_today

Updated On:

Products

Carbon Black EDR

Issue/Introduction

When attempting to add a new node to a cluster, the operation fails when attempting to download the metadata from the depreciated repository. 

Errors during downloading metadata for repository 'CarbonBlack':
  - Curl error (6): Couldn't resolve host name for https://yum.distro.carbonblack.io/enterprise/stable/8/x86_64/repodata/repomd.xml

Error: Failed to download metadata for repo 'CarbonBlack'

Environment

  • Carbon Black EDR: All Versions
  • Cluster

Cause

The 'yum.distro.carbonblack' repository has been depreciated. 

Resolution

  1. Log into a terminal session on the primary EDR server. 
  2. Validate if the current repository is using packages.broadcom.com or yum.distro.carbonblack.com 
    grep -E 'packages.broadcom.com|yum.distro.carbonblack.io' /etc/yum.repos.d/CarbonBlack.repo
  3. If the repository is using yum.distro.carbonblack.com perform these steps first, else skip to step 4:
    1. Complete the repository authentication steps described in: Authenticate to Package Repository
    2. The product version downloaded should match the version installed on the primary EDR server. 
    3. After running the generate_server_repo.sh script, the new CarbonBlack.repo will be created. 
  4. Copy the gpg keys over to the new minion. 
    1. Via SCP, replacing the remote_host with the new minion server's address:
      grep 'gpgkey=' -A 1 /etc/yum.repos.d/CarbonBlack.repo | awk -F'///' '{print "/"$2}' | xargs -I {} sh -c 'scp {} root@remote_host:$(dirname {})'
    2. Via manual approach, the cb.asc and public.asc can be found in the downloaded installer package and placed on the Minion. The files will need to be in the same path as the primary is using.
      grep 'gpgkey=' -A 1 /etc/yum.repos.d/CarbonBlack.repo | awk -F'///' '{print "/"$2}'
  5. Attempt to add-node again from the primary.
    /usr/share/cb/cbcluster add-node

Additional Information

Example repository configuration:

[CarbonBlack]
name=CarbonBlack
baseurl=https://<user>:<token>@packages.broadcom.com/artifactory/carbonblack-edr/7.9.1-1/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=file:///root/cb.asc
       file:///root/public.asc
module_hotfixes=1

In the above example, the following files must exist on the node being added:

/root/cb.asc
/root/public.asc

During the `cbcluster add-node` operation:

  • The repository `.repo` file is automatically copied from the primary node to the node being added.
  • The referenced GPG key files are NOT automatically copied.