Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging archived targets during C&U collection #17762

Merged
merged 1 commit into from
Aug 6, 2018

Conversation

slemrmartin
Copy link
Contributor

@slemrmartin slemrmartin commented Jul 26, 2018

Currently when VM is archived, but queued to capture metrics it raises exception due to missing ems_id
Instead of raising exception it'll log message and doesn't try capturing

Links

Fixes BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1560691

Steps for Testing/QA

Look at BZ's steps to reproduce.

@slemrmartin slemrmartin force-pushed the metrics-vm-archived-err branch 2 times, most recently from 01497da to 0158efe Compare July 26, 2018 09:26
@slemrmartin
Copy link
Contributor Author

Cc @blomquisg, @Ladas

@slemrmartin slemrmartin force-pushed the metrics-vm-archived-err branch from 0158efe to 98562b4 Compare July 26, 2018 10:00
@miq-bot
Copy link
Member

miq-bot commented Jul 26, 2018

Checked commit slemrmartin@98562b4 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

Copy link
Member

@kbrock kbrock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a) I don't think we use ems_id == nil to archive entities anymore. Is this for a backport?

b) I think the reason we don't want to collect these is to avoid a nil ems reference. If we actually did wanted to stop collecting archived vms, we would probably want:

if respond_to?(:ems_id) && ems_id.nil? || try(:deleted_on)
  _log.warn ...
  return
end

@Ladas
Copy link
Contributor

Ladas commented Aug 6, 2018

@kbrock

a) unfortunately we still use ems_id == nil for archiving of Vms and Hosts
b) the deleted_on should be ok, we want to collect the last time segment (last hour) of archived item. But without ems_id we can't, because we don't have the credentials to collect it.

Copy link
Contributor

@Ladas Ladas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks good, logs a nice warning instead of exploding on missing ems_id

@carbonin carbonin self-assigned this Aug 6, 2018
@carbonin carbonin added this to the Sprint 92 Ending Aug 13, 2018 milestone Aug 6, 2018
@carbonin carbonin merged commit 781d7a5 into ManageIQ:master Aug 6, 2018
@slemrmartin slemrmartin deleted the metrics-vm-archived-err branch January 24, 2019 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants