Bug 1793066 - Hosts that have "_" on the hostname are failing to be registered even setting '--name' and 'network.hostname-override'.
Summary: Hosts that have "_" on the hostname are failing to be registered even setting...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.6.0
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Stephen Wadeley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-20 15:39 UTC by Rudnei Bertol Jr.
Modified: 2023-03-24 16:47 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-24 14:01:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rudnei Bertol Jr. 2020-01-20 15:39:49 UTC
Description of problem:

Hosts that have "_" on the hostname are failing to be registered, even setting the option '--name' and setting the option 'network.hostname-override' option.


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

How reproducible:
Try to register the host with hostname that contains '_' on the hostname, using the option '--name' and 'network.hostname-override' on the rhsm facts. i.e. 'node_1.acme.local'


Steps to Reproduce:
1. Set the hostname without "_" on the '/etc/rhsm/facts/katello.facts'
2. Register a host with "_" on the hostname (node_1.acme.local), with the option '--name'

Actual results:

This registration is failing with the following error.

"""
HTTP error (422 - Unknown): Validation failed: Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123, Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123
"""


Expected results:

This host should be registered/created on the Satellite with the hostname set on the option '--name' or on the 'katello.facts'

Additional info:

We are aware that the host cannot be registered with "_" on the hostname, however, the options '--name' or 'network.hostname-override' on facts should workaround it.

https://access.redhat.com/solutions/3981861
https://access.redhat.com/solutions/3223831
https://bugzilla.redhat.com/show_bug.cgi?id=1375591
https://bugzilla.redhat.com/show_bug.cgi?id=1430998#c7


A reproducer will be pasted on the next comment.

Comment 3 Rudnei Bertol Jr. 2020-01-20 15:50:16 UTC
/// Reproducer ///

Installed a fresh Satellite 'dhcp181-81.gsslab.rdu2.redhat.com' to reproduce the behavior


### Setting the hostname for this host to 'node_1.acme.local' and overriding on the file '/etc/rhsm/facts/katello.facts' to 'node1.acme.local'
~~~
[root@node_1 ~]# cat /etc/rhsm/facts/katello.facts
{"network.hostname":"node1.acme.local", "network.hostname-override":"node1.acme.local"}

[root@node_1 ~]# hostnamectl
   Static hostname: node_1.acme.local
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 4a54fa7deb7b467697b05be0390012a9
           Boot ID: 7470e4510d81448daf5d45496f96d2ce
    Virtualization: kvm
  Operating System: Employee SKU
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.7:GA:server
            Kernel: Linux 3.10.0-1062.el7.x86_64
      Architecture: x86-64

[root@node_1 ~]# subscription-manager facts |grep hostname
network.hostname: node1.acme.local
network.hostname-override: node1.acme.local
~~~

### Registering the host 'node_1.acme.local' to the Satellite 'dhcp181-81.gsslab.rdu2.redhat.com' using the option '--name'
~~~
[root@node_1 ~]# subscription-manager register --org ACME --environment Library --username admin --password $PASSWORD --name node1.acme.local
Registering to: dhcp181-81.gsslab.rdu2.redhat.com:443/rhsm
HTTP error (422 - Unknown): Validation failed: Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123, Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123
~~~

