Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-24668 The content source of a host is always set to nil or blank when CNAME of the satellite is used for registration purposes
  3. SAT-28947

[DEV] The content source of a host is always set to nil or blank when CNAME of the satellite is used for registration purposes

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • Hosts - Content
    • False
    • Hide

      None

      Show
      None
    • False
    • 0
    • Phoenix - Subscriptions
    • Sprint 141, Sprint 142

      Description of problem:

      Instead of the OS FQDN, If a CNAME is being used to setup the satellite, then after registering a host with the same satellite, The content source information of the host would always be nil or empty

      This happens due to the way installer is used i.e. the Primary Smart Proxy is still using OS FQDN instead of CNAME

      Version-Release number of selected component (if applicable):

      Satellite 6.14.3

      How reproducible:

      Always if the satellite is installed in the same way as the end-user

      And It is a regression from Sat 6.11

      Steps to Reproduce and Observations:

      1. Configure the /etc/hosts of satellite in this way i.e.

      1. cat /etc/hosts | grep satellite
        <IP of satellite> vm205-101.uatlab.lab.example.com satellite.uatlab.lab.example.com

      where OS\Network FQDN is vm205-101.uatlab.lab.example.com
      CNAME is satellite.uatlab.lab.example.com

      2. Install the satellite using the following installer command:

      1. satellite-installer --scenario=satellite \
        --foreman-initial-organization RedHat --foreman-initial-location GSS \
        --foreman-initial-admin-username admin --foreman-initial-admin-password RedHat1! \
        --certs-cname=satellite.uatlab.lab.example.com \
        --foreman-servername=satellite.uatlab.lab.example.com \
        --foreman-foreman-url=https://satellite.uatlab.lab.example.com \
        --foreman-unattended-url=https://satellite.uatlab.lab.example.com \
        --foreman-proxy-foreman-base-url=https://satellite.uatlab.lab.example.com \
        --foreman-proxy-template-url=http://satellite.uatlab.lab.example.com:8000 --foreman-plugin-tasks-automatic-cleanup=true \
        --enable-foreman-plugin-puppet --enable-foreman-cli-puppet --foreman-proxy-puppet=true --foreman-proxy-puppetca=true \
        --enable-puppet --puppet-server=true \
        --puppet-server-foreman-url=https://satellite.uatlab.lab.example.com \
        --puppet-server-foreman-ssl-ca /etc/pki/katello/puppet/puppet_client_ca.crt \
        --puppet-server-foreman-ssl-cert /etc/pki/katello/puppet/puppet_client.crt \
        --puppet-server-foreman-ssl-key /etc/pki/katello/puppet/puppet_client.key \
        --puppet-server-certname=satellite.uatlab.lab.example.com \
        --foreman-proxy-puppet-ssl-cert=/etc/puppetlabs/puppet/ssl/certs/satellite.uatlab.lab.example.com.pem \
        --foreman-proxy-puppet-ssl-key=/etc/puppetlabs/puppet/ssl/private_keys/satellite.uatlab.lab.example.com.pem \
        --foreman-proxy-puppet-url=https://satellite.uatlab.lab.example.com:8140 \
        --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-script \
        --foreman-proxy-tftp=true --foreman-proxy-dhcp=false --foreman-proxy-dns=false --tuning=development

      3. Check in /var/www/html/pub/katello-rhsm-consumer and the script is generated with CNAME

      1. cat /var/www/html/pub/katello-rhsm-consumer | grep ^KATELLO_SERVER
        KATELLO_SERVER=satellite.uatlab.lab.example.com
        KATELLO_SERVER_CA_CERT=katello-server-ca.pem

      4. Check "hammer capsule info --id 1" and the internal smart-proxy is created using OS FQDN

      1. hammer capsule list --fields Name,Url
        --------------------------------|---------------------------------------------
        NAME | URL
        --------------------------------|---------------------------------------------
        vm205-101.uatlab.lab.example.com | https://vm205-101.uatlab.lab.example.com:9090
        --------------------------------|---------------------------------------------

      3. Create an activation key in Satellite for registration purposes.

      4. Take a RHEL 8 client host [ dhcp130-238.gsslab.lab.example.com ] and register it with satellite manually i.e. using katello-ca-consumer and sub-man register process.

      1. cat /etc/hosts | grep satellite
        <IP of satellite> vm205-101.uatlab.lab.example.com satellite.uatlab.lab.example.com
      1. yum localinstall http://satellite.uatlab.lab.example.com/pub/katello-ca-consumer-latest.noarch.rpm
      1. subscription-manager register --org="RedHat" --activationkey="new"

      5. Come back to satellite and check hammer host info for the content source information:

      1. hammer host info --name dhcp130-238.gsslab.lab.example.com --fields "Content Information"

      Content Information:
      Content view environments:
      1) Content view:
      Id: 1
      Name: Default Organization View
      Composite: no
      Lifecycle environment:
      Id: 1
      Name: Library
      Content Source:
      Id:
      Name:
      ..
      ..

      As we can see, Content Source is null

      6. Now, Even if we manually assign a content source with the host, Just Re-register the host simply by re-running the sub-man command with --force and the behavior remains same i.e. the COntent Source becomes Nil\null

      7. Now, update the name and URL of the internal smart-proxy i.e.

      hammer capsule update --id 1 --name satellite.uatlab.lab.example.com --url https://satellite.uatlab.lab.example.com:9090

      8. Just simply re-register the host and the Content Source information now would be populated correctly.

      Content Information:
      Content view environments:
      1) Content view:
      Id: 1
      Name: Default Organization View
      Composite: no
      Lifecycle environment:
      Id: 1
      Name: Library
      Content Source:
      Id: 1
      Name: satellite.uatlab.lab.example.com

      So, Something about the SmartProxy of Satellite using vm205-101.uatlab.lab.example.com instead of satellite.uatlab.lab.example.com is the issue here. Perhaps, Satellite is unable to detect or use the SmartProxy as a valid content source when the name and URL is vm205-101.uatlab.lab.example.com.

      Expected results:

      It should behave the same way as it did in Satellite 6.11 i.e. identify the Content SOurce based on Registered Through capsule and then set it as content source without any hiccups but it should not be null.

      Additional info:

      Check the support case description for the end-user related testing as that contains some more information and a bit different outputs e.g. The internal capsule has a name set to CNAME but URL set to https://FQDN:9090 etc.

      DEV Tracker for https://issues.redhat.com/browse/SAT-24668

              Unassigned Unassigned
              satellite-jira-automation@redhat.com Satellite Jira-Automation
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: