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

Add call for bundled service children retirement #17317

Merged

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented Apr 19, 2018

All direct service children of the parent service in a bundled service need to go through the create_retire_subtasks method so that child vms get retired as well.

WIP'd cause requires automate changes.

@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 19, 2018

@miq-bot add_label retirement

@d-m-u d-m-u changed the title [WIP] Add call for bundled service children retirement Add call for bundled service children retirement Apr 19, 2018
@d-m-u d-m-u changed the title Add call for bundled service children retirement [WIP] Add call for bundled service children retirement Apr 19, 2018
@d-m-u d-m-u changed the title [WIP] Add call for bundled service children retirement Add call for bundled service children retirement Apr 19, 2018
@miq-bot miq-bot removed the wip label Apr 19, 2018
@d-m-u d-m-u changed the title Add call for bundled service children retirement [WIP] Add call for bundled service children retirement Apr 19, 2018
@miq-bot miq-bot added the wip label Apr 19, 2018
@d-m-u d-m-u force-pushed the adding_bundled_service_child_retire_thingies branch from 8bda8ad to 047a5b5 Compare April 19, 2018 18:21
@d-m-u d-m-u changed the title [WIP] Add call for bundled service children retirement Add call for bundled service children retirement Apr 19, 2018
@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 19, 2018

@tinaafitz can you please 👀

@miq-bot miq-bot removed the wip label Apr 19, 2018
@miq-bot
Copy link
Member

miq-bot commented Apr 19, 2018

Checked commit d-m-u@047a5b5 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

Copy link
Member

@tinaafitz tinaafitz left a comment

Choose a reason for hiding this comment

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

@d-m-u Looks good.
@mkanoor Please review.

@tinaafitz
Copy link
Member

bump @mkanoor @gmcculloug

@d-m-u
Copy link
Contributor Author

d-m-u commented May 7, 2018

bump @mkanoor 👻

parent_service.service_resources.collect do |svc_rsc|
next unless svc_rsc.resource.present? && svc_rsc.resource.respond_to?(:retire_now)
next if svc_rsc.resource.type.blank?
Copy link
Contributor

Choose a reason for hiding this comment

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

@d-m-u
Can we validate that this code gets executed. According to @tinaafitz a child service would get marked as an blank resource type.

Copy link
Contributor Author

@d-m-u d-m-u May 7, 2018

Choose a reason for hiding this comment

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

The top level service itself has a blank type and we're not creating task for it to retire in this method so we need this check. The child services do have types, they're type Vm or Service or Whatever.

@mkanoor mkanoor merged commit d1bd585 into ManageIQ:master May 7, 2018
@mkanoor mkanoor added this to the Sprint 85 Ending May 7, 2018 milestone May 7, 2018
@d-m-u d-m-u deleted the adding_bundled_service_child_retire_thingies branch May 7, 2018 20:15
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.

4 participants