Project

General

Profile

Actions

Bug #31307

closed

Can not modify associated hosts if connection to vCenter is down

Added by Ondřej Ezr over 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Compute resources - VMware
Target version:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1858923

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):
Foreman 2.0 [ 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: "xXxXx", 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: "some-uu-id-sss-xxxxxx", 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: "xXxXxX", 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

Actions #1

Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Bernhard Suttner
  • Pull request https://github.com/theforeman/foreman/pull/8520 added
Actions #2

Updated by The Foreman Bot almost 3 years ago

  • Fixed in Releases 3.0.0 added
Actions #3

Updated by Anonymous almost 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Tomer Brisker almost 3 years ago

  • Subject changed from Can not modify associated hosts if connection to vCenter is down from the Satellite server. to Can not modify associated hosts if connection to vCenter is down from the Satellite server.
  • Target version set to 2.5.1
Actions #5

Updated by Tomer Brisker almost 3 years ago

  • Subject changed from Can not modify associated hosts if connection to vCenter is down from the Satellite server. to Can not modify associated hosts if connection to vCenter is down
Actions #6

Updated by The Foreman Bot almost 3 years ago

  • Pull request https://github.com/theforeman/foreman/pull/8616 added
Actions #7

Updated by Tomer Brisker almost 3 years ago

  • Fixed in Releases 2.5.1 added
Actions

Also available in: Atom PDF