Bug 1858923 - Can not modify associated hosts if connection to vCenter is down from the Satellite server.
Summary: Can not modify associated hosts if connection to vCenter is down from the Sat...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - VMWare
Version: 6.7.0
Hardware: All
OS: All
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-20 18:46 UTC by Sayan Das
Modified: 2021-04-05 14:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31307 0 Normal New Can not modify associated hosts if connection to vCenter is down from the Satellite server. 2021-02-19 11:33:40 UTC
Red Hat Knowledge Base (Solution) 5237461 0 None None None 2020-07-20 20:55:28 UTC

Description Sayan Das 2020-07-20 18:46:02 UTC
Description of problem:

Unable to set or change any release version\content-view\LCE , if the content host is associated with VMware compute-resource and connection to vCenter from satellite server is down.


Version-Release number of selected component (if applicable):
Satellite 6.7 [ older versions as well ]

How reproducible:
Always


Steps to Reproduce:
1. Configure VMware compute resource.
2. Build a host from satellite using the compute resource.
3. Use following command to block the connection from satellite to vCenter.
   # iptables -I OUTPUT -d vcenter.example.com -j DROP

4. Try to set or change the release version\CV\LCE of the host.


Actual results:

* It will wait for some time and then throw following error in GUI.
~~
An error occurred saving the Content Host: Failed to find compute attributes, please check if VM test-rhel7.example.com was deleted
~~

* It will log following details in production.log at the same time.
~~
2020-07-20T22:54:33 [I|app|ad7b7494] Started PUT "/api/v2/hosts/24" for 10.74.9.157 at 2020-07-20 22:54:33 +0530
2020-07-20T22:54:33 [I|app|ad7b7494] Processing by Api::V2::HostsController#update as JSON
2020-07-20T22:54:33 [I|app|ad7b7494]   Parameters: {"id"=>"24", "host"=>{"subscription_facet_attributes"=>{"id"=>19, "autoheal"=>true, "purpose_role"=>"", "purpose_usage"=>"", "service_level"=>"", "release_version"=>"7Server"}}, "apiv"=>"v2"}
2020-07-20T22:55:06 [W|app|22f93f5a] Action failed
2020-07-20T22:55:06 [I|app|22f93f5a] Deface: [WARNING] No :original defined for 'change 500 page content', you should change its definition to include:
 :original => '35d2b4f7aac0c083740c6de6775473457e9ae9d8' 
2020-07-20T22:55:06 [I|app|22f93f5a]   Rendering common/500.html.erb
2020-07-20T22:55:06 [I|app|22f93f5a]   Rendered common/500.html.erb (5.4ms)
2020-07-20T22:55:06 [I|app|22f93f5a] Completed 500 Internal Server Error in 60039ms (Views: 19.5ms | ActiveRecord: 3.2ms)
2020-07-20T22:55:20 [I|app|1c9b8bb8] Started GET "/notification_recipients" for 10.74.9.157 at 2020-07-20 22:55:20 +0530
2020-07-20T22:55:20 [I|app|1c9b8bb8] Processing by NotificationRecipientsController#index as JSON
2020-07-20T22:55:20 [I|app|1c9b8bb8] Completed 200 OK in 12ms (Views: 0.1ms | ActiveRecord: 2.7ms)
2020-07-20T22:55:34 [I|app|ad7b7494] Adding Compute instance for test-rhel7.example.com
2020-07-20T22:55:34 [W|app|ad7b7494] Failed to find compute attributes, please check if VM test-rhel7.example.com was deleted
2020-07-20T22:55:34 [W|app|ad7b7494] Rolling back due to a problem: [#<Orchestration::Task:0x00007f479fe84a48 @name="Set up compute instance test-rhel7.example.com", @id="Set up compute instance test-rhel7.example.com", @status="failed", @priority=3, @action=[#<Host::Managed id: 24, name: "test-rhel7.example.com", last_compile: "2020-07-19 20:19:25", last_report: nil, updated_at: "2020-07-19 20:19:25", created_at: "2020-07-17 20:57:27", root_pass: "$5$S5makfAftJJIxgUd$dhLS9YrQMfXjNGD.ADRzt2oGzZgvqJ...", architecture_id: 1, operatingsystem_id: 4, environment_id: nil, ptable_id: 106, medium_id: nil, build: false, comment: "", disk: "", installed_at: "2020-07-19 17:24:08", model_id: 1, hostgroup_id: 1, owner_id: 4, owner_type: "User", enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: "5000ed8f-054b-f2c8-80ba-f993a114d1a5", compute_resource_id: 1, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 1, location_id: 2, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: 4, provision_method: "build", grub_pass: "$5$S5makfAftJJIxgUd$dhLS9YrQMfXjNGD.ADRzt2oGzZgvqJ...", discovery_rule_id: nil, global_status: 1, lookup_value_matcher: "fqdn=test-rhel7.example.com", pxe_loader: "PXELinux BIOS", initiated_at: "2020-07-19 17:18:22", build_errors: nil, openscap_proxy_id: nil>, :setCompute], @created=1595265934.121043, @timestamp=2020-07-20 17:25:34 UTC>]
2020-07-20T22:55:34 [I|app|ad7b7494] Processed 1 tasks from queue 'Host::Managed Main', completed 0/2
2020-07-20T22:55:34 [E|app|ad7b7494] Task 'Set up compute instance test-rhel7.example.com' *failed*
2020-07-20T22:55:34 [E|app|ad7b7494] Task 'Query instance details for test-rhel7.example.com' *canceled*
2020-07-20T22:55:34 [E|app|ad7b7494] Unprocessable entity Host::Managed (id: 24):
  Failed to find compute attributes, please check if VM test-rhel7.example.com was deleted

~~


Expected results:

1. Satellite should allow changing\setting the values of content host, which are not related to compute resource e.g. release version.


2. Production.log should show more meaning full message rather than just showing "Completed 500 Internal Server Error".

Like
~~
Unable to reach vcenter.example.com. 
~~


Additional info:
NA

Comment 3 Ondřej Ezr 2020-11-12 10:00:03 UTC
Created redmine issue https://projects.theforeman.org/issues/31307 from this bug


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