Katello / katello-client-bootstrap

Bootstrap Script for migrating systems to Foreman & Katello
GNU General Public License v2.0
52 stars 63 forks source link

bootstrap.py should check that domain is in correct organization/location #248

Closed evgeni closed 6 years ago

evgeni commented 6 years ago

From https://bugzilla.redhat.com/show_bug.cgi?id=1566423 (thanks @jhutar)

Description of problem: bootstrap.py should check that domain is in correct organization/location

Version-Release number of selected component (if applicable): satellite-6.3.0.1-1.el7sat.noarch

How reproducible: always

Steps to Reproduce:

  1. Have domain "example.com" created in Satellite, but without organization and location specified
  2. Using bootstrap.py attempt to register host something.example.com: python /root/bootstrap.py --server satellite-vm.example.com --activationkey 'ActivationKey' --download-method http --login 'admin' --password 'changeme' --hostgroup 'HostGroup' --location 'Default Location' --organization 'Default Organization' --operatingsystem 'RedHat 7.4' --skip-puppet --skip katello-agent --rex --force

Actual results: Fails with: [ERROR], [2018-04-12 08:52:12], EXITING: [/usr/sbin/subscription-manager register --org 'Default_Organization' --name 'c03-h03-r620container145.example.com' --activationkey 'ActivationKey' --serverurl=https://satellite-vm.example.com:443/rhsm --baseurl=https://satellite-vm.example.com/pulp/repos --force] failed to execute properly. Validation failed: Name must not include periods

Expected results: Should check if domain is in correct organization / location and warn and advice to the user