Chapter 3. Using Content Delivery Server Instances

The CDS Management screen is used to list, add, and delete Content Delivery Server (CDS) instances. From this screen, you can also access the CDS Repository Management screen, which allows you to view and change information for individual CDS instances.
To access the CDS Management screen, go to the Home screen and type c at the prompt.
rhui (home) => c 

------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Content Delivery Server (CDS) Management =-

   l   list all CDS clusters and instances managed by the RHUI
   i   display detailed information on a CDS cluster
   a   register (add) a new CDS instance
   m   move CDS(s) to a different cluster
   d   unregister (delete) a CDS instance from the RHUI
   s   associate a repository with a CDS cluster
   u   unassociate a repository from a CDS cluster

   logout
       removes stored authentication credentials and exits

   <   move to the previous screen
   ^      home, move to the home screen
   /      clear, clears the screen
   ?      help, display help
   q      quit, exit
      

                                                  Connected: rhua.example.com
------------------------------------------------------------------------------
rhui (cds) =>

Procedure 3.1. List CDS instances

  • From the CDS Management screen, type l at the prompt to list the CDS instances currently being managed by the Red Hat Update Infrastructure.
    rhui (cds) => l
    
    -= RHUI Content Delivery Servers =-
    
      new-york
      --------
        Content Deliver Servers
        -----------------------
        CDS01 New York
        CDS02 New York
    
      san-francisco
      -------------
        Content Deliver Servers
        -----------------------
        CDS01 San Francisco
        CDS02 San Francisco
    
    ------------------------------------------------------------------------------
    rhui (cds) =>
    

Procedure 3.2. View CDS Logs

  • To view the Pulp specific logs see the log file located at /var/log/pulp-cds/pulp.log
    To view the Grinder specific logs see the log file located at /var/log/pulp-cds/grinder.log
    To view the Gofer specific logs see the log file located at /var/log/gofer/agent.log

Procedure 3.3. Display a CDS Cluster

  1. From the CDS Management screen, type i at the prompt to display detailed information on a CDS cluster.
    rhui (cds) => i
    
    Select one or more CDS clusters:
    
      -  1 : new-york
      -  2 : san-francisco
    Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1
    
    Select one or more CDS clusters:
    
      x  1 : new-york
      -  2 : san-francisco
    Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: c
    
  2. Typing the number of a CDS cluster will place a checkmark next to your selection. Continue until all CDS clusters you wish to display to have been checked, then type c at the prompt to confirm.
  3. The detailed information of the selected CDS cluster will be displayed.
    -= RHUI CDS Clusters =-
    
      new-york
      --------
    
        CDS Instances
        -------------
        CDS01 New York
          hostname:        cds01-ny.domain.com
          client hostname: cds01-ny.domain.com
        CDS02 New York
          hostname:        cds02-ny.domain.com
          client hostname: cds02-ny.domain.com
    
        Repositories
        ------------
        Red Hat Update Infrastructure 2 (RPMs) (6Server-i386)
        Red Hat Update Infrastructure 2 (RPMs) (6Server-x86_64)
    
    
    ------------------------------------------------------------------------------
    rhui (cds) =>
    

Procedure 3.4. Add a CDS Instance

  1. From the CDS Management screen, type a at the prompt to add a new CDS instance.
    rhui (cds) => a
    

    Important

    Ensure that the CDS you are adding is configured and running. If the CDS is not running before you try to register it, the registration will fail.
  2. Enter the hostname of the CDS to be added. This must match the hostname configured on the CDS itself. You cannot use the IP address. If the hostname does not match exactly, the operation will fail.
    Hostname of the CDS to register:
    cds01-london.domain.com
    
    Client hostname (hostname clients will use to connect to the CDS) [cds01-london.domain.com]:
    cds01-london.client.domain.com
    

    Note

    If you are not sure what the hostname is, run the hostname command on the CDS instance to check.
  3. Enter a display name for the CDS. This name is used to identify the CDS within Red Hat Update Infrastructure Manager. Alternatively, leave the field blank to use the hostname as the display name.
    Display name for the CDS [cds01-london.domain.com]:
    CDS01 London
    
  4. Select an existing CDS cluster or Create a new CDS cluster.
    Select a CDS cluster or enter a new one:
      1  - *** Create a new cluster ***
      2  - new-york
      3  - san-francisco
    Enter value (1-3) or 'b' to abort: 1
    
    Enter a CDS cluster name:
    london
    
  5. The details of the new CDS will be displayed. Type y at the prompt to confirm the information and create the CDS:
    The following CDS instance will be registered:
      Hostname: cds01-london.domain.com
      Client Hostname: cds01-london.client.domain.com
      Name:     CDS01 London
      Cluster:  london
    Proceed? (y/n) y
    
    
    Successfully registered CDS01 London
    ------------------------------------------------------------------------------
    rhui (cds) => l
    

    Note

    If adding the CDS fails, check that the CDS daemon pulp-cds is running and that the firewall rules permit access between the Red Hat Update Appliance and the CDS.

Procedure 3.5. Move a CDS Instance

  1. From the CDS Management screen, type m at the prompt to move a CDS instance to a different CDS instance cluster.
    rhui (cds) => m
    
  2. A list of all CDS instances currently being managed by the Red Hat Update Infrastructure will be displayed. Select the CDS instances that you wish to move by typing the number of the CDS at the prompt. Typing the number of a CDS will place a checkmark next to the name of that CDS. Continue until all CDS instances you wish to delete have been checked, and then type c at the prompt to confirm.
    rhui (cds) => m
    Select one or more Content Delivery Servers to move to a different cluster:
      -  1 : CDS01 London
      -  2 : CDS01 New York
      -  3 : CDS01 San Francisco
      -  4 : CDS02 New York
      -  5 : CDS02 San Francisco
    Enter value (1-5) to toggle selection, 'c' to confirm selections, or '?' for more commands: 2
    
    Select one or more Content Delivery Servers to move to a different cluster:
      -  1 : CDS01 London
      x  2 : CDS01 New York
      -  3 : CDS01 San Francisco
      -  4 : CDS02 New York
      -  5 : CDS02 San Francisco
    Enter value (1-5) to toggle selection, 'c' to confirm selections, or '?' for more commands: c
    
    Select a cluster in which to move the CDS's:
      1  - *** Create a new cluster ***
      2  - london
      3  - new-york
      4  - san-francisco
    Enter value (1-4) or 'b' to abort: 4
    
  3. A list of the CDS instances to be moved will be displayed. Type y at the prompt to confirm the movement of the CDS instances.
    The following Content Delivery Servers will be moved to the san-francisco cluster:
    
      Content Delivery Servers
      ------------------------
      CDS01 New York
    
    Proceed? (y/n) y
    
    Moving CDS01 New York to the san-francisco cluster...
      ... successfully moved CDS
    
    ------------------------------------------------------------------------------
    rhui (cds) => l
    

Procedure 3.6. Delete a CDS Instance

Warning

