Bug 1533255

Summary: [RFE] Prevent satellite renames using shortnames
Product: Red Hat Satellite Reporter: sthirugn <sthirugn>
Component: satellite-change-hostnameAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bbuckingham, jomitsch
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-03 18:58:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1533259    

Description sthirugn@redhat.com 2018-01-10 20:45:20 UTC
Description of problem:
[RFE] Prevent satellite renames using shortnames

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

How reproducible:


Steps to Reproduce:
One of the HTB customers renamed Satellite using a shortname and hit installer issues.

Actual results:


Expected results:


Additional info:

Comment 1 John Mitsch 2018-01-10 21:05:12 UTC
Notes from IRC discussion, the hostname passed an existing "is hostname an FQDN" regex check. 

We should look into what the installer is looking for in their check and try to match it in the hostname change script.

Additionally, we can add another y/n prompt: "You are changing from OLDHOSTNAME to NEWHOSTNAME, is this correct?" which lets users double check the changes.

Comment 2 John Mitsch 2018-01-10 21:52:15 UTC
the installer seems to pass with a short hostname like "john.jhn" in my testing. But when I re-run the installer, it fails with:

Not sure what the cause is.

 /Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]: Failed to call refresh: Systemd restart for foreman-proxy failed!
journalctl log for foreman-proxy:
-- Logs begin at Wed 2018-01-10 16:21:03 UTC, end at Wed 2018-01-10 21:19:39 UTC. --
Jan 10 21:17:27 john.jhn systemd[1]: Stopping Foreman Proxy...
Jan 10 21:17:28 john.jhn systemd[1]: Starting Foreman Proxy...
Jan 10 21:17:28 john.jhn systemd[1]: Started Foreman Proxy.
Jan 10 21:18:30 john.jhn systemd[1]: Stopping Foreman Proxy...
Jan 10 21:18:30 john.jhn systemd[1]: Starting Foreman Proxy...
Jan 10 21:18:30 john.jhn systemd[1]: Started Foreman Proxy.
Jan 10 21:19:38 john.jhn systemd[1]: Stopping Foreman Proxy...
Jan 10 21:19:38 john.jhn systemd[1]: Starting Foreman Proxy...
Jan 10 21:19:39 john.jhn systemd[1]: Started Foreman Proxy.
 /Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]: Systemd restart for foreman-proxy failed!
journalctl log for foreman-proxy:
-- Logs begin at Wed 2018-01-10 16:21:03 UTC, end at Wed 2018-01-10 21:19:39 UTC. --
Jan 10 21:17:27 john.jhn systemd[1]: Stopping Foreman Proxy...
Jan 10 21:17:28 john.jhn systemd[1]: Starting Foreman Proxy...
Jan 10 21:17:28 john.jhn systemd[1]: Started Foreman Proxy.
Jan 10 21:18:30 john.jhn systemd[1]: Stopping Foreman Proxy...
Jan 10 21:18:30 john.jhn systemd[1]: Starting Foreman Proxy...
Jan 10 21:18:30 john.jhn systemd[1]: Started Foreman Proxy.
Jan 10 21:19:38 john.jhn systemd[1]: Stopping Foreman Proxy...
Jan 10 21:19:38 john.jhn systemd[1]: Starting Foreman Proxy...
Jan 10 21:19:39 john.jhn systemd[1]: Started Foreman Proxy.

/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb:158:in `rescue in restart'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb:155:in `restart'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/service.rb:248:in `refresh'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:147:in `process_callback'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:34:in `block in process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:119:in `block in queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:118:in `queued_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:33:in `process_events'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:268:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:179:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:179:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:511:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:510:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:179:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:121:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:169:in `evaluate'
/usr/share/gems/gems/kafo-2.0.1/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:225:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:140:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:224:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:172:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:344:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:222:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:263:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:196:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:356:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block (2 levels) in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:263:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:263:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:666:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'

Comment 5 Bryan Kearney 2019-08-05 12:22:43 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 6 Bryan Kearney 2019-09-03 18:58:39 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.