### Following the production.log snippet for the Satellite with the expected error.
"""
2020-01-19T18:28:33 [I|app|] Started GET "/rhsm/" for 10.10.181.41 at 2020-01-19 18:28:33 -0500
2020-01-19T18:28:33 [I|app|98a47] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON
2020-01-19T18:28:33 [I|app|98a47]   Parameters: {"root"=>{}}
2020-01-19T18:28:33 [I|app|98a47]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.59/app/views/katello/api/v2/root/resource_list.json.rabl within katello/api/v2/layouts/collection
2020-01-19T18:28:33 [I|app|98a47]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.59/app/views/katello/api/v2/root/resource_list.json.rabl within katello/api/v2/layouts/collection (2.9ms)
2020-01-19T18:28:33 [I|app|98a47] Completed 200 OK in 25ms (Views: 4.4ms | ActiveRecord: 3.0ms)
2020-01-19T18:28:33 [I|app|] Started GET "/rhsm/owners/ACME/environments?name=Library" for 10.10.181.41 at 2020-01-19 18:28:33 -0500
2020-01-19T18:28:33 [I|app|aa916] Processing by Katello::Api::Rhsm::CandlepinProxiesController#rhsm_index as JSON
2020-01-19T18:28:33 [I|app|aa916]   Parameters: {"name"=>"Library", "organization_id"=>"ACME"}
2020-01-19T18:28:33 [I|app|aa916] Current user: foreman_admin (administrator)
2020-01-19T18:28:33 [I|kat|aa916] Authorized user admin(Admin User)
2020-01-19T18:28:33 [I|app|aa916] Current user: admin (administrator)
2020-01-19T18:28:33 [I|app|aa916] Completed 200 OK in 46ms (Views: 0.4ms | ActiveRecord: 11.9ms)
2020-01-19T18:28:33 [I|app|] Started POST "/rhsm/environments/3fbeb6a5a3e2f60d2a9c015a6f527a08/consumers" for 10.10.181.41 at 2020-01-19 18:28:33 -0500
2020-01-19T18:28:33 [I|app|c923c] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_create as JSON
2020-01-19T18:28:33 [I|app|c923c]   Parameters: {"name"=>"node1.acme.local", "contentTags"=>["rhel-7", "jbeap", "jbeap-6.0", "rhel-7-server"], "serviceLevel"=>"", "usage"=>"", "installedProducts"=>[{"productName"=>"JBoss Enterprise Application Platform", "arch"=>"x86_64", "version"=>"6.0", "productId"=>"183"}, {"productName"=>"Red Hat Enterprise Linux Server", "arch"=>"x86_64", "version"=>"7.7", "productId"=>"69"}], "role"=>"", "facts"=>"[FILTERED]", "addOns"=>[], "type"=>"system", "environment_id"=>"3fbeb6a5a3e2f60d2a9c015a6f527a08"}
2020-01-19T18:28:33 [I|app|c923c] Current user: foreman_admin (administrator)
2020-01-19T18:28:33 [I|kat|c923c] Authorized user admin(Admin User)
2020-01-19T18:28:33 [I|app|c923c] Current user: admin (administrator)
2020-01-19T18:28:33 [I|app|c923c] Current user: foreman_admin (administrator)
2020-01-19T18:28:33 [I|kat|c923c] GET: https://dhcp181-81.gsslab.rdu2.redhat.com/pulp/api/v2/users/: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 200: [{"_id": {"$oid": "5e237210696cb153d7180a15"}, "name": "admin", "roles": ["super-users"], "_ns": "users", "login": "admin", "_href": "/pulp/api/v2/users/admin/"}]
2020-01-19T18:28:34 [I|app|c923c] Current user: admin (administrator)
2020-01-19T18:28:34 [W|app|c923c] Not queueing Nic::Managed: ["Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"]
2020-01-19T18:28:34 [W|app|c923c] Not queueing Nic::Managed: ["Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"]
2020-01-19T18:28:34 [W|app|c923c] Not queueing Nic::Managed: ["Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"]
2020-01-19T18:28:34 [W|app|c923c] Not queueing Host::Managed: ["Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123", "Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"]
2020-01-19T18:28:34 [W|app|c923c] Not queueing Host::Managed: ["Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123", "Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"]
2020-01-19T18:28:34 [W|app|c923c] Not queueing Host::Managed: ["Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123", "Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"]
2020-01-19T18:28:34 [W|app|c923c] Not queueing Discovery reboot: Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123 and Name hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123
2020-01-19T18:28:34 [E|kat|c923c] <Class> ActiveRecord::RecordInvalid
2020-01-19T18:28:34 [E|kat|c923c] interfaces.name: ["hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"]
2020-01-19T18:28:34 [E|kat|c923c] name: ["hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123"]
2020-01-19T18:28:34 [I|app|c923c] Completed 422 Unprocessable Entity in 926ms (Views: 0.5ms | ActiveRecord: 15.3ms)
"""

### Setting the hostname for this host to 'node-1.acme.local' and overriding on the file '/etc/rhsm/facts/katello.facts' to 'node1.acme.local'
~~~
[root@node-1 ~]# hostnamectl set-hostname node-1.acme.local

[root@node-1 ~]# cat /etc/rhsm/facts/katello.facts
{"network.hostname":"node1.acme.local", "network.hostname-override":"node1.acme.local"}

[root@node-1 ~]# hostnamectl
   Static hostname: node-1.acme.local
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 4a54fa7deb7b467697b05be0390012a9
           Boot ID: 7470e4510d81448daf5d45496f96d2ce
    Virtualization: kvm
  Operating System: Employee SKU
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.7:GA:server
            Kernel: Linux 3.10.0-1062.el7.x86_64
      Architecture: x86-64

[root@node_1 ~]# subscription-manager facts |grep hostname
network.hostname: node1.acme.local
network.hostname-override: node1.acme.local
~~~

### Registering the host 'node-1.acme.local' to the Satellite 'dhcp181-81.gsslab.rdu2.redhat.com' using the option '--name'
~~~
[root@node-1 ~]# subscription-manager register --org ACME --environment Library --username admin --password redhat123 --name node1.acme.local
Registering to: dhcp181-81.gsslab.rdu2.redhat.com:443/rhsm
The system has been registered with ID: 949fb66e-b28a-46d9-bffa-0a716469143c
The registered system name is: node1.acme.local
~~~