When a CDS is deleted, all of the repositories and data will be lost. It is important that Red Hat Update Infrastructure Manager can access the CDS to ensure that content is no longer being hosted from the CDS instance before it is deleted.
  1. From the CDS Management screen, type d at the prompt to delete a CDS instance.
    rhui (cds) => d
    
  2. A list of all CDS instances currently being managed by the Red Hat Update Infrastructure will be displayed. Select which CDS instances to delete by typing the number of the CDS at the prompt. Typing the number of a CDS will place a checkmark next to the name of that CDS. Continue until all CDS instances you wish to delete have been checked, and then type c at the prompt to confirm.
    Select the CDS Cluster that contains the instance(s) to be removed from the RHUI: 
      1  - london
      2  - new-york
      3  - san-francisco
    Enter value (1-3) or 'b' to abort: 1
    
    Select the CDS instances from the london cluster to be removed from the RHUI:
      -  1 : CDS01 London
      -  2 : CDS02 London
    Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1
    
    Select the CDS instances from the london cluster to be removed from the RHUI:
      x  1 : CDS01 London
      -  2 : CDS02 London
    Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: c
    
  3. A list of the CDS instances to be deleted will be displayed. Type y at the prompt to confirm the selection and delete the CDS instances.
    The following CDS instances from the london cluster will be unregistered:
      CDS01 London
    Proceed? (y/n) y
    
    
    Unregistering CDS01 London...
    
    ------------------------------------------------------------------------------
    rhui (cds) => >
    
  4. Red Hat Update Infrastructure Manager contacts the CDS to ensure it is properly cleaned up when it is deleted. Red Hat Update Infrastructure Manager is unable to delete a CDS instance that it cannot communicate with. However, there are some cases where you might need to remove an unresponsive CDS instance.

    Important

    CDS instances exchange a secret with the Red Hat Update Appliance so that only the Red Hat Update Appliance is able to communicate with it. This secret is removed as part of the cleanup operation when a CDS is deleted normally. When a CDS instance is forcibly removed without being properly cleaned up, this secret is not deleted. You will not be able to register the CDS again until that secret has been removed. You can do this manually by deleting the /var/lib/pulp-cds/.gofer/secret file.
    When you attempt to perform a delete operation on a CDS instance that is not running, Red Hat Update Infrastructure Manager will notify you that it is unable to delete the CDS, and ask if you want to forcibly remove the CDS. Type y to forcibly remove the unresponsive CDS.

    Warning

    Be very careful with this command. If you delete a CDS instance that is not running, Red Hat Update Infrastructure Manager cannot confirm that the CDS instance is not hosting repositories that have previously been deployed.
    ------------------------------------------------------------------------------
    rhui (cds) => d
    
    Select the CDS instances to be removed from the RHUI: 
      -  1 : CDS 1
    Enter value (1-1) to toggle selection, 'c' to confirm selections, or '?' for
    more commands: 1
    
    Select the CDS instances to be removed from the RHUI: 
      x  1 : CDS 1
    Enter value (1-1) to toggle selection, 'c' to confirm selections, or '?' for
    more commands: c
    
    
    All previously deployed repositories will be deleted when a CDS is
    unregistered.
    
    The following CDS instances will be unregistered:
      CDS 1
    Proceed? (y/n) y
    
    
    Unregistering CDS 1...
    
    The following CDS instances could not be contacted to be unregistered.
    They may still be removed from the RHUI database, however the RHUI is unable
    confirm that they have stopped hosting repositories.
      CDS 1
    
    Forcibly remove these CDS instances? (y/n)y
    
    Forcibly unregistering CDS 1...
    

Procedure 3.7. Associate a Repository with a CDS Cluster

  1. From the CDS Management screen, type s at the prompt to associate a repository with a CDS cluster.
    rhui (cds) => s
    
    -= RHUI Content Delivery Server Clusters =-
    
    Select the CDS Cluster for repo association:
      1  - london
      2  - new-york
      3  - san-francisco
    Enter value (1-3) or 'b' to abort: 1
    
  2. A list of repositories currently being managed by the Red Hat Update Infrastructure will be displayed. Select which repositories to associate with the CDS cluster by typing the number of the repositories at the prompt. Typing the number of the repository will place a checkmark next to the name of the repository. Continue until all repositories have been checked, and then type c to confirm.
    Select one or more repositories to associate with the london cluster: 
    
      Custom Repositories
    
      Red Hat Repositories
        -  1 : Red Hat Storage 2 VSA Beta (RPMs) from RHUI (x86_64)
        -  2 : Red Hat Storage 2 VSA Beta (Source RPMs) from RHUI (x86_64)
        -  3 : Red Hat Update Infrastructure 2 (RPMs) (6Server-i386)
        -  4 : Red Hat Update Infrastructure 2 (RPMs) (6Server-x86_64)
        -  5 : Red Hat Update Infrastructure 2 (SRPMS) (6Server-i386)
        -  6 : Red Hat Update Infrastructure 2 (SRPMS) (6Server-x86_64)
    
    Enter value (1-6) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1-2
    
    Select one or more repositories to associate with the london cluster: 
    
      Custom Repositories
    
      Red Hat Repositories
        x  1 : Red Hat Storage 2 VSA Beta (RPMs) from RHUI (x86_64)
        x  2 : Red Hat Storage 2 VSA Beta (Source RPMs) from RHUI (x86_64)
        -  3 : Red Hat Update Infrastructure 2 (RPMs) (6Server-i386)
        -  4 : Red Hat Update Infrastructure 2 (RPMs) (6Server-x86_64)
        -  5 : Red Hat Update Infrastructure 2 (SRPMS) (6Server-i386)
        -  6 : Red Hat Update Infrastructure 2 (SRPMS) (6Server-x86_64)
    
    Enter value (1-6) to toggle selection, 'c' to confirm selections, or '?' for more commands: c
    
  3. The repositories for association will be displayed. Type y at the prompt to confirm the information and associate the selected repository with the selected the CDS cluster.
    The following repositories will be associated with the london cluster:
    
    Red Hat Repositories
      Red Hat Storage 2 VSA Beta (RPMs) from RHUI (x86_64)
      Red Hat Storage 2 VSA Beta (Source RPMs) from RHUI (x86_64)
    
    Proceed? (y/n) y
    
    Associating repository Red Hat Storage 2 VSA Beta (RPMs) from RHUI (x86_64)...
      ... successfully associated repository
    Associating repository Red Hat Storage 2 VSA Beta (Source RPMs) from RHUI (x86_64)...
      ... successfully associated repository
    
    Content will not be downloaded to the cluster until the next cluster sync is run.
    
    ------------------------------------------------------------------------------
    rhui (cds) =>
    

