ManageIQ / manageiq-providers-ovirt

ManageIQ plugin for the oVirt provider.
https://www.ovirt.org/
Apache License 2.0
5 stars 62 forks source link

Switch ID and Lan ID constantly changing for ExternalDistributedVirtualSwitch #664

Open ahrechushkin opened 4 months ago

ahrechushkin commented 4 months ago

Switch ID and Lan ID constantly changing for ExternalDistributedVirtualSwitch

 #<ManageIQ::Providers::Ovirt::InfraManager::DistributedVirtualSwitch:0x00007ff649455c08
  id: 4,
  name: "awesomenet",
  ports: nil,
  created_on: Fri, 19 Apr 2024 11:32:14.906231000 UTC +00:00,
  updated_on: Fri, 19 Apr 2024 11:32:14.906231000 UTC +00:00,
  uid_ems: "63031fe4-518b-4e96-a248-ff85078f3d26",
  allow_promiscuous: nil,
  forged_transmits: nil,
  mac_changes: nil,
  switch_uuid: nil,
  shared: nil,
  mtu: nil,
  ems_id: 3,
  type: "ManageIQ::Providers::Ovirt::InfraManager::DistributedVirtualSwitch",
  health_state: nil,
  power_state: nil,
  host_id: nil>,
 #<ManageIQ::Providers::Ovirt::InfraManager::ExternalDistributedVirtualSwitch:0x00007ff6494558e8
  id: 9,
  name: "external_awesomenet",
  ports: nil,
  created_on: Fri, 19 Apr 2024 11:33:57.168437000 UTC +00:00,
  updated_on: Fri, 19 Apr 2024 11:33:57.168437000 UTC +00:00,
  uid_ems: "4d4cdbea-448a-4fe8-a691-e4bb633ce907",
  allow_promiscuous: nil,
  forged_transmits: nil,
  mac_changes: nil,
  switch_uuid: nil,
  shared: nil,
  mtu: nil,
  ems_id: 3,
  type: "ManageIQ::Providers::Ovirt::InfraManager::ExternalDistributedVirtualSwitch",
  health_state: nil,
  power_state: nil,
  host_id: nil>,

 #<ManageIQ::Providers::Ovirt::InfraManager::DistributedVirtualSwitch:0x00007ff641537b38
  id: 4,
  name: "awesomenet",
  ports: nil,
  created_on: Fri, 19 Apr 2024 11:32:14.906231000 UTC +00:00,
  updated_on: Fri, 19 Apr 2024 11:32:14.906231000 UTC +00:00,
  uid_ems: "63031fe4-518b-4e96-a248-ff85078f3d26",
  allow_promiscuous: nil,
  forged_transmits: nil,
  mac_changes: nil,
  switch_uuid: nil,
  shared: nil,
  mtu: nil,
  ems_id: 3,
  type: "ManageIQ::Providers::Ovirt::InfraManager::DistributedVirtualSwitch",
  health_state: nil,
  power_state: nil,
  host_id: nil>,
 #<ManageIQ::Providers::Ovirt::InfraManager::ExternalDistributedVirtualSwitch:0x00007ff6415379d0
  id: 11,
  name: "external_awesomenet",
  ports: nil,
  created_on: Fri, 19 Apr 2024 11:34:07.989047000 UTC +00:00,
  updated_on: Fri, 19 Apr 2024 11:34:07.989047000 UTC +00:00,
  uid_ems: "4d4cdbea-448a-4fe8-a691-e4bb633ce907",
  allow_promiscuous: nil,
  forged_transmits: nil,
  mac_changes: nil,
  switch_uuid: nil,
  shared: nil,
  mtu: nil,
  ems_id: 3,
  type: "ManageIQ::Providers::Ovirt::InfraManager::ExternalDistributedVirtualSwitch",
  health_state: nil,
  power_state: nil,
  host_id: nil>,

The logs here from latest image petrosian-1, also i tested in on jansa

Is it normal behaviour ? If yes - why?

ahrechushkin commented 4 months ago

@agrare can you check it?

agrare commented 4 months ago

Hey @ahrechushkin no this is not expected you should be able to refresh the provider multiple times and not have existing inventory be deleted and new items created.

Typically this is an issue with the query scope during a targeted refresh not finding the existing records thus creating new ones. I'll see if I can reproduce locally first otherwise I'll ask you to provide some logs so we can see when these are being deleted&created.

ahrechushkin commented 4 months ago

Hello! @agrare Seems like the problem with identification distributed virtual switches and external distributed virtual switches Refresher delete external distributed virtual switches while refresh distributed virtual switches

ahrechushkin commented 4 months ago

Probably we need to create model ManageIQ::Providers::InfraManager::ExternalDistributedVirtualSwitch (the same as ManageIQ::Providers::InfraManager::DistributedVirtualSwitch and inherit ManageIQ::Providers::Ovirt::InfraManager::ExternalDistributedVirtualSwitch from a newly create model instead of ManageIQ::Providers::InfraManager::DistributedVirtualSwitch to fully implement STI)

I hope it should work pretty

Im going to try on my own dev stand

ahrechushkin commented 4 months ago

I tried on local stand and it works

https://github.com/ManageIQ/manageiq/pull/23000 https://github.com/ManageIQ/manageiq-providers-ovirt/pull/665

ahrechushkin commented 3 months ago

@agrare hi! do you have any news related to the issue?

miq-bot commented 1 week ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.