### Following the production.log snippet with the error.
"""
2020-01-20T09:56:26 [I|app|] Started GET "/rhsm/" for 10.10.181.41 at 2020-01-20 09:56:26 -0500
2020-01-20T09:56:26 [I|app|6d7d7] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON
2020-01-20T09:56:26 [I|app|6d7d7]   Parameters: {"root"=>{}}
2020-01-20T09:56:26 [I|app|6d7d7]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.59/app/views/katello/api/v2/root/resource_list.json.rabl within katello/api/v2/layouts/collection
2020-01-20T09:56:26 [I|app|6d7d7]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.59/app/views/katello/api/v2/root/resource_list.json.rabl within katello/api/v2/layouts/collection (3.7ms)
2020-01-20T09:56:26 [I|app|6d7d7] Completed 200 OK in 40ms (Views: 6.3ms | ActiveRecord: 3.0ms)
2020-01-20T09:56:26 [I|app|] Started GET "/rhsm/owners/ACME/environments?name=Library" for 10.10.181.41 at 2020-01-20 09:56:26 -0500
2020-01-20T09:56:26 [I|app|768da] Processing by Katello::Api::Rhsm::CandlepinProxiesController#rhsm_index as JSON
2020-01-20T09:56:26 [I|app|768da]   Parameters: {"name"=>"Library", "organization_id"=>"ACME"}
2020-01-20T09:56:26 [I|app|768da] Current user: foreman_admin (administrator)
2020-01-20T09:56:26 [I|kat|768da] Authorized user admin(Admin User)
2020-01-20T09:56:26 [I|app|768da] Current user: admin (administrator)
2020-01-20T09:56:26 [I|app|768da] Completed 200 OK in 47ms (Views: 0.4ms | ActiveRecord: 12.2ms)
2020-01-20T09:56:26 [I|app|] Started POST "/rhsm/environments/3fbeb6a5a3e2f60d2a9c015a6f527a08/consumers" for 10.10.181.41 at 2020-01-20 09:56:26 -0500
2020-01-20T09:56:26 [I|app|6aa4b] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_create as JSON
2020-01-20T09:56:26 [I|app|6aa4b]   Parameters: {"name"=>"node1.acme.local", "contentTags"=>["rhel-7", "jbeap", "jbeap-6.0", "rhel-7-server"], "serviceLevel"=>"", "usage"=>"", "installedProducts"=>[{"productName"=>"JBoss Enterprise Application Platform", "arch"=>"x86_64", "version"=>"6.0", "productId"=>"183"}, {"productName"=>"Red Hat Enterprise Linux Server", "arch"=>"x86_64", "version"=>"7.7", "productId"=>"69"}], "role"=>"", "facts"=>"[FILTERED]", "addOns"=>[], "type"=>"system", "environment_id"=>"3fbeb6a5a3e2f60d2a9c015a6f527a08"}
2020-01-20T09:56:27 [I|app|6aa4b] Current user: foreman_admin (administrator)
2020-01-20T09:56:27 [I|kat|6aa4b] Authorized user admin(Admin User)
2020-01-20T09:56:27 [I|app|6aa4b] Current user: admin (administrator)
2020-01-20T09:56:27 [I|app|6aa4b] Current user: foreman_admin (administrator)
2020-01-20T09:56:27 [I|kat|6aa4b] GET: https://dhcp181-81.gsslab.rdu2.redhat.com/pulp/api/v2/users/: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 200: [{"_id": {"$oid": "5e237210696cb153d7180a15"}, "name": "admin", "roles": ["super-users"], "_ns": "users", "login": "admin", "_href": "/pulp/api/v2/users/admin/"}]
2020-01-20T09:56:27 [I|app|6aa4b] Current user: admin (administrator)
2020-01-20T09:56:27 [I|aud|6aa4b] create event for Nic::Managed with id 3
2020-01-20T09:56:27 [I|aud|6aa4b] create event for Host::Base with id 3
2020-01-20T09:56:27 [I|aud|6aa4b] create event for Host::Base with id 2
2020-01-20T09:56:27 [I|aud|6aa4b] create event for Host::Base with id 2
2020-01-20T09:56:27 [I|app|6aa4b] Current user: foreman_admin (administrator)
2020-01-20T09:56:28 [I|app|6aa4b] Import facts for 'node-1.acme.local' completed. Added: 155, Updated: 0, Deleted 0 facts
2020-01-20T09:56:29 [I|aud|6aa4b] update event for Nic::Managed with id 3
2020-01-20T09:56:29 [I|aud|6aa4b] update event for Nic::Managed with id 3
2020-01-20T09:56:29 [I|aud|6aa4b] update event for Host::Base with id 3
2020-01-20T09:56:29 [I|kat|6aa4b] POST: https://dhcp181-81.gsslab.rdu2.redhat.com/pulp/api/v2/consumers/: {"id":"949fb66e-b28a-46d9-bffa-0a716469143c","display_name":"node-1.acme.local"}: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 201: {"consumer": {"display_name": "node-1.acme.local", "description": null, "_ns": "consumers", "notes": {}, "rsa_pub": null, "capabilities": {}, "_id": {"$oid": "5e25bf9d696cb161001cf56b"}, "id": "949fb66e-b28a-46d9-bffa-0a716469143c", "_href": "/pulp/api/v2/consumers/949fb66e-b28a-46d9-bffa-0a716469143c/"}, "certificate": "-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQDSR0JTqEa9RAJHdq4zC45LvqdSoDhYtzb//IGaz5EO028KASit\nHBwAB8ze81gk9cTVvAIclMNF2VDMZtKwT4OVUANN4Ne205KkPEl2z4d4Ryd42L0k\n4ejU5cefyXYbr7w+f3xff9N4uGqoFhEPOW5pOuFxUnqcJ44uPP7RlQb14QIDAQAB\nAoGAY12LCS82pk9R6GU7siFez4o7VT8jAUEqu1KeCALX4DKngQnFJ/BlhtooxJ4n\nY+fDaOCb+teNYx9rH/viya/5VCTXeUMBHVqBYr8VTs7XA0M8KpyqZc0tvMjSC5iT\nKMLBdA8MYxiNExwf/veB1CuCSMwmZNSNbE8r1a71TiJBaaUCQQD0NbKrTWeTMSpG\nBXegGuo5kRrtcXUhCq9EHrgaiiQe+u0vpR1LxmzrrP1HTMGJ44X5lbukA0Ti6SQ0\nU2l/TVlfAkEA3G4v6p6RQMV9GWv/nScd6xJniMTojgq6RaPxF/Bx0z9sCoHoVRC1\n/D8iPEfl2XttWUqTznioCJauiRqHtQu4vwJASZ3WWmVfD7QGdk03nn/+k5P2dhV5\npZg+9V39SaLS+LPTxEUV673JH9JqF5A/131K6c4FXo/NuElnrI5ogwOiKQJAL3K8\nd7lYNOQN0JoRtKdF5mLYzHTuRh0DCZiHfgqwxbMiM4TRGPZ25exFF0q2rEDIQe8u\nr8QDD4431aVTTuJOCwJBAMN30yjDuLu/nHq5igWqFl5YbxDBgztLRUnO7AoQSEAM\ns4/ix2tz6WSru3mg45YjCdlOXQkTxEhQHAGUFeQ61RE=\n-----END RSA PRIVATE KEY-----\n-----BEGIN CERTIFICATE-----\nMIIDlDCCAXwCEQCvUxAo5jZD9aptSpPJOcEjMA0GCSqGSIb3DQEBBQUAMDsxKjAo\nBgNVBAMMIWRoY3AxODEtODEuZ3NzbGFiLnJkdTIucmVkaGF0LmNvbTENMAsGA1UE\nCgwEUFVMUDAeFw0yMDAxMjAxNDU2MjlaFw0zMDAxMTcxNDU2MjlaMFkxLTArBgNV\nBAMMJDk0OWZiNjZlLWIyOGEtNDZkOS1iZmZhLTBhNzE2NDY5MTQzYzEoMCYGCgmS\nJomT8ixkAQEMGDVlMjViZjlkNjk2Y2IxNjEwMDFjZjU2YjCBnzANBgkqhkiG9w0B\nAQEFAAOBjQAwgYkCgYEA0kdCU6hGvUQCR3auMwuOS76nUqA4WLc2//yBms+RDtNv\nCgEorRwcAAfM3vNYJPXE1bwCHJTDRdlQzGbSsE+DlVADTeDXttOSpDxJds+HeEcn\neNi9JOHo1OXHn8l2G6+8Pn98X3/TeLhqqBYRDzluaTrhcVJ6nCeOLjz+0ZUG9eEC\nAwEAATANBgkqhkiG9w0BAQUFAAOCAgEAbkvpA+UfPGLoyZkRcDBQ725sljFZc8EM\nEVZkYIv6PiEW2dvNE0M+S7O+H8mvOHZ3pL2tIYPlIeHc8UugU8XFTOVFiLohcEjI\nH1tU3GQOpU6scAOcNrguIOeZFfs0swUV4LxTdHktNEAcFj4fC2WG5cVyeK83IkKE\nA6i6bbMnRH1N0d8UVXde4nBsE7zqMs703IVzAixMeEwkRCK0iQr8qZTtS3ID0d8v\n55UhKZvMF4miHopsbZkuEl7P2+FsTzIB6SjZ/pxrKjBod0ydG198cXfupn+dYWLF\n6+t67xef5hAxScGy8xQDGJCbokOjxRDcMHZ8A6KMIRaSd4k5mN0iWOlSAnwHPMfB\nOwpeyjWnMTT9dJhnScxMZn3VVOTrpV92t+j1MRn5LfYsYpNgmW0IgW88zV0Iex8T\neUyZPBjENqKgTwQ+wE7RUZJObweWCSuKwZPEcFJIhGV7o0jELsib/x8VY71aH17o\nO5AGQLl2iWNkfINKJct+oVmS1mmsKI3UJZ5lG5GDUrXnBHVvCRfDb/K3xr4fApgU\nrBrXTi6hHr7ep89jE2Rzk91Akj/fKcN3o1u0H7eOXFuy4pGWKIuGVENNWeU4kLvy\nfk5r758lmt/fH4Pa8O0KtprLD/33FOyvsweFhiBZylthLgPsgZWKtW+TAoHnfSpd\nQECBvknW/Rs=\n-----END CERTIFICATE-----"}
2020-01-20T09:56:29 [I|aud|6aa4b] update event for Host::Base with id 2
2020-01-20T09:56:29 [I|app|6aa4b] Current user: admin (administrator)
2020-01-20T09:56:29 [I|aud|6aa4b] update event for Host::Base with id 2
2020-01-20T09:56:29 [I|app|6aa4b] Completed 200 OK in 2766ms (Views: 4.5ms | ActiveRecord: 352.4ms)
2020-01-20T09:56:29 [I|app|] Started GET "/rhsm/status" for 10.10.181.41 at 2020-01-20 09:56:29 -0500
2020-01-20T09:56:29 [I|app|6c3d3] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2020-01-20T09:56:29 [I|app|6c3d3] Completed 200 OK in 27ms (Views: 0.4ms | ActiveRecord: 2.0ms)
2020-01-20T09:56:29 [I|app|] Started GET "/rhsm/" for 10.10.181.41 at 2020-01-20 09:56:29 -0500
2020-01-20T09:56:29 [I|app|a31a1] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON
2020-01-20T09:56:29 [I|app|a31a1]   Parameters: {"root"=>{}}
2020-01-20T09:56:29 [I|app|a31a1]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.59/app/views/katello/api/v2/root/resource_list.json.rabl within katello/api/v2/layouts/collection
2020-01-20T09:56:29 [I|app|a31a1]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.59/app/views/katello/api/v2/root/resource_list.json.rabl within katello/api/v2/layouts/collection (2.6ms)
2020-01-20T09:56:29 [I|app|a31a1] Completed 200 OK in 19ms (Views: 3.6ms | ActiveRecord: 1.7ms)
2020-01-20T09:56:29 [I|app|] Started GET "/rhsm/status" for 10.10.181.41 at 2020-01-20 09:56:29 -0500
2020-01-20T09:56:29 [I|app|c27da] Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
2020-01-20T09:56:29 [I|app|c27da] Completed 200 OK in 24ms (Views: 0.5ms | ActiveRecord: 2.0ms)
2020-01-20T09:56:29 [I|app|] Started GET "/rhsm/" for 10.10.181.41 at 2020-01-20 09:56:29 -0500
2020-01-20T09:56:29 [I|app|90511] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON
2020-01-20T09:56:29 [I|app|90511]   Parameters: {"root"=>{}}
2020-01-20T09:56:29 [I|app|90511]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.59/app/views/katello/api/v2/root/resource_list.json.rabl within katello/api/v2/layouts/collection
2020-01-20T09:56:29 [I|app|90511]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.59/app/views/katello/api/v2/root/resource_list.json.rabl within katello/api/v2/layouts/collection (2.2ms)
2020-01-20T09:56:29 [I|app|90511] Completed 200 OK in 18ms (Views: 3.1ms | ActiveRecord: 1.7ms)
2020-01-20T09:56:30 [I|app|] Started PUT "/rhsm/consumers/949fb66e-b28a-46d9-bffa-0a716469143c/packages" for 10.10.181.41 at 2020-01-20 09:56:30 -0500
2020-01-20T09:56:30 [I|app|bd1c1] Processing by Katello::Api::Rhsm::CandlepinDynflowProxyController#upload_package_profile as JSON
2020-01-20T09:56:30 [I|app|bd1c1]   Parameters: {"id"=>"949fb66e-b28a-46d9-bffa-0a716469143c"}
2020-01-20T09:56:30 [I|app|bd1c1] Current user: 949fb66e-b28a-46d9-bffa-0a716469143c (regular user)
2020-01-20T09:56:30 [I|app|bd1c1] Current user: foreman_admin (administrator)
2020-01-20T09:56:30 [I|app|bd1c1] Current user: foreman_admin (administrator)
2020-01-20T09:56:30 [I|kat|bd1c1] GET: https://dhcp181-81.gsslab.rdu2.redhat.com/pulp/api/v2/users/: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 200: [{"_id": {"$oid": "5e237210696cb153d7180a15"}, "name": "admin", "roles": ["super-users"], "_ns": "users", "login": "admin", "_href": "/pulp/api/v2/users/admin/"}]
2020-01-20T09:56:30 [I|app|bd1c1] Current user: foreman_admin (administrator)
2020-01-20T09:56:30 [I|app|bd1c1] Current user: 949fb66e-b28a-46d9-bffa-0a716469143c (regular user)
2020-01-20T09:56:30 [I|app|bd1c1] Completed 200 OK in 273ms (Views: 3.7ms | ActiveRecord: 18.5ms)
2020-01-20T09:56:30 [I|app|] Started GET "/rhsm/consumers/949fb66e-b28a-46d9-bffa-0a716469143c/certificates/serials" for 10.10.181.41 at 2020-01-20 09:56:30 -0500
2020-01-20T09:56:30 [I|app|fe4dd] Processing by Katello::Api::Rhsm::CandlepinProxiesController#serials as JSON
2020-01-20T09:56:30 [I|app|fe4dd]   Parameters: {"id"=>"949fb66e-b28a-46d9-bffa-0a716469143c"}
2020-01-20T09:56:30 [I|app|fe4dd] Completed 200 OK in 77ms (Views: 0.4ms | ActiveRecord: 5.1ms)
2020-01-20T09:56:30 [I|app|] Started GET "/rhsm/consumers/949fb66e-b28a-46d9-bffa-0a716469143c/compliance" for 10.10.181.41 at 2020-01-20 09:56:30 -0500
2020-01-20T09:56:30 [I|app|4c698] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2020-01-20T09:56:30 [I|app|4c698]   Parameters: {"id"=>"949fb66e-b28a-46d9-bffa-0a716469143c"}
2020-01-20T09:56:30 [I|app|4c698] Current user: 949fb66e-b28a-46d9-bffa-0a716469143c (regular user)
2020-01-20T09:56:30 [I|app|4c698] Completed 200 OK in 65ms (Views: 0.3ms | ActiveRecord: 2.9ms)
2020-01-20T09:56:30 [I|app|] Started GET "/rhsm/consumers/949fb66e-b28a-46d9-bffa-0a716469143c/compliance" for 10.10.181.41 at 2020-01-20 09:56:30 -0500
2020-01-20T09:56:30 [I|app|d9cbd] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2020-01-20T09:56:30 [I|app|d9cbd]   Parameters: {"id"=>"949fb66e-b28a-46d9-bffa-0a716469143c"}
2020-01-20T09:56:30 [I|app|d9cbd] Current user: 949fb66e-b28a-46d9-bffa-0a716469143c (regular user)
2020-01-20T09:56:30 [I|app|d9cbd] Completed 200 OK in 61ms (Views: 0.2ms | ActiveRecord: 3.3ms)
2020-01-20T09:56:30 [I|app|] Started GET "/rhsm/consumers/949fb66e-b28a-46d9-bffa-0a716469143c/compliance" for 10.10.181.41 at 2020-01-20 09:56:30 -0500
2020-01-20T09:56:30 [I|app|87fb0] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2020-01-20T09:56:30 [I|app|87fb0]   Parameters: {"id"=>"949fb66e-b28a-46d9-bffa-0a716469143c"}
2020-01-20T09:56:30 [I|app|87fb0] Current user: 949fb66e-b28a-46d9-bffa-0a716469143c (regular user)
2020-01-20T09:56:30 [I|app|87fb0] Completed 200 OK in 55ms (Views: 0.2ms | ActiveRecord: 2.8ms)
2020-01-20T09:56:31 [I|app|] Started GET "/rhsm/consumers/949fb66e-b28a-46d9-bffa-0a716469143c/compliance" for 10.10.181.41 at 2020-01-20 09:56:31 -0500
2020-01-20T09:56:31 [I|app|3d537] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2020-01-20T09:56:31 [I|app|3d537]   Parameters: {"id"=>"949fb66e-b28a-46d9-bffa-0a716469143c"}
2020-01-20T09:56:31 [I|app|3d537] Current user: 949fb66e-b28a-46d9-bffa-0a716469143c (regular user)
2020-01-20T09:56:31 [I|app|3d537] Completed 200 OK in 55ms (Views: 0.2ms | ActiveRecord: 2.7ms)
2020-01-20T09:56:31 [I|app|] Started GET "/rhsm/consumers/949fb66e-b28a-46d9-bffa-0a716469143c/compliance" for 10.10.181.41 at 2020-01-20 09:56:31 -0500
2020-01-20T09:56:31 [I|app|843fa] Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
2020-01-20T09:56:31 [I|app|843fa]   Parameters: {"id"=>"949fb66e-b28a-46d9-bffa-0a716469143c"}
2020-01-20T09:56:31 [I|app|843fa] Current user: 949fb66e-b28a-46d9-bffa-0a716469143c (regular user)
2020-01-20T09:56:31 [I|app|843fa] Completed 200 OK in 56ms (Views: 0.2ms | ActiveRecord: 3.1ms)
2020-01-19T17:36:38 [I|kat|] POST: https://dhcp181-81.gsslab.rdu2.redhat.com/pulp/api/v2/consumers/eb9adc89-3e4e-4f4c-9698-36c9e83976d6/actions/content/regenerate_applicability/: {}: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 202: {"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/b5af496b-96ec-416d-b85f-08ae9e7d4ac1/", "task_id": "b5af496b-96ec-416d-b85f-08ae9e7d4ac1"}], "result": null, "error": null}
2020-01-19T17:36:38 [I|kat|] GET: https://dhcp181-81.gsslab.rdu2.redhat.com/pulp/api/v2/tasks/b5af496b-96ec-416d-b85f-08ae9e7d4ac1/: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 200: {"exception": null, "task_type": "pulp.server.managers.consumer.applicability.regenerate_applicability_for_consumers", "_href": "/pulp/api/v2/tasks/b5af496b-96ec-416d-b85f-08ae9e7d4ac1/", "task_id": "b5af496b-96ec-416d-b85f-08ae9e7d4ac1", "tags": ["pulp:action:consumer_content_applicability_regeneration"], "finish_time": null, "_ns": "task_status", "start_time": null, "traceback": null, "spawned_tasks": [], "progress_report": {}, "queue": "", "state": "waiting", "worker_name": null, "result": null, "error": null, "_id": {"$oid": "5e24d9f6520d812fd76e9b39"}, "id": "5e24d9f6520d812fd76e9b39"}
2020-01-19T17:36:39 [I|kat|] GET: https://dhcp181-81.gsslab.rdu2.redhat.com/pulp/api/v2/tasks/b5af496b-96ec-416d-b85f-08ae9e7d4ac1/: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 200: {"exception": null, "task_type": "pulp.server.managers.consumer.applicability.regenerate_applicability_for_consumers", "_href": "/pulp/api/v2/tasks/b5af496b-96ec-416d-b85f-08ae9e7d4ac1/", "task_id": "b5af496b-96ec-416d-b85f-08ae9e7d4ac1", "tags": ["pulp:action:consumer_content_applicability_regeneration"], "finish_time": "2020-01-19T22:36:38Z", "_ns": "task_status", "start_time": "2020-01-19T22:36:38Z", "traceback": null, "spawned_tasks": [], "progress_report": {}, "queue": "reserved_resource_worker-0.rdu2.redhat.com.dq2", "state": "finished", "worker_name": "reserved_resource_worker-0.rdu2.redhat.com", "result": null, "error": null, "_id": {"$oid": "5e24d9f6520d812fd76e9b39"}, "id": "5e24d9f6520d812fd76e9b39"}
2020-01-19T17:36:40 [I|app|] Current user: foreman_admin (administrator)
2020-01-19T17:36:40 [I|app|] Current user: foreman_admin (administrator)
2020-01-19T17:36:40 [I|kat|] POST: https://dhcp181-81.gsslab.rdu2.redhat.com/pulp/api/v2/consumers/content/applicability/: {"criteria":{"filters":{"id":{"$in":["eb9adc89-3e4e-4f4c-9698-36c9e83976d6"]}}},"content_types":["erratum"]}: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 200: []
2020-01-19T17:36:40 [I|kat|] POST: https://dhcp181-81.gsslab.rdu2.redhat.com/pulp/api/v2/consumers/content/applicability/: {"criteria":{"filters":{"id":{"$in":["eb9adc89-3e4e-4f4c-9698-36c9e83976d6"]}}},"content_types":["rpm"]}: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 200: []
2020-01-19T22:00:33 [I|kat|] DELETE: https://dhcp181-81.gsslab.rdu2.redhat.com/pulp/api/v2/content/orphans/: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 202: {"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/eede37c0-075c-40be-8fc2-b4cc08511ea3/", "task_id": "eede37c0-075c-40be-8fc2-b4cc08511ea3"}], "result": null, "error": null}
2020-01-20T04:11:34 [I|app|] Performing SendExpireSoonNotifications (Job ID: a35ca747-6cc1-48f3-a85e-541764e32242) from Dynflow(default)
2020-01-20T04:11:34 [I|app|] Performing CreatePulpDiskSpaceNotifications (Job ID: 43ecd7d0-9aaa-4305-9875-6cb11acfbb38) from Dynflow(default)
2020-01-20T04:11:34 [I|app|] Enqueued SendExpireSoonNotifications (Job ID: 6382a0bc-27ec-45ad-985a-8bacc27b3f12) to Dynflow(default) at 2020-01-20 21:11:34 UTC
2020-01-20T04:11:34 [I|app|] Performed SendExpireSoonNotifications (Job ID: a35ca747-6cc1-48f3-a85e-541764e32242) from Dynflow(default) in 118.93ms
2020-01-20T04:11:34 [I|app|] Enqueued CreatePulpDiskSpaceNotifications (Job ID: 100e9bd2-69e0-4ef8-91f1-1c0a0e1e43b8) to Dynflow(default) at 2020-01-20 21:11:34 UTC
2020-01-20T04:11:34 [I|app|] Performed CreatePulpDiskSpaceNotifications (Job ID: 43ecd7d0-9aaa-4305-9875-6cb11acfbb38) from Dynflow(default) in 165.28ms
2020-01-20T04:11:50 [I|app|] Performing CreateRssNotifications (Job ID: 39a3a067-4b45-4437-a9c6-feda85782afc) from Dynflow(default) with arguments: {"_aj_hash_with_indifferent_access"=>true}
2020-01-20T04:11:50 [I|app|] Enqueued CreateRssNotifications (Job ID: b445e2b2-c7ea-47a0-98ce-444c09fd205a) to Dynflow(default) at 2020-01-20 21:11:50 UTC with arguments: {}
2020-01-20T04:11:50 [I|app|] Performed CreateRssNotifications (Job ID: 39a3a067-4b45-4437-a9c6-feda85782afc) from Dynflow(default) in 171.63ms
2020-01-20T09:56:29 [I|app|] Current user: foreman_admin (administrator)
2020-01-20T09:56:31 [I|app|] Current user: foreman_admin (administrator)
2020-01-20T09:56:31 [I|kat|] POST: https://dhcp181-81.gsslab.rdu2.redhat.com/pulp/api/v2/consumers/949fb66e-b28a-46d9-bffa-0a716469143c/profiles/: {"content_type":"rpm","profile":[{"vendor":
"""

