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

Get container statuses during refresh #18016

Merged
merged 1 commit into from
Oct 5, 2018

Conversation

alexander-demicev
Copy link

Get container statuses during refresh of host. We need this if openstack was deployed with containerized services. I decided to keep attributes like 'systemd_load' for containers because they are used for scopes which are passed to UI.

https://bugzilla.redhat.com/show_bug.cgi?id=1573507

@alexander-demicev
Copy link
Author

@mansam
Copy link
Contributor

mansam commented Oct 3, 2018

@agrare do you know who could review this?

containers = MiqLinux::Utils.parse_docker_ps_list(containers)
end

(services + containers).each do |service|
Copy link
Member

Choose a reason for hiding this comment

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

Are docker containers the same thing as services? This might be true for this specific openstack case but I doubt it is true universally for all host types.

IMO if openstack is returning some services as systemd units and some as docker containers this should be in the openstack host model.

We can split out a method here called collect_services which in openstack you could do basically super.concat(docker_services)

@alexander-demicev
Copy link
Author

@agrare Hi, is it better now? :)

@agrare agrare self-assigned this Oct 4, 2018
Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

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

Yeah this looks good, just the one change needed

@@ -1091,7 +1091,7 @@ def refresh_patches(ssu)
Patch.refresh_patches(self, patches)
end

def refresh_services(ssu)
def collect_services(ssu)
xml = MiqXml.createDoc(:miq).root.add_element(:services)
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be in the refresh_services method not in here

@miq-bot
Copy link
Member

miq-bot commented Oct 5, 2018

Checked commit alexander-demicev@ad7fb6f 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

@agrare agrare left a comment

Choose a reason for hiding this comment

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

LGTM

@agrare agrare merged commit baf440e into ManageIQ:master Oct 5, 2018
@agrare agrare added this to the Sprint 96 Ending Oct 8, 2018 milestone Oct 5, 2018
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