Bug 1578792
Summary: | SSA performed on RHEL VM counts duplicate services | ||
---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Jan Zmeskal <jzmeskal> |
Component: | SmartState Analysis | Assignee: | Hui Song <hsong> |
Status: | CLOSED ERRATA | QA Contact: | Angelina Vasileva <anikifor> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5.9.0 | CC: | cpelland, obarenbo, roliveri, simaishi |
Target Milestone: | GA | ||
Target Release: | 5.10.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 5.10.0.1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-02-07 23:02:55 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | RHEVM | Target Upstream Version: | |
Embargoed: |
Description
Jan Zmeskal
2018-05-16 11:59:05 UTC
New commit detected on ManageIQ/manageiq-smartstate/master: https://github.com/ManageIQ/manageiq-smartstate/commit/79087ebda6f000bb8e5c3da6173f74e419885343 commit 79087ebda6f000bb8e5c3da6173f74e419885343 Author: hsong-rh <hsong> AuthorDate: Thu May 17 15:47:12 2018 -0400 Commit: hsong-rh <hsong> CommitDate: Thu May 17 15:47:12 2018 -0400 Fix to remove duplicated records in services list after SSA https://bugzilla.redhat.com/show_bug.cgi?id=1578792 lib/metadata/linux/LinuxSystemd.rb | 10 + 1 file changed, 10 insertions(+) (In reply to CFME Bot from comment #4) > New commit detected on ManageIQ/manageiq-smartstate/master: > > https://github.com/ManageIQ/manageiq-smartstate/commit/ > 79087ebda6f000bb8e5c3da6173f74e419885343 > commit 79087ebda6f000bb8e5c3da6173f74e419885343 > Author: hsong-rh <hsong> > AuthorDate: Thu May 17 15:47:12 2018 -0400 > Commit: hsong-rh <hsong> > CommitDate: Thu May 17 15:47:12 2018 -0400 > > Fix to remove duplicated records in services list after SSA > > https://bugzilla.redhat.com/show_bug.cgi?id=1578792 > > lib/metadata/linux/LinuxSystemd.rb | 10 + > 1 file changed, 10 insertions(+) I am not sure about the proposed solution. Let's think about a scenario in which user links their own service by using this: https://www.freedesktop.org/software/systemd/man/systemctl.html#link%20PATH%E2%80%A6 Then even though such service is started after boot, it would be disregarded by SSA. Hiļ¼Jan: Our SSA works not only for running VMs, but also for those images/templates. This means: 1. We cannot run any system commands to query services; 2. We cannot parse the whole file system to filter out services, for performance reason; So currently SSA only lists those services located in the default system directories. Aren't links skipped only if we also see the target of the link? "Link a unit file that is not in the unit file search paths into the unit file search path" So, if the target isn't in the unit file search path, and the link is, we will count it. (In reply to Rich Oliveri from comment #7) > Aren't links skipped only if we also see the target of the link? > > "Link a unit file that is not in the unit file search paths into the unit > file search path" > > So, if the target isn't in the unit file search path, and the link is, we > will count it. If that is the case, then it's of course good. But I am not sure about if target of the link is considered at all. I am however not skilled in Ruby. Is that the way it works, Hui? Yes, Jan. All the links in the unit file search path will be counted. I followed reproduction steps and verified that links like that are not counted any more. I also created symlink in /usr/lib/systemd/system on tested VM like this: cd /usr/lib/systemd/system ln -sf sshd.service something.service I ran SSA again and made sure that symlink something.service has not been accounted for. Verified on version: 5.10.0.14 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:0212 |