### Following the host output from the Satellite server.
~~~
[root@dhcp181-81 ~]# hammer host list 
---|-----------------------------------|------------------|------------|--------------|-------------------|---------------------------|----------------------
ID | NAME                              | OPERATING SYSTEM | HOST GROUP | IP           | MAC               | CONTENT VIEW              | LIFECYCLE ENVIRONMENT
---|-----------------------------------|------------------|------------|--------------|-------------------|---------------------------|----------------------
1  | dhcp181-81.gsslab.rdu2.redhat.com | RedHat 7.7       |            | 10.10.181.81 | 52:54:00:2d:cf:7a |                           |                      
3  | node-1.acme.local                 | RedHat 7.7       |            | 10.10.181.41 | 52:54:00:af:0b:1e | Default Organization View | Library              
---|-----------------------------------|------------------|------------|--------------|-------------------|---------------------------|----------------------

[root@dhcp181-81 ~]# hammer host info --id 3
Id:                       3
Name:                     node-1.acme.local
Organization:             ACME
Location:                 ACME
Cert name:                node-1.acme.local
Managed:                  no
Installed at:             
Last report:              
Network:                  
    IPv4 address: 10.10.181.41
    MAC:          52:54:00:af:0b:1e
Network interfaces:       
 1) Id:           3
    Identifier:   eth0
    Type:         interface (primary, provision)
    MAC address:  52:54:00:af:0b:1e
    IPv4 address: 10.10.181.41
    FQDN:         node-1.acme.local