Procedure 3.8. Unassociate a Repository from a CDS Cluster

  1. From the CDS Management screen, type u at the prompt to unassociate a repository from a CDS cluster.
    rhui (cds) => u
    
    -= RHUI Content Delivery Server Clusters =-
    
    Select the CDS Cluster for repo unassociation:
      1  - london
      2  - new-york
      3  - san-francisco
    Enter value (1-3) or 'b' to abort: 1
    
  2. A list of repositories currently being managed by the Red Hat Update Infrastructure will be displayed. Select which repositories to unassociate from the CDS cluster by typing the number of the repositories at the prompt. Typing the number of the repository will place a checkmark next to the name of the repository. Continue until all repositories have been checked, and then type c to confirm.
    Select one or more repositories to unassociate from the london cluster: 
    
      Custom Repositories
    
      Red Hat Repositories
        -  1 : Red Hat Storage 2 VSA Beta (RPMs) from RHUI (x86_64)
        -  2 : Red Hat Storage 2 VSA Beta (Source RPMs) from RHUI (x86_64)
    
    Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: a
    
    Select one or more repositories to unassociate from the london cluster: 
    
      Custom Repositories
    
      Red Hat Repositories
        x  1 : Red Hat Storage 2 VSA Beta (RPMs) from RHUI (x86_64)
        x  2 : Red Hat Storage 2 VSA Beta (Source RPMs) from RHUI (x86_64)
    
    Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: c
    
  3. The repositories for unassociation will be displayed. Type y at the prompt to confirm the information and unassociate the selected repository from the selected the CDS cluster.
    The following repositories will be unassociated from the london cluster:
    
    Red Hat Repositories
      Red Hat Storage 2 VSA Beta (RPMs) from RHUI (x86_64)
      Red Hat Storage 2 VSA Beta (Source RPMs) from RHUI (x86_64)
    
    Proceed? (y/n) y
    
    Unassociating repository Red Hat Storage 2 VSA Beta (RPMs) from RHUI (x86_64)...
      ... successfully unassociated repository
    Unassociating repository Red Hat Storage 2 VSA Beta (Source RPMs) from RHUI (x86_64)...
      ... successfully unassociated repository
    
    ------------------------------------------------------------------------------
    rhui (cds) =>
    

    Note

    Content will only be deleted from the cluster when the next cluster sync is run.

Procedure 3.9. Add a New CDS Log

  1. Open etc/pulp/logging/cds.cfg in a text editor.

    Important

    Do not leave spaces between commas as this will cause problems with Python 2.4.
  2. Add a new entry to keys under [loggers] for the new log.
    [loggers]
    keys: root,pulp,gofer,grinder,qpid,newlog
    
  3. Add a new section under the other loggers that starts with loggers_ followed by the name of the new log.
    [logger_newlog]
    
  4. Set whether the log messages should only be handled by this log or passed to higher up loggers. Set propagate to 0 to prevent the messages from being passed higher up or to 1 to allow the messages to be passed higher up.
    propagate: 0
    
  5. Set the level. The level can be set to DEBUG, INFO, WARNING, ERROR, CRITICAL or NOTSET. NOTSET will log all messages.
    level: NOTSET
    
  6. Set the qualname. This is the module name in the Python file.
    qualname: pulp
    
  7. Select the handlers to be used.
    handlers: pulp_file,console
    
  8. Save and exit the file.