Bug 1994685
| Summary: | satelite-change-hostname leaves old entry of Satellite server in "All Hosts" page after the renaming gets completed in Satellite 6.10 | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Sayan Das <saydas> |
| Component: | Installation | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED WONTFIX | QA Contact: | Satellite QE Team <sat-qe-bz-list> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.10.0 | CC: | ahumbe, dsynk, ehelms |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | All | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2024-04-18 13:02:21 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: | |||
|
Description
Sayan Das
2021-08-17 17:04:48 UTC
Is this a regression from Satellite 6.9? I cannot confirm that but I will say that part of the code was probably missing always. Let me check that real quick and get back to you on that. Hello Brad,
I could not check practically but It seems, for Satelite 6.9 also the same issue should persist.
I can see the only change in code is following and based on that I would say, satellite-change-hostname always had this missing but it was never reported.
--- hostname-change.rb_fromsat69 2021-02-11 07:12:29.000000000 -0500
+++ hostname-change.rb_fromsat610 2021-08-19 10:51:05.825675017 -0400
@@ -212,6 +212,8 @@
end
def delete_puppet_certs
+ return unless @scenario_answers['puppet'].is_a?(Hash)
+
puppet_ssldir = @scenario_answers['puppet']['ssldir']
run_cmd("rm -rf '#{puppet_ssldir}'")
@@ -495,9 +497,14 @@
STDOUT.puts "updating hostname in foreman installer scenarios"
self.run_cmd("sed -i -e 's/#{@old_hostname}/#{@new_hostname}/Ig' #{scenarios_path}/*.yaml")
- STDOUT.puts "updating hostname in hammer configuration"
- self.run_cmd("sed -i.bak -e 's/#{@old_hostname}/#{@new_hostname}/Ig' #{hammer_root_config_path}/*.yml")
- self.run_cmd("sed -i.bak -e 's/#{@old_hostname}/#{@new_hostname}/Ig' #{hammer_config_path}/*.yml")
+ if File.exist?(hammer_root_config_path) or File.exist?(hammer_config_path)
+ STDOUT.puts "updating hostname in hammer configuration"
+ [hammer_root_config_path, hammer_config_path].each do |config_dir|
+ Dir[File.join(config_dir, "*.yml")].each do |config_file|
+ self.run_cmd("sed -i.bak -e 's/#{@old_hostname}/#{@new_hostname}/Ig' #{config_file}")
+ end
+ end
+ end
if File.exist?(last_scenario_yaml)
STDOUT.puts 'backing up last_scenario.yaml'
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team. Thank you. Based upon feedback during auto-closure, leaving this bugzilla open a while longer for additional investigation; however, it may be closed in a future iteration. |