Operating system:         
    Architecture:           x86_64
    Operating System:       RedHat 7.7
    Build:                  no
    Custom partition table:
Parameters:               

All parameters:           
    enable-puppet5 => true
    enable-epel => false
Additional info:          
    Owner:      Admin User
    Owner Type: User
    Enabled:    yes
    Model:      KVM
    Comment:
OpenSCAP Proxy:           
Content Information:      
    Content View:          
        ID:   1
        Name: Default Organization View
    Lifecycle Environment: 
        ID:   1
        Name: Library
    Content Source:        
        ID:   
        Name:
    Kickstart Repository:  
        ID:   
        Name:
    Applicable Packages:   0
    Upgradable Packages:   0
    Applicable Errata:     
        Enhancement: 0
        Bug Fix:     0
        Security:    0
Subscription Information: 
    UUID:            949fb66e-b28a-46d9-bffa-0a716469143c
    Last Checkin:    2020-01-20 14:56:30 UTC
    Service Level:   
    Release Version: 
    Autoheal:        true
    Registered To:   dhcp181-81.gsslab.rdu2.redhat.com
    Registered At:   2020-01-20 14:56:27 UTC
Host Collections:
~~~

The expected behavior was that the host was created as 'node1.acme.local' as the override option on the 'katello.facts' and '--name' when the host is registered

regards
rbertol

Comment 4 Brad Buckingham 2020-01-24 14:01:04 UTC
Thanks for filing the bugzilla; however, as indicated in the output of the registration and the referenced links, hostnames containing an _ are invalid and are not supported by the RFCs or Satellite.


Note You need to log in before you can comment on or make changes to this bug.